diff options
-rw-r--r-- | arch/arm/mach-ep93xx/gesbc9312.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/ts72xx.c | 23 |
2 files changed, 45 insertions, 2 deletions
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index d18fcb1a2f1b..47cc6c8b7c79 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -16,16 +16,38 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | #include <linux/platform_device.h> | ||
20 | #include <asm/io.h> | 22 | #include <asm/io.h> |
21 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
22 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
24 | 26 | ||
27 | static struct physmap_flash_data gesbc9312_flash_data = { | ||
28 | .width = 4, | ||
29 | }; | ||
30 | |||
31 | static struct resource gesbc9312_flash_resource = { | ||
32 | .start = 0x60000000, | ||
33 | .end = 0x60800000, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device gesbc9312_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &gesbc9312_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &gesbc9312_flash_resource, | ||
45 | }; | ||
46 | |||
25 | static void __init gesbc9312_init_machine(void) | 47 | static void __init gesbc9312_init_machine(void) |
26 | { | 48 | { |
27 | ep93xx_init_devices(); | 49 | ep93xx_init_devices(); |
28 | physmap_configure(0x60000000, 0x00800000, 4, NULL); | 50 | platform_device_register(&gesbc9312_flash); |
29 | } | 51 | } |
30 | 52 | ||
31 | MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") | 53 | MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index e24566b88a78..6e5a56cd5ae8 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/m48t86.h> | 22 | #include <linux/m48t86.h> |
@@ -111,6 +112,26 @@ static void __init ts72xx_map_io(void) | |||
111 | } | 112 | } |
112 | } | 113 | } |
113 | 114 | ||
115 | static struct physmap_flash_data ts72xx_flash_data = { | ||
116 | .width = 1, | ||
117 | }; | ||
118 | |||
119 | static struct resource ts72xx_flash_resource = { | ||
120 | .start = TS72XX_NOR_PHYS_BASE, | ||
121 | .end = TS72XX_NOR_PHYS_BASE + 0x01000000, | ||
122 | .flags = IORESOURCE_MEM, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device ts72xx_flash = { | ||
126 | .name = "physmap-flash", | ||
127 | .id = 0, | ||
128 | .dev = { | ||
129 | .platform_data = &ts72xx_flash_data, | ||
130 | }, | ||
131 | .num_resources = 1, | ||
132 | .resource = &ts72xx_flash_resource, | ||
133 | }; | ||
134 | |||
114 | static unsigned char ts72xx_rtc_readbyte(unsigned long addr) | 135 | static unsigned char ts72xx_rtc_readbyte(unsigned long addr) |
115 | { | 136 | { |
116 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); | 137 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); |
@@ -141,7 +162,7 @@ static void __init ts72xx_init_machine(void) | |||
141 | { | 162 | { |
142 | ep93xx_init_devices(); | 163 | ep93xx_init_devices(); |
143 | if (board_is_ts7200()) | 164 | if (board_is_ts7200()) |
144 | physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL); | 165 | platform_device_register(&ts72xx_flash); |
145 | platform_device_register(&ts72xx_rtc_device); | 166 | platform_device_register(&ts72xx_rtc_device); |
146 | } | 167 | } |
147 | 168 | ||