diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2009-07-27 02:07:41 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 18:49:35 +0800 |
commit | 91cf6a97b9a155081c455bd453b7ab889d31da03 (patch) | |
tree | 33eb05aafa235af7ea3ac3f49234245aeed02c3d | |
parent | 3eb37ff06ba189ce386d582179fc9abd37a92405 (diff) | |
download | linux-91cf6a97b9a155081c455bd453b7ab889d31da03.tar.gz linux-91cf6a97b9a155081c455bd453b7ab889d31da03.tar.bz2 linux-91cf6a97b9a155081c455bd453b7ab889d31da03.zip |
[ARM] pxa/palm: Add NOR Flash support for PalmTX
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 052f99863dab..c0aca18b71bb 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -30,6 +30,8 @@ #include <linux/usb/gpio_vbus.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/physmap.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -144,6 +146,42 @@ static unsigned long palmtx_pin_config[] __initdata = { }; /****************************************************************************** + * NOR Flash + ******************************************************************************/ +static struct mtd_partition palmtx_partitions[] = { + { + .name = "Flash", + .offset = 0x00000000, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + } +}; + +static struct physmap_flash_data palmtx_flash_data[] = { + { + .width = 2, /* bankwidth in bytes */ + .parts = palmtx_partitions, + .nr_parts = ARRAY_SIZE(palmtx_partitions) + } +}; + +static struct resource palmtx_flash_resource = { + .start = PXA_CS0_PHYS, + .end = PXA_CS0_PHYS + SZ_8M - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device palmtx_flash = { + .name = "physmap-flash", + .id = 0, + .resource = &palmtx_flash_resource, + .num_resources = 1, + .dev = { + .platform_data = palmtx_flash_data, + }, +}; + +/****************************************************************************** * SD/MMC card controller ******************************************************************************/ static struct pxamci_platform_data palmtx_mci_platform_data = { @@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = { &power_supply, &palmtx_asoc, &palmtx_gpio_vbus, + &palmtx_flash, &palmtx_nand, }; |