pcm052: allow specifying onboard DDR size in configs
authorAlbert ARIBAUD \(3ADEV\) <albert.aribaud@3adev.fr>
Mon, 26 Sep 2016 07:08:07 +0000 (09:08 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 6 Oct 2016 07:06:16 +0000 (09:06 +0200)
PCM052 SoMs may be equipped with various sizes of DDR.
Keep default of 256MB; new PCM052-based targets will
specify their actual DDR size.

Linux command line is auto-adjusted to DDR size.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
board/phytec/pcm052/Kconfig
include/configs/pcm052.h

index d67a69a747a6a121b5e9beb7cdcf572b307260d8..88524a34944af511789a0fc63fa42730948f790e 100644 (file)
@@ -12,4 +12,8 @@ config SYS_SOC
 config SYS_CONFIG_NAME
        default "pcm052"
 
+config PCM052_DDR_SIZE
+       int
+       default 256
+
 endif
index 564434ce4e7dbedff46377fb32072be210a27289..32f958a6b25ef970f0a77e6c5876451b8c6d4f40 100644 (file)
        "tftptimeout=1000\0" \
        "tftptimeoutcountmax=1000000\0" \
        "mtdparts=" MTDPARTS_DEFAULT "\0" \
-       "bootargs_base=setenv bootargs rw mem=256M " \
+       "bootargs_base=setenv bootargs rw " \
+               " mem=" __stringify(CONFIG_PCM052_DDR_SIZE) "M " \
                "console=ttyLP1,115200n8\0" \
        "bootargs_sd=setenv bootargs ${bootargs} " \
                "root=/dev/mmcblk0p2 rootwait\0" \
 /* Physical memory map */
 #define CONFIG_NR_DRAM_BANKS           1
 #define PHYS_SDRAM                     (0x80000000)
-#define PHYS_SDRAM_SIZE                        (256 * 1024 * 1024)
+#define PHYS_SDRAM_SIZE                        (CONFIG_PCM052_DDR_SIZE * 1024 * 1024)
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR