From f9a40e119c7d936cab47bea39f845f737f9bdb71 Mon Sep 17 00:00:00 2001 From: Alberto Panizzo Date: Wed, 17 Jun 2009 15:05:21 +0200 Subject: [PATCH] --- yaml --- r: 155556 b: refs/heads/master c: c3a9c7f53a0eb1ec687ecf131f9cfb41bbdc26b5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mx3/armadillo5x0.c | 47 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1404d7a0ffed..3c0343241495 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc33dc5ae7ed7a422ab1141d3bf81c6cee2a5050 +refs/heads/master: c3a9c7f53a0eb1ec687ecf131f9cfb41bbdc26b5 diff --git a/trunk/arch/arm/mach-mx3/armadillo5x0.c b/trunk/arch/arm/mach-mx3/armadillo5x0.c index 541181090b37..38d99e6c9d00 100644 --- a/trunk/arch/arm/mach-mx3/armadillo5x0.c +++ b/trunk/arch/arm/mach-mx3/armadillo5x0.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -96,6 +97,48 @@ static int armadillo5x0_pins[] = { }; +/* + * MTD NOR Flash + */ +static struct mtd_partition armadillo5x0_nor_flash_partitions[] = { + { + .name = "nor.bootloader", + .offset = 0x00000000, + .size = 4*32*1024, + }, { + .name = "nor.kernel", + .offset = MTDPART_OFS_APPEND, + .size = 16*128*1024, + }, { + .name = "nor.userland", + .offset = MTDPART_OFS_APPEND, + .size = 110*128*1024, + }, { + .name = "nor.config", + .offset = MTDPART_OFS_APPEND, + .size = 1*128*1024, + }, +}; + +static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { + .width = 2, + .parts = armadillo5x0_nor_flash_partitions, + .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), +}; + +static struct resource armadillo5x0_nor_flash_resource = { + .flags = IORESOURCE_MEM, + .start = CS0_BASE_ADDR, + .end = CS0_BASE_ADDR + SZ_64M - 1, +}; + +static struct platform_device armadillo5x0_nor_flash = { + .name = "physmap-flash", + .id = -1, + .num_resources = 1, + .resource = &armadillo5x0_nor_flash_resource, +}; + /* * FB support */ @@ -272,6 +315,10 @@ static void __init armadillo5x0_init(void) /* Register FB */ mxc_register_device(&mx3_ipu, &mx3_ipu_data); mxc_register_device(&mx3_fb, &mx3fb_pdata); + + /* Register NOR Flash */ + mxc_register_device(&armadillo5x0_nor_flash, + &armadillo5x0_nor_flash_pdata); } static void __init armadillo5x0_timer_init(void)