Commit c3a9c7f5 authored by Alberto Panizzo's avatar Alberto Panizzo Committed by Sascha Hauer

ARM MXC: Armadillo 500 add NOR flash device support (resend).

This patch add support for NOR flash mapping through the physmap driver.
The purpose is to maintain the original Atmark partition model.
Signed-off-by: default avatarAlberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent bc33dc5a
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/mtd/physmap.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -96,6 +97,48 @@ static int armadillo5x0_pins[] = { ...@@ -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 * FB support
*/ */
...@@ -272,6 +315,10 @@ static void __init armadillo5x0_init(void) ...@@ -272,6 +315,10 @@ static void __init armadillo5x0_init(void)
/* Register FB */ /* Register FB */
mxc_register_device(&mx3_ipu, &mx3_ipu_data); mxc_register_device(&mx3_ipu, &mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); 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) static void __init armadillo5x0_timer_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment