9
0
Fork 0

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 <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Eric Benard 2009-10-22 16:46:13 +02:00 committed by Sascha Hauer
parent bf33c69764
commit c24fa6b117
2 changed files with 18 additions and 1 deletions

View File

@ -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

View File

@ -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);