Marty, > On 13.09.2018, at 23:55, Marty E. Plummer <hanet...@startmail.com> wrote: > > Taken from coreboot's src/soc/rockchip/rk3288/sdram.c > > Without this change, my u-boot build for the asus c201 chromebook (4GiB) > is incorrectly detected as 0 Bytes of ram. > > Signed-off-by: Marty E. Plummer <hanet...@startmail.com>
Please revise. See below. > --- > arch/arm/mach-rockchip/sdram_common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-rockchip/sdram_common.c > b/arch/arm/mach-rockchip/sdram_common.c > index 650d53e4d9..194dc74b9f 100644 > --- a/arch/arm/mach-rockchip/sdram_common.c > +++ b/arch/arm/mach-rockchip/sdram_common.c > @@ -48,6 +48,8 @@ size_t rockchip_sdram_size(phys_addr_t reg) > rank, col, bk, cs0_row, bw, row_3_4); > } > > + size_mb = min(size_mb, SDRAM_MAX_SIZE/SZ_1M); > + aarch64: + evb-rk3399 firefly-rk3399 geekbox evb-px5 sheep-rk3368 lion-rk3368 evb-rk3328 puma-rk3399 +In file included from include/linux/delay.h:6:0, + from include/common.h:26, + from arch/arm/mach-rockchip/sdram_common.c:6: +arch/arm/mach-rockchip/sdram_common.c: In function 'rockchip_sdram_size': +include/linux/kernel.h:161:17: error: comparison of distinct pointer types lacks a cast [-Werror] + (void) (&_min1 == &_min2); \ + ^ +arch/arm/mach-rockchip/sdram_common.c:51:12: note: in expansion of macro 'min' + size_mb = min(size_mb, SDRAM_MAX_SIZE/SZ_1M); + ^~~ +cc1: all warnings being treated as errors > return (size_t)size_mb << 20; > } > > -- > 2.18.0 > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot