u-boot-brain/arch/mips
Stefan Roese 04d21a93fa mips: mt76x8: ddr_cal: Correct dqs_find_min/max implementations
The current implementations have some issues detecting the correct
values:

dqs_find_max() will return "last passing fieldval + 1" instead of
"last passing fieldval". Also it will return "maxval + 1" in the
case that all fieldvals are tested valid (without error).

dqs_find_min() will not test the "lowest" value because of using ">"
instead of ">=".

This patch now rewrites these functions to fix those issues. Also,
this patch uses the same approach of a for loop in both functions making
it easier to read and maintain.

Since the variables are integers now, we can use min()/max(), which
handles the wrap around case for fieldval=0: return (0 - 1).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Weijie Gao <weijie.gao@mediatek.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
2020-04-27 20:30:13 +02:00
..
cpu mips: add a option to support not reserving malloc space on initial stack 2020-04-27 20:29:33 +02:00
dts mips: mtmips: add support for mt7628-rfb 2020-04-27 20:30:13 +02:00
include/asm mips: add a mtmips-specific field to architecture-specific global data 2020-04-27 20:29:33 +02:00
lib mips: spl: Flush cache before jumping to U-Boot proper 2020-04-27 20:29:33 +02:00
mach-ath79 common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
mach-bmips bmips: swapping IO space isn't required 2018-12-10 18:46:45 +01:00
mach-jz47xx common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
mach-mscc mips: vcoreiii: Fix cache coherency issues 2020-04-09 18:55:59 +02:00
mach-mtmips mips: mt76x8: ddr_cal: Correct dqs_find_min/max implementations 2020-04-27 20:30:13 +02:00
mach-pic32 dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
config.mk kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
Kconfig mips: mtmips: add SPL support 2020-04-27 20:30:12 +02:00
Makefile mips: rename mach-mt7620 to mach-mtmips 2019-05-03 16:43:11 +02:00
Makefile.postlink SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00