
2 Jun
2022
2 Jun
'22
4:46 p.m.
Can we figure any of that out dynamically instead? Since CONFIG_SYS_SDRAM_SIZE is only used (for ARM) in board code, I'd rather see this handled in there, with SZ_xxx and not use CONFIG_SYS_SDRAM_SIZE at all.
Hi Tom,
Would something like this be acceptable?
int dram_init(void) { #ifdef CONFIG_TARGET_GXP #ifdef CONFIG_GXP_ECC gd->ram_size = SZ_128M + SZ_64M + SZ_32M + SZ_16M + SZ_8M; #else gd->ram_size = SZ_256M + SZ_128M + SZ_64M + SZ_32M + SZ_16M; #endif #endif
#ifdef CONFIG_GXP_VROM_64MB #ifdef CONFIG_GXP_ECC gd->ram_size = SZ_128M + SZ_64M; #else gd->ram_size = SZ_256M + SZ_128M; #endif #endif return 0; }
Thanks for the feedback,
-Nick Hawkins