aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-07-26 20:07:41 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 06:49:35 -0400
commit91cf6a97b9a155081c455bd453b7ab889d31da03 (patch)
tree33eb05aafa235af7ea3ac3f49234245aeed02c3d /arch/arm/mach-pxa
parent3eb37ff06ba189ce386d582179fc9abd37a92405 (diff)
[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>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/palmtx.c39
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 @@
30#include <linux/usb/gpio_vbus.h> 30#include <linux/usb/gpio_vbus.h>
31#include <linux/mtd/nand.h> 31#include <linux/mtd/nand.h>
32#include <linux/mtd/partitions.h> 32#include <linux/mtd/partitions.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/physmap.h>
33 35
34#include <asm/mach-types.h> 36#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
@@ -144,6 +146,42 @@ static unsigned long palmtx_pin_config[] __initdata = {
144}; 146};
145 147
146/****************************************************************************** 148/******************************************************************************
149 * NOR Flash
150 ******************************************************************************/
151static struct mtd_partition palmtx_partitions[] = {
152 {
153 .name = "Flash",
154 .offset = 0x00000000,
155 .size = MTDPART_SIZ_FULL,
156 .mask_flags = 0
157 }
158};
159
160static struct physmap_flash_data palmtx_flash_data[] = {
161 {
162 .width = 2, /* bankwidth in bytes */
163 .parts = palmtx_partitions,
164 .nr_parts = ARRAY_SIZE(palmtx_partitions)
165 }
166};
167
168static struct resource palmtx_flash_resource = {
169 .start = PXA_CS0_PHYS,
170 .end = PXA_CS0_PHYS + SZ_8M - 1,
171 .flags = IORESOURCE_MEM,
172};
173
174static struct platform_device palmtx_flash = {
175 .name = "physmap-flash",
176 .id = 0,
177 .resource = &palmtx_flash_resource,
178 .num_resources = 1,
179 .dev = {
180 .platform_data = palmtx_flash_data,
181 },
182};
183
184/******************************************************************************
147 * SD/MMC card controller 185 * SD/MMC card controller
148 ******************************************************************************/ 186 ******************************************************************************/
149static struct pxamci_platform_data palmtx_mci_platform_data = { 187static struct pxamci_platform_data palmtx_mci_platform_data = {
@@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = {
515 &power_supply, 553 &power_supply,
516 &palmtx_asoc, 554 &palmtx_asoc,
517 &palmtx_gpio_vbus, 555 &palmtx_gpio_vbus,
556 &palmtx_flash,
518 &palmtx_nand, 557 &palmtx_nand,
519}; 558};
520 559