diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-27 17:40:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-27 21:26:51 +0100 |
commit | 9aa7dd992a8275891e796f2d8f73461436ef9ce7 (patch) | |
tree | d008304c6940265f5871336ffaf68f12c878afec /arch/arm/mach-at91/at91sam9n12_devices.c | |
parent | 11bae6b40a50b48d5ee9924ac9ef3a85889c7dc9 (diff) | |
download | barebox-9aa7dd992a8275891e796f2d8f73461436ef9ce7.tar.gz barebox-9aa7dd992a8275891e796f2d8f73461436ef9ce7.tar.xz |
at91sam9n12: add autodetect sd/ddram size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9n12_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9n12_devices.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9n12_devices.c b/arch/arm/mach-at91/at91sam9n12_devices.c index 9d6e80fa7f..17e2da08bd 100644 --- a/arch/arm/mach-at91/at91sam9n12_devices.c +++ b/arch/arm/mach-at91/at91sam9n12_devices.c @@ -17,6 +17,7 @@ #include <mach/board.h> #include <mach/at91_pmc.h> #include <mach/at91sam9n12_matrix.h> +#include <mach/at91sam9_ddrsdr.h> #include <mach/gpio.h> #include <mach/io.h> #include <mach/cpu.h> @@ -26,6 +27,9 @@ void at91_add_device_sdram(u32 size) { + if (!size) + size = at91sam9n12_get_ddram_size(); + arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size); add_mem_device("sram0", AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE); |