diff options
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-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 @@ | |||
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 | ******************************************************************************/ | ||
151 | static struct mtd_partition palmtx_partitions[] = { | ||
152 | { | ||
153 | .name = "Flash", | ||
154 | .offset = 0x00000000, | ||
155 | .size = MTDPART_SIZ_FULL, | ||
156 | .mask_flags = 0 | ||
157 | } | ||
158 | }; | ||
159 | |||
160 | static 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 | |||
168 | static struct resource palmtx_flash_resource = { | ||
169 | .start = PXA_CS0_PHYS, | ||
170 | .end = PXA_CS0_PHYS + SZ_8M - 1, | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }; | ||
173 | |||
174 | static 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 | ******************************************************************************/ |
149 | static struct pxamci_platform_data palmtx_mci_platform_data = { | 187 | static 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 | ||