From c24fa6b117c3623d5909f6bf61806ee2313c216f Mon Sep 17 00:00:00 2001 From: Eric Benard Date: Thu, 22 Oct 2009 16:46:13 +0200 Subject: Eukrea CPUIMX27 : add NOR flash size configuration 64MB strataflash consist in 2x256Mb flashs. So we must declare 2 cfi_flash in order to have both 256Mb flash geometry properly detected. For flash <= 32 MB we prefer not to register the second cfi_flash which would be an alias of the first one. Signed-off-by: Eric Benard Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/Kconfig | 7 +++++++ board/eukrea_cpuimx27/eukrea_cpuimx27.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index a9e649e623..344c5237bf 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -257,6 +257,13 @@ config EUKREA_CPUIMX27_SDRAM_128MB config EUKREA_CPUIMX27_SDRAM_256MB bool "256 MB" endchoice +choice + prompt "NOR Flash Size" +config EUKREA_CPUIMX27_NOR_32MB + bool "<= 32 MB" +config EUKREA_CPUIMX27_NOR_64MB + bool "> 32 MB" +endchoice endif endmenu diff --git a/board/eukrea_cpuimx27/eukrea_cpuimx27.c b/board/eukrea_cpuimx27/eukrea_cpuimx27.c index 148a4fbe97..d1b9046d71 100644 --- a/board/eukrea_cpuimx27/eukrea_cpuimx27.c +++ b/board/eukrea_cpuimx27/eukrea_cpuimx27.c @@ -44,8 +44,15 @@ static struct device_d cfi_dev = { .name = "cfi_flash", .map_base = 0xC0000000, - .size = 64 * 1024 * 1024, + .size = 32 * 1024 * 1024, }; +#ifdef CONFIG_EUKREA_CPUIMX27_NOR_64MB +static struct device_d cfi_dev1 = { + .name = "cfi_flash", + .map_base = 0xC2000000, + .size = 32 * 1024 * 1024, +}; +#endif static struct memory_platform_data ram_pdata = { .name = "ram0", @@ -133,6 +140,9 @@ static int eukrea_cpuimx27_devices_init(void) imx_gpio_mode(mode[i]); register_device(&cfi_dev); +#ifdef CONFIG_EUKREA_CPUIMX27_NOR_64MB + register_device(&cfi_dev1); +#endif register_device(&nand_dev); register_device(&sdram_dev); -- cgit v1.2.3