ddr: fsl: Allow to detect 4 GB DDR modules in 32-bit mode
authorPali Rohár <pali@kernel.org>
Fri, 9 Sep 2022 15:32:44 +0000 (17:32 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2022 19:13:18 +0000 (15:13 -0400)
commit272199765412182f82ff789eaeffb2d93d70a01e
treed8400022c4ccc1dfbd31b31d4ca7b0ea4c360dd1
parent922460be0b72b40cae52f5e870d38c90b609b64b
ddr: fsl: Allow to detect 4 GB DDR modules in 32-bit mode

U-Boot core code already handles the case when RAM size is bigger than
CONFIG_MAX_MEM_MAPPED. So there is no need to do duplicate check in fsl ddr
driver for CONFIG_MAX_MEM_MAPPED. Instead simplify code to just check if
RAM size can be representable in phys_size_t type. And avoid printing
warning if phys_size_t is just 1 byte smaller than RAM size, which is the
typical situation with 4 GB DDR module.

Signed-off-by: Pali Rohár <pali@kernel.org>
drivers/ddr/fsl/main.c