diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2010-02-15 13:03:32 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-15 13:03:32 -0500 |
commit | 561b036ad9d0b4f0cd311d2e38025919c2cb437f (patch) | |
tree | 15c141467fe33e879a539b418e3131dd6d0910b1 /arch/arm | |
parent | fd17a25fe9423bbde16a326466330ad486321dfc (diff) |
omap: convert boards to use physmap-flash
Convert OMAP based boards to use physmap-flash. Refreshed against today's
Linux omap kernel tree
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap1/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/flash.c | 33 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-2430sdp.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/flash.h | 16 |
16 files changed, 112 insertions, 55 deletions
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 9ce17f13d3f1..b6a537c875b8 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o irq.o mux.o serial.o devices.o | 6 | obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o |
7 | obj-y += clock.o clock_data.o opp_data.o | 7 | obj-y += clock.o clock_data.o opp_data.o |
8 | 8 | ||
9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 7e70c3c08da6..096f2ed102cb 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -18,18 +18,19 @@ | |||
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/nand.h> | 19 | #include <linux/mtd/nand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/input.h> | 22 | #include <linux/input.h> |
22 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/flash.h> | ||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | 29 | ||
30 | #include <plat/tc.h> | 30 | #include <plat/tc.h> |
31 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
32 | #include <plat/mux.h> | 32 | #include <plat/mux.h> |
33 | #include <plat/flash.h> | ||
33 | #include <plat/fpga.h> | 34 | #include <plat/fpga.h> |
34 | #include <plat/keypad.h> | 35 | #include <plat/keypad.h> |
35 | #include <plat/common.h> | 36 | #include <plat/common.h> |
@@ -150,9 +151,9 @@ static struct mtd_partition nor_partitions[] = { | |||
150 | }, | 151 | }, |
151 | }; | 152 | }; |
152 | 153 | ||
153 | static struct flash_platform_data nor_data = { | 154 | static struct physmap_flash_data nor_data = { |
154 | .map_name = "cfi_probe", | ||
155 | .width = 2, | 155 | .width = 2, |
156 | .set_vpp = omap1_set_vpp, | ||
156 | .parts = nor_partitions, | 157 | .parts = nor_partitions, |
157 | .nr_parts = ARRAY_SIZE(nor_partitions), | 158 | .nr_parts = ARRAY_SIZE(nor_partitions), |
158 | }; | 159 | }; |
@@ -164,7 +165,7 @@ static struct resource nor_resource = { | |||
164 | }; | 165 | }; |
165 | 166 | ||
166 | static struct platform_device nor_device = { | 167 | static struct platform_device nor_device = { |
167 | .name = "omapflash", | 168 | .name = "physmap-flash", |
168 | .id = 0, | 169 | .id = 0, |
169 | .dev = { | 170 | .dev = { |
170 | .platform_data = &nor_data, | 171 | .platform_data = &nor_data, |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index fa7cecea19f9..d1100e4f65ac 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/mtd/nand.h> | 27 | #include <linux/mtd/nand.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/mtd/physmap.h> | ||
29 | #include <linux/input.h> | 30 | #include <linux/input.h> |
30 | #include <linux/i2c/tps65010.h> | 31 | #include <linux/i2c/tps65010.h> |
31 | #include <linux/smc91x.h> | 32 | #include <linux/smc91x.h> |
@@ -35,7 +36,6 @@ | |||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/flash.h> | ||
39 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | 40 | ||
41 | #include <plat/mux.h> | 41 | #include <plat/mux.h> |
@@ -45,6 +45,7 @@ | |||
45 | #include <plat/usb.h> | 45 | #include <plat/usb.h> |
46 | #include <plat/keypad.h> | 46 | #include <plat/keypad.h> |
47 | #include <plat/common.h> | 47 | #include <plat/common.h> |
48 | #include <plat/flash.h> | ||
48 | 49 | ||
49 | #include "board-h2.h" | 50 | #include "board-h2.h" |
50 | 51 | ||
@@ -121,9 +122,9 @@ static struct mtd_partition h2_nor_partitions[] = { | |||
121 | } | 122 | } |
122 | }; | 123 | }; |
123 | 124 | ||
124 | static struct flash_platform_data h2_nor_data = { | 125 | static struct physmap_flash_data h2_nor_data = { |
125 | .map_name = "cfi_probe", | ||
126 | .width = 2, | 126 | .width = 2, |
127 | .set_vpp = omap1_set_vpp, | ||
127 | .parts = h2_nor_partitions, | 128 | .parts = h2_nor_partitions, |
128 | .nr_parts = ARRAY_SIZE(h2_nor_partitions), | 129 | .nr_parts = ARRAY_SIZE(h2_nor_partitions), |
129 | }; | 130 | }; |
@@ -134,7 +135,7 @@ static struct resource h2_nor_resource = { | |||
134 | }; | 135 | }; |
135 | 136 | ||
136 | static struct platform_device h2_nor_device = { | 137 | static struct platform_device h2_nor_device = { |
137 | .name = "omapflash", | 138 | .name = "physmap-flash", |
138 | .id = 0, | 139 | .id = 0, |
139 | .dev = { | 140 | .dev = { |
140 | .platform_data = &h2_nor_data, | 141 | .platform_data = &h2_nor_data, |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 6a7f9c391cf1..a53ab8297d25 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/mtd.h> | 25 | #include <linux/mtd/mtd.h> |
26 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/input.h> | 29 | #include <linux/input.h> |
29 | #include <linux/spi/spi.h> | 30 | #include <linux/spi/spi.h> |
30 | #include <linux/i2c/tps65010.h> | 31 | #include <linux/i2c/tps65010.h> |
@@ -37,7 +38,6 @@ | |||
37 | 38 | ||
38 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/flash.h> | ||
41 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
42 | 42 | ||
43 | #include <mach/irqs.h> | 43 | #include <mach/irqs.h> |
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/keypad.h> | 47 | #include <plat/keypad.h> |
48 | #include <plat/dma.h> | 48 | #include <plat/dma.h> |
49 | #include <plat/common.h> | 49 | #include <plat/common.h> |
50 | #include <plat/flash.h> | ||
50 | 51 | ||
51 | #include "board-h3.h" | 52 | #include "board-h3.h" |
52 | 53 | ||
@@ -126,9 +127,9 @@ static struct mtd_partition nor_partitions[] = { | |||
126 | } | 127 | } |
127 | }; | 128 | }; |
128 | 129 | ||
129 | static struct flash_platform_data nor_data = { | 130 | static struct physmap_flash_data nor_data = { |
130 | .map_name = "cfi_probe", | ||
131 | .width = 2, | 131 | .width = 2, |
132 | .set_vpp = omap1_set_vpp, | ||
132 | .parts = nor_partitions, | 133 | .parts = nor_partitions, |
133 | .nr_parts = ARRAY_SIZE(nor_partitions), | 134 | .nr_parts = ARRAY_SIZE(nor_partitions), |
134 | }; | 135 | }; |
@@ -139,7 +140,7 @@ static struct resource nor_resource = { | |||
139 | }; | 140 | }; |
140 | 141 | ||
141 | static struct platform_device nor_device = { | 142 | static struct platform_device nor_device = { |
142 | .name = "omapflash", | 143 | .name = "physmap-flash", |
143 | .id = 0, | 144 | .id = 0, |
144 | .dev = { | 145 | .dev = { |
145 | .platform_data = &nor_data, | 146 | .platform_data = &nor_data, |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 2133b006f6a3..5d12fd35681b 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -22,16 +22,17 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/input.h> | 26 | #include <linux/input.h> |
26 | #include <linux/smc91x.h> | 27 | #include <linux/smc91x.h> |
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/flash.h> | ||
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
35 | #include <plat/flash.h> | ||
35 | #include <plat/fpga.h> | 36 | #include <plat/fpga.h> |
36 | #include <mach/gpio.h> | 37 | #include <mach/gpio.h> |
37 | #include <plat/tc.h> | 38 | #include <plat/tc.h> |
@@ -94,9 +95,9 @@ static struct mtd_partition innovator_partitions[] = { | |||
94 | } | 95 | } |
95 | }; | 96 | }; |
96 | 97 | ||
97 | static struct flash_platform_data innovator_flash_data = { | 98 | static struct physmap_flash_data innovator_flash_data = { |
98 | .map_name = "cfi_probe", | ||
99 | .width = 2, | 99 | .width = 2, |
100 | .set_vpp = omap1_set_vpp, | ||
100 | .parts = innovator_partitions, | 101 | .parts = innovator_partitions, |
101 | .nr_parts = ARRAY_SIZE(innovator_partitions), | 102 | .nr_parts = ARRAY_SIZE(innovator_partitions), |
102 | }; | 103 | }; |
@@ -108,7 +109,7 @@ static struct resource innovator_flash_resource = { | |||
108 | }; | 109 | }; |
109 | 110 | ||
110 | static struct platform_device innovator_flash_device = { | 111 | static struct platform_device innovator_flash_device = { |
111 | .name = "omapflash", | 112 | .name = "physmap-flash", |
112 | .id = 0, | 113 | .id = 0, |
113 | .dev = { | 114 | .dev = { |
114 | .platform_data = &innovator_flash_data, | 115 | .platform_data = &innovator_flash_data, |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index ccea4f448e9a..80d862001def 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <linux/mtd/mtd.h> | 38 | #include <linux/mtd/mtd.h> |
39 | #include <linux/mtd/partitions.h> | 39 | #include <linux/mtd/partitions.h> |
40 | #include <linux/mtd/physmap.h> | ||
40 | 41 | ||
41 | #include <linux/i2c/tps65010.h> | 42 | #include <linux/i2c/tps65010.h> |
42 | 43 | ||
@@ -46,8 +47,8 @@ | |||
46 | #include <asm/mach-types.h> | 47 | #include <asm/mach-types.h> |
47 | #include <asm/mach/arch.h> | 48 | #include <asm/mach/arch.h> |
48 | #include <asm/mach/map.h> | 49 | #include <asm/mach/map.h> |
49 | #include <asm/mach/flash.h> | ||
50 | 50 | ||
51 | #include <plat/flash.h> | ||
51 | #include <plat/usb.h> | 52 | #include <plat/usb.h> |
52 | #include <plat/mux.h> | 53 | #include <plat/mux.h> |
53 | #include <plat/tc.h> | 54 | #include <plat/tc.h> |
@@ -94,9 +95,9 @@ static struct mtd_partition osk_partitions[] = { | |||
94 | } | 95 | } |
95 | }; | 96 | }; |
96 | 97 | ||
97 | static struct flash_platform_data osk_flash_data = { | 98 | static struct physmap_flash_data osk_flash_data = { |
98 | .map_name = "cfi_probe", | ||
99 | .width = 2, | 99 | .width = 2, |
100 | .set_vpp = omap1_set_vpp, | ||
100 | .parts = osk_partitions, | 101 | .parts = osk_partitions, |
101 | .nr_parts = ARRAY_SIZE(osk_partitions), | 102 | .nr_parts = ARRAY_SIZE(osk_partitions), |
102 | }; | 103 | }; |
@@ -107,7 +108,7 @@ static struct resource osk_flash_resource = { | |||
107 | }; | 108 | }; |
108 | 109 | ||
109 | static struct platform_device osk5912_flash_device = { | 110 | static struct platform_device osk5912_flash_device = { |
110 | .name = "omapflash", | 111 | .name = "physmap-flash", |
111 | .id = 0, | 112 | .id = 0, |
112 | .dev = { | 113 | .dev = { |
113 | .platform_data = &osk_flash_data, | 114 | .platform_data = &osk_flash_data, |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 9fe887262bdf..569b4c9085cd 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/mtd/physmap.h> | ||
26 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
27 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
28 | #include <linux/apm-emulation.h> | 29 | #include <linux/apm-emulation.h> |
@@ -31,9 +32,9 @@ | |||
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
34 | #include <asm/mach/flash.h> | ||
35 | 35 | ||
36 | #include <mach/gpio.h> | 36 | #include <mach/gpio.h> |
37 | #include <plat/flash.h> | ||
37 | #include <plat/mux.h> | 38 | #include <plat/mux.h> |
38 | #include <plat/usb.h> | 39 | #include <plat/usb.h> |
39 | #include <plat/tc.h> | 40 | #include <plat/tc.h> |
@@ -126,9 +127,9 @@ static struct mtd_partition palmte_rom_partitions[] = { | |||
126 | }, | 127 | }, |
127 | }; | 128 | }; |
128 | 129 | ||
129 | static struct flash_platform_data palmte_rom_data = { | 130 | static struct physmap_flash_data palmte_rom_data = { |
130 | .map_name = "map_rom", | ||
131 | .width = 2, | 131 | .width = 2, |
132 | .set_vpp = omap1_set_vpp, | ||
132 | .parts = palmte_rom_partitions, | 133 | .parts = palmte_rom_partitions, |
133 | .nr_parts = ARRAY_SIZE(palmte_rom_partitions), | 134 | .nr_parts = ARRAY_SIZE(palmte_rom_partitions), |
134 | }; | 135 | }; |
@@ -140,7 +141,7 @@ static struct resource palmte_rom_resource = { | |||
140 | }; | 141 | }; |
141 | 142 | ||
142 | static struct platform_device palmte_rom_device = { | 143 | static struct platform_device palmte_rom_device = { |
143 | .name = "omapflash", | 144 | .name = "physmap-flash", |
144 | .id = -1, | 145 | .id = -1, |
145 | .dev = { | 146 | .dev = { |
146 | .platform_data = &palmte_rom_data, | 147 | .platform_data = &palmte_rom_data, |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index af068e3e0fe7..6ad49a2cc1a0 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -21,16 +21,17 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mtd/mtd.h> | 22 | #include <linux/mtd/mtd.h> |
23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
24 | #include <linux/mtd/physmap.h> | ||
24 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | #include <asm/mach/flash.h> | ||
31 | 31 | ||
32 | #include <plat/led.h> | 32 | #include <plat/led.h> |
33 | #include <mach/gpio.h> | 33 | #include <mach/gpio.h> |
34 | #include <plat/flash.h> | ||
34 | #include <plat/mux.h> | 35 | #include <plat/mux.h> |
35 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
36 | #include <plat/dma.h> | 37 | #include <plat/dma.h> |
@@ -104,9 +105,9 @@ static struct mtd_partition palmtt_partitions[] = { | |||
104 | } | 105 | } |
105 | }; | 106 | }; |
106 | 107 | ||
107 | static struct flash_platform_data palmtt_flash_data = { | 108 | static struct physmap_flash_data palmtt_flash_data = { |
108 | .map_name = "cfi_probe", | ||
109 | .width = 2, | 109 | .width = 2, |
110 | .set_vpp = omap1_set_vpp, | ||
110 | .parts = palmtt_partitions, | 111 | .parts = palmtt_partitions, |
111 | .nr_parts = ARRAY_SIZE(palmtt_partitions), | 112 | .nr_parts = ARRAY_SIZE(palmtt_partitions), |
112 | }; | 113 | }; |
@@ -118,7 +119,7 @@ static struct resource palmtt_flash_resource = { | |||
118 | }; | 119 | }; |
119 | 120 | ||
120 | static struct platform_device palmtt_flash_device = { | 121 | static struct platform_device palmtt_flash_device = { |
121 | .name = "omapflash", | 122 | .name = "physmap-flash", |
122 | .id = 0, | 123 | .id = 0, |
123 | .dev = { | 124 | .dev = { |
124 | .platform_data = &palmtt_flash_data, | 125 | .platform_data = &palmtt_flash_data, |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index c7a3b6f36500..6641de9257ef 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -25,14 +25,15 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/mtd/physmap.h> | ||
28 | 29 | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
33 | #include <asm/mach/flash.h> | ||
34 | 34 | ||
35 | #include <mach/gpio.h> | 35 | #include <mach/gpio.h> |
36 | #include <plat/flash.h> | ||
36 | #include <plat/mux.h> | 37 | #include <plat/mux.h> |
37 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
38 | #include <plat/dma.h> | 39 | #include <plat/dma.h> |
@@ -126,10 +127,9 @@ static struct mtd_partition palmz71_rom_partitions[] = { | |||
126 | }, | 127 | }, |
127 | }; | 128 | }; |
128 | 129 | ||
129 | static struct flash_platform_data palmz71_rom_data = { | 130 | static struct physmap_flash_data palmz71_rom_data = { |
130 | .map_name = "map_rom", | ||
131 | .name = "onboardrom", | ||
132 | .width = 2, | 131 | .width = 2, |
132 | .set_vpp = omap1_set_vpp, | ||
133 | .parts = palmz71_rom_partitions, | 133 | .parts = palmz71_rom_partitions, |
134 | .nr_parts = ARRAY_SIZE(palmz71_rom_partitions), | 134 | .nr_parts = ARRAY_SIZE(palmz71_rom_partitions), |
135 | }; | 135 | }; |
@@ -141,7 +141,7 @@ static struct resource palmz71_rom_resource = { | |||
141 | }; | 141 | }; |
142 | 142 | ||
143 | static struct platform_device palmz71_rom_device = { | 143 | static struct platform_device palmz71_rom_device = { |
144 | .name = "omapflash", | 144 | .name = "physmap-flash", |
145 | .id = -1, | 145 | .id = -1, |
146 | .dev = { | 146 | .dev = { |
147 | .platform_data = &palmz71_rom_data, | 147 | .platform_data = &palmz71_rom_data, |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 1387a4f15da9..e854d5741c88 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -18,19 +18,20 @@ | |||
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/nand.h> | 19 | #include <linux/mtd/nand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/input.h> | 22 | #include <linux/input.h> |
22 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/flash.h> | ||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | 29 | ||
30 | #include <plat/tc.h> | 30 | #include <plat/tc.h> |
31 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
32 | #include <plat/mux.h> | 32 | #include <plat/mux.h> |
33 | #include <plat/fpga.h> | 33 | #include <plat/fpga.h> |
34 | #include <plat/flash.h> | ||
34 | #include <plat/keypad.h> | 35 | #include <plat/keypad.h> |
35 | #include <plat/common.h> | 36 | #include <plat/common.h> |
36 | #include <plat/board.h> | 37 | #include <plat/board.h> |
@@ -117,9 +118,9 @@ static struct mtd_partition nor_partitions[] = { | |||
117 | }, | 118 | }, |
118 | }; | 119 | }; |
119 | 120 | ||
120 | static struct flash_platform_data nor_data = { | 121 | static struct physmap_flash_data nor_data = { |
121 | .map_name = "cfi_probe", | ||
122 | .width = 2, | 122 | .width = 2, |
123 | .set_vpp = omap1_set_vpp, | ||
123 | .parts = nor_partitions, | 124 | .parts = nor_partitions, |
124 | .nr_parts = ARRAY_SIZE(nor_partitions), | 125 | .nr_parts = ARRAY_SIZE(nor_partitions), |
125 | }; | 126 | }; |
@@ -131,7 +132,7 @@ static struct resource nor_resource = { | |||
131 | }; | 132 | }; |
132 | 133 | ||
133 | static struct platform_device nor_device = { | 134 | static struct platform_device nor_device = { |
134 | .name = "omapflash", | 135 | .name = "physmap-flash", |
135 | .id = 0, | 136 | .id = 0, |
136 | .dev = { | 137 | .dev = { |
137 | .platform_data = &nor_data, | 138 | .platform_data = &nor_data, |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 7a97fac83d8d..2fb1e5f8e2ec 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/notifier.h> | 22 | #include <linux/notifier.h> |
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
@@ -29,10 +30,10 @@ | |||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/flash.h> | ||
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
34 | 34 | ||
35 | #include <mach/gpio.h> | 35 | #include <mach/gpio.h> |
36 | #include <plat/flash.h> | ||
36 | #include <plat/mux.h> | 37 | #include <plat/mux.h> |
37 | #include <plat/dma.h> | 38 | #include <plat/dma.h> |
38 | #include <plat/irda.h> | 39 | #include <plat/irda.h> |
@@ -287,9 +288,9 @@ static struct mtd_partition sx1_partitions[] = { | |||
287 | } | 288 | } |
288 | }; | 289 | }; |
289 | 290 | ||
290 | static struct flash_platform_data sx1_flash_data = { | 291 | static struct physmap_flash_data sx1_flash_data = { |
291 | .map_name = "cfi_probe", | ||
292 | .width = 2, | 292 | .width = 2, |
293 | .set_vpp = omap1_set_vpp, | ||
293 | .parts = sx1_partitions, | 294 | .parts = sx1_partitions, |
294 | .nr_parts = ARRAY_SIZE(sx1_partitions), | 295 | .nr_parts = ARRAY_SIZE(sx1_partitions), |
295 | }; | 296 | }; |
@@ -310,7 +311,7 @@ static struct resource sx1_old_flash_resource[] = { | |||
310 | }; | 311 | }; |
311 | 312 | ||
312 | static struct platform_device sx1_flash_device = { | 313 | static struct platform_device sx1_flash_device = { |
313 | .name = "omapflash", | 314 | .name = "physmap-flash", |
314 | .id = 0, | 315 | .id = 0, |
315 | .dev = { | 316 | .dev = { |
316 | .platform_data = &sx1_flash_data, | 317 | .platform_data = &sx1_flash_data, |
@@ -327,7 +328,7 @@ static struct resource sx1_new_flash_resource = { | |||
327 | }; | 328 | }; |
328 | 329 | ||
329 | static struct platform_device sx1_flash_device = { | 330 | static struct platform_device sx1_flash_device = { |
330 | .name = "omapflash", | 331 | .name = "physmap-flash", |
331 | .id = 0, | 332 | .id = 0, |
332 | .dev = { | 333 | .dev = { |
333 | .platform_data = &sx1_flash_data, | 334 | .platform_data = &sx1_flash_data, |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 169183537997..87b9436fe7c0 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/notifier.h> | 22 | #include <linux/notifier.h> |
22 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
23 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
@@ -27,11 +28,11 @@ | |||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/flash.h> | ||
31 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
32 | 32 | ||
33 | #include <plat/common.h> | 33 | #include <plat/common.h> |
34 | #include <mach/gpio.h> | 34 | #include <mach/gpio.h> |
35 | #include <plat/flash.h> | ||
35 | #include <plat/mux.h> | 36 | #include <plat/mux.h> |
36 | #include <plat/tc.h> | 37 | #include <plat/tc.h> |
37 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
@@ -86,9 +87,9 @@ static int __init ext_uart_init(void) | |||
86 | } | 87 | } |
87 | arch_initcall(ext_uart_init); | 88 | arch_initcall(ext_uart_init); |
88 | 89 | ||
89 | static struct flash_platform_data voiceblue_flash_data = { | 90 | static struct physmap_flash_data voiceblue_flash_data = { |
90 | .map_name = "cfi_probe", | ||
91 | .width = 2, | 91 | .width = 2, |
92 | .set_vpp = omap1_set_vpp, | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | static struct resource voiceblue_flash_resource = { | 95 | static struct resource voiceblue_flash_resource = { |
@@ -98,7 +99,7 @@ static struct resource voiceblue_flash_resource = { | |||
98 | }; | 99 | }; |
99 | 100 | ||
100 | static struct platform_device voiceblue_flash_device = { | 101 | static struct platform_device voiceblue_flash_device = { |
101 | .name = "omapflash", | 102 | .name = "physmap-flash", |
102 | .id = 0, | 103 | .id = 0, |
103 | .dev = { | 104 | .dev = { |
104 | .platform_data = &voiceblue_flash_data, | 105 | .platform_data = &voiceblue_flash_data, |
diff --git a/arch/arm/mach-omap1/flash.c b/arch/arm/mach-omap1/flash.c new file mode 100644 index 000000000000..0b07a78eeaa7 --- /dev/null +++ b/arch/arm/mach-omap1/flash.c | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Flash support for OMAP1 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <linux/mtd/mtd.h> | ||
10 | #include <linux/mtd/map.h> | ||
11 | |||
12 | #include <plat/io.h> | ||
13 | #include <plat/tc.h> | ||
14 | |||
15 | void omap1_set_vpp(struct map_info *map, int enable) | ||
16 | { | ||
17 | static int count; | ||
18 | u32 l; | ||
19 | |||
20 | if (enable) { | ||
21 | if (count++ == 0) { | ||
22 | l = omap_readl(EMIFS_CONFIG); | ||
23 | l |= OMAP_EMIFS_CONFIG_WP; | ||
24 | omap_writel(l, EMIFS_CONFIG); | ||
25 | } | ||
26 | } else { | ||
27 | if (count && (--count == 0)) { | ||
28 | l = omap_readl(EMIFS_CONFIG); | ||
29 | l &= ~OMAP_EMIFS_CONFIG_WP; | ||
30 | omap_writel(l, EMIFS_CONFIG); | ||
31 | } | ||
32 | } | ||
33 | } | ||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 1a619787bd80..18497b7a8278 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/i2c/twl.h> | 23 | #include <linux/i2c/twl.h> |
23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
@@ -28,7 +29,6 @@ | |||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
31 | #include <asm/mach/flash.h> | ||
32 | 32 | ||
33 | #include <mach/gpio.h> | 33 | #include <mach/gpio.h> |
34 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
@@ -74,8 +74,7 @@ static struct mtd_partition sdp2430_partitions[] = { | |||
74 | } | 74 | } |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct flash_platform_data sdp2430_flash_data = { | 77 | static struct physmap_flash_data sdp2430_flash_data = { |
78 | .map_name = "cfi_probe", | ||
79 | .width = 2, | 78 | .width = 2, |
80 | .parts = sdp2430_partitions, | 79 | .parts = sdp2430_partitions, |
81 | .nr_parts = ARRAY_SIZE(sdp2430_partitions), | 80 | .nr_parts = ARRAY_SIZE(sdp2430_partitions), |
@@ -88,7 +87,7 @@ static struct resource sdp2430_flash_resource = { | |||
88 | }; | 87 | }; |
89 | 88 | ||
90 | static struct platform_device sdp2430_flash_device = { | 89 | static struct platform_device sdp2430_flash_device = { |
91 | .name = "omapflash", | 90 | .name = "physmap-flash", |
92 | .id = 0, | 91 | .id = 0, |
93 | .dev = { | 92 | .dev = { |
94 | .platform_data = &sdp2430_flash_data, | 93 | .platform_data = &sdp2430_flash_data, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 5c49c407dd51..0665f2c8dc8e 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
18 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
19 | #include <linux/mtd/physmap.h> | ||
19 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
20 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
21 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
@@ -29,7 +30,6 @@ | |||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/mach/flash.h> | ||
33 | 33 | ||
34 | #include <plat/control.h> | 34 | #include <plat/control.h> |
35 | #include <mach/gpio.h> | 35 | #include <mach/gpio.h> |
@@ -115,8 +115,7 @@ static struct mtd_partition h4_partitions[] = { | |||
115 | } | 115 | } |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static struct flash_platform_data h4_flash_data = { | 118 | static struct physmap_flash_data h4_flash_data = { |
119 | .map_name = "cfi_probe", | ||
120 | .width = 2, | 119 | .width = 2, |
121 | .parts = h4_partitions, | 120 | .parts = h4_partitions, |
122 | .nr_parts = ARRAY_SIZE(h4_partitions), | 121 | .nr_parts = ARRAY_SIZE(h4_partitions), |
@@ -127,7 +126,7 @@ static struct resource h4_flash_resource = { | |||
127 | }; | 126 | }; |
128 | 127 | ||
129 | static struct platform_device h4_flash_device = { | 128 | static struct platform_device h4_flash_device = { |
130 | .name = "omapflash", | 129 | .name = "physmap-flash", |
131 | .id = 0, | 130 | .id = 0, |
132 | .dev = { | 131 | .dev = { |
133 | .platform_data = &h4_flash_data, | 132 | .platform_data = &h4_flash_data, |
diff --git a/arch/arm/plat-omap/include/plat/flash.h b/arch/arm/plat-omap/include/plat/flash.h new file mode 100644 index 000000000000..3e6327016b40 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/flash.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Flash support for OMAP1 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __OMAP_FLASH_H | ||
10 | #define __OMAP_FLASH_H | ||
11 | |||
12 | #include <linux/mtd/map.h> | ||
13 | |||
14 | extern void omap1_set_vpp(struct map_info *map, int enable); | ||
15 | |||
16 | #endif | ||