aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/Kconfig7
-rw-r--r--arch/arm/mach-omap1/Makefile4
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c319
-rw-r--r--arch/arm/mach-omap1/board-fsample.c15
-rw-r--r--arch/arm/mach-omap1/board-h2.c15
-rw-r--r--arch/arm/mach-omap1/board-h3.c9
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c9
-rw-r--r--arch/arm/mach-omap1/board-innovator.c11
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c19
-rw-r--r--arch/arm/mach-omap1/board-osk.c14
-rw-r--r--arch/arm/mach-omap1/board-palmte.c10
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c10
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c10
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c15
-rw-r--r--arch/arm/mach-omap1/board-sx1.c16
-rw-r--r--arch/arm/mach-omap1/devices.c9
-rw-r--r--arch/arm/mach-omap1/gpio15xx.c7
-rw-r--r--arch/arm/mach-omap1/gpio16xx.c40
-rw-r--r--arch/arm/mach-omap1/gpio7xx.c14
-rw-r--r--arch/arm/mach-omap1/id.c1
-rw-r--r--arch/arm/mach-omap1/io.c2
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c2
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c1
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c1
-rw-r--r--arch/arm/mach-omap1/leds-osk.c1
-rw-r--r--arch/arm/mach-omap1/mcbsp.c14
-rw-r--r--arch/arm/mach-omap1/mux.c1
-rw-r--r--arch/arm/mach-omap1/time.c1
-rw-r--r--arch/arm/mach-omap1/timer32k.c1
29 files changed, 364 insertions, 214 deletions
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 4f8d66f044e7..dfab466ebd1d 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -37,7 +37,6 @@ comment "OMAP Board Type"
37config MACH_OMAP_INNOVATOR 37config MACH_OMAP_INNOVATOR
38 bool "TI Innovator" 38 bool "TI Innovator"
39 depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX) 39 depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
40 select OMAP_MCBSP
41 help 40 help
42 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you 41 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
43 have such a board. 42 have such a board.
@@ -45,7 +44,6 @@ config MACH_OMAP_INNOVATOR
45config MACH_OMAP_H2 44config MACH_OMAP_H2
46 bool "TI H2 Support" 45 bool "TI H2 Support"
47 depends on ARCH_OMAP1 && ARCH_OMAP16XX 46 depends on ARCH_OMAP1 && ARCH_OMAP16XX
48 select OMAP_MCBSP
49 help 47 help
50 TI OMAP 1610/1611B H2 board support. Say Y here if you have such 48 TI OMAP 1610/1611B H2 board support. Say Y here if you have such
51 a board. 49 a board.
@@ -72,7 +70,6 @@ config MACH_HERALD
72config MACH_OMAP_OSK 70config MACH_OMAP_OSK
73 bool "TI OSK Support" 71 bool "TI OSK Support"
74 depends on ARCH_OMAP1 && ARCH_OMAP16XX 72 depends on ARCH_OMAP1 && ARCH_OMAP16XX
75 select OMAP_MCBSP
76 help 73 help
77 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here 74 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
78 if you have such a board. 75 if you have such a board.
@@ -155,6 +152,10 @@ config MACH_AMS_DELTA
155 bool "Amstrad E3 (Delta)" 152 bool "Amstrad E3 (Delta)"
156 depends on ARCH_OMAP1 && ARCH_OMAP15XX 153 depends on ARCH_OMAP1 && ARCH_OMAP15XX
157 select FIQ 154 select FIQ
155 select GPIO_GENERIC_PLATFORM
156 select LEDS_GPIO_REGISTER
157 select REGULATOR
158 select REGULATOR_FIXED_VOLTAGE
158 help 159 help
159 Support for the Amstrad E3 (codename Delta) videophone. Say Y here 160 Support for the Amstrad E3 (codename Delta) videophone. Say Y here
160 if you have such a device. 161 if you have such a device.
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 11c85cd2731a..9923f92b5450 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -6,7 +6,9 @@
6obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o 6obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
7obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o 7obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
8 8
9obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o 9ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
10obj-y += mcbsp.o
11endif
10 12
11obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o 13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
12 14
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index ac65d7d7c7a1..c1b681ef4cba 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -11,6 +11,7 @@
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14#include <linux/basic_mmio_gpio.h>
14#include <linux/gpio.h> 15#include <linux/gpio.h>
15#include <linux/kernel.h> 16#include <linux/kernel.h>
16#include <linux/init.h> 17#include <linux/init.h>
@@ -18,8 +19,12 @@
18#include <linux/interrupt.h> 19#include <linux/interrupt.h>
19#include <linux/leds.h> 20#include <linux/leds.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/regulator/consumer.h>
23#include <linux/regulator/fixed.h>
24#include <linux/regulator/machine.h>
21#include <linux/serial_8250.h> 25#include <linux/serial_8250.h>
22#include <linux/export.h> 26#include <linux/export.h>
27#include <linux/omapfb.h>
23#include <linux/io.h> 28#include <linux/io.h>
24 29
25#include <media/soc_camera.h> 30#include <media/soc_camera.h>
@@ -42,9 +47,6 @@
42#include "iomap.h" 47#include "iomap.h"
43#include "common.h" 48#include "common.h"
44 49
45static u8 ams_delta_latch1_reg;
46static u16 ams_delta_latch2_reg;
47
48static const unsigned int ams_delta_keymap[] = { 50static const unsigned int ams_delta_keymap[] = {
49 KEY(0, 0, KEY_F1), /* Advert */ 51 KEY(0, 0, KEY_F1), /* Advert */
50 52
@@ -123,58 +125,188 @@ static const unsigned int ams_delta_keymap[] = {
123 KEY(7, 3, KEY_LEFTCTRL), /* Vol down */ 125 KEY(7, 3, KEY_LEFTCTRL), /* Vol down */
124}; 126};
125 127
126void ams_delta_latch1_write(u8 mask, u8 value) 128#define LATCH1_PHYS 0x01000000
127{ 129#define LATCH1_VIRT 0xEA000000
128 ams_delta_latch1_reg &= ~mask; 130#define MODEM_PHYS 0x04000000
129 ams_delta_latch1_reg |= value; 131#define MODEM_VIRT 0xEB000000
130 *(volatile __u8 *) AMS_DELTA_LATCH1_VIRT = ams_delta_latch1_reg; 132#define LATCH2_PHYS 0x08000000
131} 133#define LATCH2_VIRT 0xEC000000
132
133void ams_delta_latch2_write(u16 mask, u16 value)
134{
135 ams_delta_latch2_reg &= ~mask;
136 ams_delta_latch2_reg |= value;
137 *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
138}
139 134
140static struct map_desc ams_delta_io_desc[] __initdata = { 135static struct map_desc ams_delta_io_desc[] __initdata = {
141 /* AMS_DELTA_LATCH1 */ 136 /* AMS_DELTA_LATCH1 */
142 { 137 {
143 .virtual = AMS_DELTA_LATCH1_VIRT, 138 .virtual = LATCH1_VIRT,
144 .pfn = __phys_to_pfn(AMS_DELTA_LATCH1_PHYS), 139 .pfn = __phys_to_pfn(LATCH1_PHYS),
145 .length = 0x01000000, 140 .length = 0x01000000,
146 .type = MT_DEVICE 141 .type = MT_DEVICE
147 }, 142 },
148 /* AMS_DELTA_LATCH2 */ 143 /* AMS_DELTA_LATCH2 */
149 { 144 {
150 .virtual = AMS_DELTA_LATCH2_VIRT, 145 .virtual = LATCH2_VIRT,
151 .pfn = __phys_to_pfn(AMS_DELTA_LATCH2_PHYS), 146 .pfn = __phys_to_pfn(LATCH2_PHYS),
152 .length = 0x01000000, 147 .length = 0x01000000,
153 .type = MT_DEVICE 148 .type = MT_DEVICE
154 }, 149 },
155 /* AMS_DELTA_MODEM */ 150 /* AMS_DELTA_MODEM */
156 { 151 {
157 .virtual = AMS_DELTA_MODEM_VIRT, 152 .virtual = MODEM_VIRT,
158 .pfn = __phys_to_pfn(AMS_DELTA_MODEM_PHYS), 153 .pfn = __phys_to_pfn(MODEM_PHYS),
159 .length = 0x01000000, 154 .length = 0x01000000,
160 .type = MT_DEVICE 155 .type = MT_DEVICE
161 } 156 }
162}; 157};
163 158
164static struct omap_lcd_config ams_delta_lcd_config = { 159static struct omap_lcd_config ams_delta_lcd_config __initdata = {
165 .ctrl_name = "internal", 160 .ctrl_name = "internal",
166}; 161};
167 162
168static struct omap_usb_config ams_delta_usb_config __initdata = { 163static struct omap_usb_config ams_delta_usb_config = {
169 .register_host = 1, 164 .register_host = 1,
170 .hmc_mode = 16, 165 .hmc_mode = 16,
171 .pins[0] = 2, 166 .pins[0] = 2,
172}; 167};
173 168
174static struct omap_board_config_kernel ams_delta_config[] __initdata = { 169#define LATCH1_GPIO_BASE 232
175 { OMAP_TAG_LCD, &ams_delta_lcd_config }, 170#define LATCH1_NGPIO 8
171
172static struct resource latch1_resources[] = {
173 [0] = {
174 .name = "dat",
175 .start = LATCH1_PHYS,
176 .end = LATCH1_PHYS + (LATCH1_NGPIO - 1) / 8,
177 .flags = IORESOURCE_MEM,
178 },
179};
180
181static struct bgpio_pdata latch1_pdata = {
182 .base = LATCH1_GPIO_BASE,
183 .ngpio = LATCH1_NGPIO,
184};
185
186static struct platform_device latch1_gpio_device = {
187 .name = "basic-mmio-gpio",
188 .id = 0,
189 .resource = latch1_resources,
190 .num_resources = ARRAY_SIZE(latch1_resources),
191 .dev = {
192 .platform_data = &latch1_pdata,
193 },
194};
195
196static struct resource latch2_resources[] = {
197 [0] = {
198 .name = "dat",
199 .start = LATCH2_PHYS,
200 .end = LATCH2_PHYS + (AMS_DELTA_LATCH2_NGPIO - 1) / 8,
201 .flags = IORESOURCE_MEM,
202 },
203};
204
205static struct bgpio_pdata latch2_pdata = {
206 .base = AMS_DELTA_LATCH2_GPIO_BASE,
207 .ngpio = AMS_DELTA_LATCH2_NGPIO,
208};
209
210static struct platform_device latch2_gpio_device = {
211 .name = "basic-mmio-gpio",
212 .id = 1,
213 .resource = latch2_resources,
214 .num_resources = ARRAY_SIZE(latch2_resources),
215 .dev = {
216 .platform_data = &latch2_pdata,
217 },
218};
219
220static const struct gpio latch_gpios[] __initconst = {
221 {
222 .gpio = LATCH1_GPIO_BASE + 6,
223 .flags = GPIOF_OUT_INIT_LOW,
224 .label = "dockit1",
225 },
226 {
227 .gpio = LATCH1_GPIO_BASE + 7,
228 .flags = GPIOF_OUT_INIT_LOW,
229 .label = "dockit2",
230 },
231 {
232 .gpio = AMS_DELTA_GPIO_PIN_SCARD_RSTIN,
233 .flags = GPIOF_OUT_INIT_LOW,
234 .label = "scard_rstin",
235 },
236 {
237 .gpio = AMS_DELTA_GPIO_PIN_SCARD_CMDVCC,
238 .flags = GPIOF_OUT_INIT_LOW,
239 .label = "scard_cmdvcc",
240 },
241 {
242 .gpio = AMS_DELTA_GPIO_PIN_MODEM_CODEC,
243 .flags = GPIOF_OUT_INIT_LOW,
244 .label = "modem_codec",
245 },
246 {
247 .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 14,
248 .flags = GPIOF_OUT_INIT_LOW,
249 .label = "hookflash1",
250 },
251 {
252 .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 15,
253 .flags = GPIOF_OUT_INIT_LOW,
254 .label = "hookflash2",
255 },
256};
257
258static struct regulator_consumer_supply modem_nreset_consumers[] = {
259 REGULATOR_SUPPLY("RESET#", "serial8250.1"),
260 REGULATOR_SUPPLY("POR", "cx20442-codec"),
261};
262
263static struct regulator_init_data modem_nreset_data = {
264 .constraints = {
265 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
266 .boot_on = 1,
267 },
268 .num_consumer_supplies = ARRAY_SIZE(modem_nreset_consumers),
269 .consumer_supplies = modem_nreset_consumers,
270};
271
272static struct fixed_voltage_config modem_nreset_config = {
273 .supply_name = "modem_nreset",
274 .microvolts = 3300000,
275 .gpio = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
276 .startup_delay = 25000,
277 .enable_high = 1,
278 .enabled_at_boot = 1,
279 .init_data = &modem_nreset_data,
280};
281
282static struct platform_device modem_nreset_device = {
283 .name = "reg-fixed-voltage",
284 .id = -1,
285 .dev = {
286 .platform_data = &modem_nreset_config,
287 },
288};
289
290struct modem_private_data {
291 struct regulator *regulator;
176}; 292};
177 293
294static struct modem_private_data modem_priv;
295
296void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value)
297{
298 int bit = 0;
299 u16 bitpos = 1 << bit;
300
301 for (; bit < ngpio; bit++, bitpos = bitpos << 1) {
302 if (!(mask & bitpos))
303 continue;
304 else
305 gpio_set_value(base + bit, (value & bitpos) != 0);
306 }
307}
308EXPORT_SYMBOL(ams_delta_latch_write);
309
178static struct resource ams_delta_nand_resources[] = { 310static struct resource ams_delta_nand_resources[] = {
179 [0] = { 311 [0] = {
180 .start = OMAP1_MPUIO_BASE, 312 .start = OMAP1_MPUIO_BASE,
@@ -204,7 +336,7 @@ static const struct matrix_keymap_data ams_delta_keymap_data = {
204 .keymap_size = ARRAY_SIZE(ams_delta_keymap), 336 .keymap_size = ARRAY_SIZE(ams_delta_keymap),
205}; 337};
206 338
207static struct omap_kp_platform_data ams_delta_kp_data __initdata = { 339static struct omap_kp_platform_data ams_delta_kp_data = {
208 .rows = 8, 340 .rows = 8,
209 .cols = 8, 341 .cols = 8,
210 .keymap_data = &ams_delta_keymap_data, 342 .keymap_data = &ams_delta_keymap_data,
@@ -226,9 +358,45 @@ static struct platform_device ams_delta_lcd_device = {
226 .id = -1, 358 .id = -1,
227}; 359};
228 360
229static struct platform_device ams_delta_led_device = { 361static const struct gpio_led gpio_leds[] __initconst = {
230 .name = "ams-delta-led", 362 {
231 .id = -1 363 .name = "camera",
364 .gpio = LATCH1_GPIO_BASE + 0,
365 .default_state = LEDS_GPIO_DEFSTATE_OFF,
366#ifdef CONFIG_LEDS_TRIGGERS
367 .default_trigger = "ams_delta_camera",
368#endif
369 },
370 {
371 .name = "advert",
372 .gpio = LATCH1_GPIO_BASE + 1,
373 .default_state = LEDS_GPIO_DEFSTATE_OFF,
374 },
375 {
376 .name = "email",
377 .gpio = LATCH1_GPIO_BASE + 2,
378 .default_state = LEDS_GPIO_DEFSTATE_OFF,
379 },
380 {
381 .name = "handsfree",
382 .gpio = LATCH1_GPIO_BASE + 3,
383 .default_state = LEDS_GPIO_DEFSTATE_OFF,
384 },
385 {
386 .name = "voicemail",
387 .gpio = LATCH1_GPIO_BASE + 4,
388 .default_state = LEDS_GPIO_DEFSTATE_OFF,
389 },
390 {
391 .name = "voice",
392 .gpio = LATCH1_GPIO_BASE + 5,
393 .default_state = LEDS_GPIO_DEFSTATE_OFF,
394 },
395};
396
397static const struct gpio_led_platform_data leds_pdata __initconst = {
398 .leds = gpio_leds,
399 .num_leds = ARRAY_SIZE(gpio_leds),
232}; 400};
233 401
234static struct i2c_board_info ams_delta_camera_board_info[] = { 402static struct i2c_board_info ams_delta_camera_board_info[] = {
@@ -277,13 +445,17 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
277}; 445};
278 446
279static struct platform_device *ams_delta_devices[] __initdata = { 447static struct platform_device *ams_delta_devices[] __initdata = {
280 &ams_delta_nand_device, 448 &latch1_gpio_device,
449 &latch2_gpio_device,
281 &ams_delta_kp_device, 450 &ams_delta_kp_device,
282 &ams_delta_lcd_device,
283 &ams_delta_led_device,
284 &ams_delta_camera_device, 451 &ams_delta_camera_device,
285}; 452};
286 453
454static struct platform_device *late_devices[] __initdata = {
455 &ams_delta_nand_device,
456 &ams_delta_lcd_device,
457};
458
287static void __init ams_delta_init(void) 459static void __init ams_delta_init(void)
288{ 460{
289 /* mux pins for uarts */ 461 /* mux pins for uarts */
@@ -304,37 +476,53 @@ static void __init ams_delta_init(void)
304 omap_cfg_reg(J19_1610_CAM_D6); 476 omap_cfg_reg(J19_1610_CAM_D6);
305 omap_cfg_reg(J18_1610_CAM_D7); 477 omap_cfg_reg(J18_1610_CAM_D7);
306 478
307 omap_board_config = ams_delta_config;
308 omap_board_config_size = ARRAY_SIZE(ams_delta_config);
309 omap_serial_init(); 479 omap_serial_init();
310 omap_register_i2c_bus(1, 100, NULL, 0); 480 omap_register_i2c_bus(1, 100, NULL, 0);
311 481
312 /* Clear latch2 (NAND, LCD, modem enable) */
313 ams_delta_latch2_write(~0, 0);
314
315 omap1_usb_init(&ams_delta_usb_config); 482 omap1_usb_init(&ams_delta_usb_config);
316 omap1_set_camera_info(&ams_delta_camera_platform_data); 483 omap1_set_camera_info(&ams_delta_camera_platform_data);
317#ifdef CONFIG_LEDS_TRIGGERS 484#ifdef CONFIG_LEDS_TRIGGERS
318 led_trigger_register_simple("ams_delta_camera", 485 led_trigger_register_simple("ams_delta_camera",
319 &ams_delta_camera_led_trigger); 486 &ams_delta_camera_led_trigger);
320#endif 487#endif
488 gpio_led_register_device(-1, &leds_pdata);
321 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); 489 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
322 490
323 ams_delta_init_fiq(); 491 ams_delta_init_fiq();
324 492
325 omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1); 493 omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);
494
495 omapfb_set_lcd_config(&ams_delta_lcd_config);
496}
497
498static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
499{
500 struct modem_private_data *priv = port->private_data;
501
502 if (IS_ERR(priv->regulator))
503 return;
504
505 if (state == old)
506 return;
507
508 if (state == 0)
509 regulator_enable(priv->regulator);
510 else if (old == 0)
511 regulator_disable(priv->regulator);
326} 512}
327 513
328static struct plat_serial8250_port ams_delta_modem_ports[] = { 514static struct plat_serial8250_port ams_delta_modem_ports[] = {
329 { 515 {
330 .membase = IOMEM(AMS_DELTA_MODEM_VIRT), 516 .membase = IOMEM(MODEM_VIRT),
331 .mapbase = AMS_DELTA_MODEM_PHYS, 517 .mapbase = MODEM_PHYS,
332 .irq = -EINVAL, /* changed later */ 518 .irq = -EINVAL, /* changed later */
333 .flags = UPF_BOOT_AUTOCONF, 519 .flags = UPF_BOOT_AUTOCONF,
334 .irqflags = IRQF_TRIGGER_RISING, 520 .irqflags = IRQF_TRIGGER_RISING,
335 .iotype = UPIO_MEM, 521 .iotype = UPIO_MEM,
336 .regshift = 1, 522 .regshift = 1,
337 .uartclk = BASE_BAUD * 16, 523 .uartclk = BASE_BAUD * 16,
524 .pm = modem_pm,
525 .private_data = &modem_priv,
338 }, 526 },
339 { }, 527 { },
340}; 528};
@@ -347,13 +535,27 @@ static struct platform_device ams_delta_modem_device = {
347 }, 535 },
348}; 536};
349 537
350static int __init ams_delta_modem_init(void) 538static int __init late_init(void)
351{ 539{
352 int err; 540 int err;
353 541
354 if (!machine_is_ams_delta()) 542 if (!machine_is_ams_delta())
355 return -ENODEV; 543 return -ENODEV;
356 544
545 err = gpio_request_array(latch_gpios, ARRAY_SIZE(latch_gpios));
546 if (err) {
547 pr_err("Couldn't take over latch1/latch2 GPIO pins\n");
548 return err;
549 }
550
551 platform_add_devices(late_devices, ARRAY_SIZE(late_devices));
552
553 err = platform_device_register(&modem_nreset_device);
554 if (err) {
555 pr_err("Couldn't register the modem regulator device\n");
556 return err;
557 }
558
357 omap_cfg_reg(M14_1510_GPIO2); 559 omap_cfg_reg(M14_1510_GPIO2);
358 ams_delta_modem_ports[0].irq = 560 ams_delta_modem_ports[0].irq =
359 gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); 561 gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
@@ -365,13 +567,35 @@ static int __init ams_delta_modem_init(void)
365 } 567 }
366 gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ); 568 gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
367 569
368 ams_delta_latch2_write( 570 /* Initialize the modem_nreset regulator consumer before use */
369 AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC, 571 modem_priv.regulator = ERR_PTR(-ENODEV);
370 AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC); 572
573 ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_CODEC,
574 AMS_DELTA_LATCH2_MODEM_CODEC);
575
576 err = platform_device_register(&ams_delta_modem_device);
577 if (err)
578 goto gpio_free;
371 579
372 return platform_device_register(&ams_delta_modem_device); 580 /*
581 * Once the modem device is registered, the modem_nreset
582 * regulator can be requested on behalf of that device.
583 */
584 modem_priv.regulator = regulator_get(&ams_delta_modem_device.dev,
585 "RESET#");
586 if (IS_ERR(modem_priv.regulator)) {
587 err = PTR_ERR(modem_priv.regulator);
588 goto unregister;
589 }
590 return 0;
591
592unregister:
593 platform_device_unregister(&ams_delta_modem_device);
594gpio_free:
595 gpio_free(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
596 return err;
373} 597}
374arch_initcall(ams_delta_modem_init); 598late_initcall(late_init);
375 599
376static void __init ams_delta_map_io(void) 600static void __init ams_delta_map_io(void)
377{ 601{
@@ -390,6 +614,3 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
390 .timer = &omap1_timer, 614 .timer = &omap1_timer,
391 .restart = omap1_restart, 615 .restart = omap1_restart,
392MACHINE_END 616MACHINE_END
393
394EXPORT_SYMBOL(ams_delta_latch1_write);
395EXPORT_SYMBOL(ams_delta_latch2_write);
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 079292cca584..80bd43c7f4ec 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -21,6 +21,7 @@
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include <linux/smc91x.h> 23#include <linux/smc91x.h>
24#include <linux/omapfb.h>
24 25
25#include <asm/mach-types.h> 26#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -276,27 +277,17 @@ static struct platform_device kp_device = {
276 .resource = kp_resources, 277 .resource = kp_resources,
277}; 278};
278 279
279static struct platform_device lcd_device = {
280 .name = "lcd_p2",
281 .id = -1,
282};
283
284static struct platform_device *devices[] __initdata = { 280static struct platform_device *devices[] __initdata = {
285 &nor_device, 281 &nor_device,
286 &nand_device, 282 &nand_device,
287 &smc91x_device, 283 &smc91x_device,
288 &kp_device, 284 &kp_device,
289 &lcd_device,
290}; 285};
291 286
292static struct omap_lcd_config fsample_lcd_config = { 287static struct omap_lcd_config fsample_lcd_config = {
293 .ctrl_name = "internal", 288 .ctrl_name = "internal",
294}; 289};
295 290
296static struct omap_board_config_kernel fsample_config[] __initdata = {
297 { OMAP_TAG_LCD, &fsample_lcd_config },
298};
299
300static void __init omap_fsample_init(void) 291static void __init omap_fsample_init(void)
301{ 292{
302 /* Early, board-dependent init */ 293 /* Early, board-dependent init */
@@ -355,10 +346,10 @@ static void __init omap_fsample_init(void)
355 346
356 platform_add_devices(devices, ARRAY_SIZE(devices)); 347 platform_add_devices(devices, ARRAY_SIZE(devices));
357 348
358 omap_board_config = fsample_config;
359 omap_board_config_size = ARRAY_SIZE(fsample_config);
360 omap_serial_init(); 349 omap_serial_init();
361 omap_register_i2c_bus(1, 100, NULL, 0); 350 omap_register_i2c_bus(1, 100, NULL, 0);
351
352 omapfb_set_lcd_config(&fsample_lcd_config);
362} 353}
363 354
364/* Only FPGA needs to be mapped here. All others are done with ioremap */ 355/* Only FPGA needs to be mapped here. All others are done with ioremap */
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 03e0050a8961..c3068622fdcb 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -30,6 +30,7 @@
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/i2c/tps65010.h> 31#include <linux/i2c/tps65010.h>
32#include <linux/smc91x.h> 32#include <linux/smc91x.h>
33#include <linux/omapfb.h>
33 34
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -325,18 +326,12 @@ static struct platform_device h2_irda_device = {
325 .resource = h2_irda_resources, 326 .resource = h2_irda_resources,
326}; 327};
327 328
328static struct platform_device h2_lcd_device = {
329 .name = "lcd_h2",
330 .id = -1,
331};
332
333static struct platform_device *h2_devices[] __initdata = { 329static struct platform_device *h2_devices[] __initdata = {
334 &h2_nor_device, 330 &h2_nor_device,
335 &h2_nand_device, 331 &h2_nand_device,
336 &h2_smc91x_device, 332 &h2_smc91x_device,
337 &h2_irda_device, 333 &h2_irda_device,
338 &h2_kp_device, 334 &h2_kp_device,
339 &h2_lcd_device,
340}; 335};
341 336
342static void __init h2_init_smc91x(void) 337static void __init h2_init_smc91x(void)
@@ -391,10 +386,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = {
391 .ctrl_name = "internal", 386 .ctrl_name = "internal",
392}; 387};
393 388
394static struct omap_board_config_kernel h2_config[] __initdata = {
395 { OMAP_TAG_LCD, &h2_lcd_config },
396};
397
398static void __init h2_init(void) 389static void __init h2_init(void)
399{ 390{
400 h2_init_smc91x(); 391 h2_init_smc91x();
@@ -438,13 +429,13 @@ static void __init h2_init(void)
438 omap_cfg_reg(N19_1610_KBR5); 429 omap_cfg_reg(N19_1610_KBR5);
439 430
440 platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); 431 platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
441 omap_board_config = h2_config;
442 omap_board_config_size = ARRAY_SIZE(h2_config);
443 omap_serial_init(); 432 omap_serial_init();
444 omap_register_i2c_bus(1, 100, h2_i2c_board_info, 433 omap_register_i2c_bus(1, 100, h2_i2c_board_info,
445 ARRAY_SIZE(h2_i2c_board_info)); 434 ARRAY_SIZE(h2_i2c_board_info));
446 omap1_usb_init(&h2_usb_config); 435 omap1_usb_init(&h2_usb_config);
447 h2_mmc_init(); 436 h2_mmc_init();
437
438 omapfb_set_lcd_config(&h2_lcd_config);
448} 439}
449 440
450MACHINE_START(OMAP_H2, "TI-H2") 441MACHINE_START(OMAP_H2, "TI-H2")
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index f304fe211b1a..64b8584f64ce 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -30,6 +30,7 @@
30#include <linux/spi/spi.h> 30#include <linux/spi/spi.h>
31#include <linux/i2c/tps65010.h> 31#include <linux/i2c/tps65010.h>
32#include <linux/smc91x.h> 32#include <linux/smc91x.h>
33#include <linux/omapfb.h>
33 34
34#include <asm/setup.h> 35#include <asm/setup.h>
35#include <asm/page.h> 36#include <asm/page.h>
@@ -370,10 +371,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
370 .ctrl_name = "internal", 371 .ctrl_name = "internal",
371}; 372};
372 373
373static struct omap_board_config_kernel h3_config[] __initdata = {
374 { OMAP_TAG_LCD, &h3_lcd_config },
375};
376
377static struct i2c_board_info __initdata h3_i2c_board_info[] = { 374static struct i2c_board_info __initdata h3_i2c_board_info[] = {
378 { 375 {
379 I2C_BOARD_INFO("tps65013", 0x48), 376 I2C_BOARD_INFO("tps65013", 0x48),
@@ -426,13 +423,13 @@ static void __init h3_init(void)
426 platform_add_devices(devices, ARRAY_SIZE(devices)); 423 platform_add_devices(devices, ARRAY_SIZE(devices));
427 spi_register_board_info(h3_spi_board_info, 424 spi_register_board_info(h3_spi_board_info,
428 ARRAY_SIZE(h3_spi_board_info)); 425 ARRAY_SIZE(h3_spi_board_info));
429 omap_board_config = h3_config;
430 omap_board_config_size = ARRAY_SIZE(h3_config);
431 omap_serial_init(); 426 omap_serial_init();
432 omap_register_i2c_bus(1, 100, h3_i2c_board_info, 427 omap_register_i2c_bus(1, 100, h3_i2c_board_info,
433 ARRAY_SIZE(h3_i2c_board_info)); 428 ARRAY_SIZE(h3_i2c_board_info));
434 omap1_usb_init(&h3_usb_config); 429 omap1_usb_init(&h3_usb_config);
435 h3_mmc_init(); 430 h3_mmc_init();
431
432 omapfb_set_lcd_config(&h3_lcd_config);
436} 433}
437 434
438MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") 435MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index fa52d145d7b6..827d83a96af8 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -36,6 +36,7 @@
36#include <linux/leds.h> 36#include <linux/leds.h>
37#include <linux/spi/spi.h> 37#include <linux/spi/spi.h>
38#include <linux/spi/ads7846.h> 38#include <linux/spi/ads7846.h>
39#include <linux/omapfb.h>
39 40
40#include <asm/mach-types.h> 41#include <asm/mach-types.h>
41#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
@@ -397,10 +398,6 @@ static struct omap_lcd_config htcherald_lcd_config __initdata = {
397 .ctrl_name = "internal", 398 .ctrl_name = "internal",
398}; 399};
399 400
400static struct omap_board_config_kernel htcherald_config[] __initdata = {
401 { OMAP_TAG_LCD, &htcherald_lcd_config },
402};
403
404static struct platform_device lcd_device = { 401static struct platform_device lcd_device = {
405 .name = "lcd_htcherald", 402 .name = "lcd_htcherald",
406 .id = -1, 403 .id = -1,
@@ -579,8 +576,6 @@ static void __init htcherald_init(void)
579 printk(KERN_INFO "HTC Herald init.\n"); 576 printk(KERN_INFO "HTC Herald init.\n");
580 577
581 /* Do board initialization before we register all the devices */ 578 /* Do board initialization before we register all the devices */
582 omap_board_config = htcherald_config;
583 omap_board_config_size = ARRAY_SIZE(htcherald_config);
584 platform_add_devices(devices, ARRAY_SIZE(devices)); 579 platform_add_devices(devices, ARRAY_SIZE(devices));
585 580
586 htcherald_disable_watchdog(); 581 htcherald_disable_watchdog();
@@ -597,6 +592,8 @@ static void __init htcherald_init(void)
597 htc_mmc_data[0] = &htc_mmc1_data; 592 htc_mmc_data[0] = &htc_mmc1_data;
598 omap1_init_mmc(htc_mmc_data, 1); 593 omap1_init_mmc(htc_mmc_data, 1);
599#endif 594#endif
595
596 omapfb_set_lcd_config(&htcherald_lcd_config);
600} 597}
601 598
602MACHINE_START(HERALD, "HTC Herald") 599MACHINE_START(HERALD, "HTC Herald")
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 289a6b82c5f7..61219182d16a 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -25,6 +25,7 @@
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/smc91x.h> 27#include <linux/smc91x.h>
28#include <linux/omapfb.h>
28 29
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -373,10 +374,6 @@ static inline void innovator_mmc_init(void)
373} 374}
374#endif 375#endif
375 376
376static struct omap_board_config_kernel innovator_config[] = {
377 { OMAP_TAG_LCD, NULL },
378};
379
380static void __init innovator_init(void) 377static void __init innovator_init(void)
381{ 378{
382 if (cpu_is_omap1510()) 379 if (cpu_is_omap1510())
@@ -419,17 +416,15 @@ static void __init innovator_init(void)
419#ifdef CONFIG_ARCH_OMAP15XX 416#ifdef CONFIG_ARCH_OMAP15XX
420 if (cpu_is_omap1510()) { 417 if (cpu_is_omap1510()) {
421 omap1_usb_init(&innovator1510_usb_config); 418 omap1_usb_init(&innovator1510_usb_config);
422 innovator_config[1].data = &innovator1510_lcd_config; 419 omapfb_set_lcd_config(&innovator1510_lcd_config);
423 } 420 }
424#endif 421#endif
425#ifdef CONFIG_ARCH_OMAP16XX 422#ifdef CONFIG_ARCH_OMAP16XX
426 if (cpu_is_omap1610()) { 423 if (cpu_is_omap1610()) {
427 omap1_usb_init(&h2_usb_config); 424 omap1_usb_init(&h2_usb_config);
428 innovator_config[1].data = &innovator1610_lcd_config; 425 omapfb_set_lcd_config(&innovator1610_lcd_config);
429 } 426 }
430#endif 427#endif
431 omap_board_config = innovator_config;
432 omap_board_config_size = ARRAY_SIZE(innovator_config);
433 omap_serial_init(); 428 omap_serial_init();
434 omap_register_i2c_bus(1, 100, NULL, 0); 429 omap_register_i2c_bus(1, 100, NULL, 0);
435 innovator_mmc_init(); 430 innovator_mmc_init();
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index abdbdb08644f..fe95ec5f6f03 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -29,7 +29,6 @@
29#include <plat/usb.h> 29#include <plat/usb.h>
30#include <plat/board.h> 30#include <plat/board.h>
31#include <plat/keypad.h> 31#include <plat/keypad.h>
32#include <plat/hwa742.h>
33#include <plat/lcd_mipid.h> 32#include <plat/lcd_mipid.h>
34#include <plat/mmc.h> 33#include <plat/mmc.h>
35#include <plat/clock.h> 34#include <plat/clock.h>
@@ -101,15 +100,16 @@ static struct mipid_platform_data nokia770_mipid_platform_data = {
101 .shutdown = mipid_shutdown, 100 .shutdown = mipid_shutdown,
102}; 101};
103 102
103static struct omap_lcd_config nokia770_lcd_config __initdata = {
104 .ctrl_name = "hwa742",
105};
106
104static void __init mipid_dev_init(void) 107static void __init mipid_dev_init(void)
105{ 108{
106 const struct omap_lcd_config *conf; 109 nokia770_mipid_platform_data.nreset_gpio = 13;
110 nokia770_mipid_platform_data.data_lines = 16;
107 111
108 conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); 112 omapfb_set_lcd_config(&nokia770_lcd_config);
109 if (conf != NULL) {
110 nokia770_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
111 nokia770_mipid_platform_data.data_lines = conf->data_lines;
112 }
113} 113}
114 114
115static void __init ads7846_dev_init(void) 115static void __init ads7846_dev_init(void)
@@ -152,14 +152,9 @@ static struct spi_board_info nokia770_spi_board_info[] __initdata = {
152 }, 152 },
153}; 153};
154 154
155static struct hwa742_platform_data nokia770_hwa742_platform_data = {
156 .te_connected = 1,
157};
158
159static void __init hwa742_dev_init(void) 155static void __init hwa742_dev_init(void)
160{ 156{
161 clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL); 157 clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL);
162 omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data);
163} 158}
164 159
165/* assume no Mini-AB port */ 160/* assume no Mini-AB port */
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index e2d7ae4418f2..1fe347396f4d 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -34,6 +34,7 @@
34#include <linux/i2c.h> 34#include <linux/i2c.h>
35#include <linux/leds.h> 35#include <linux/leds.h>
36#include <linux/smc91x.h> 36#include <linux/smc91x.h>
37#include <linux/omapfb.h>
37#include <linux/mtd/mtd.h> 38#include <linux/mtd/mtd.h>
38#include <linux/mtd/partitions.h> 39#include <linux/mtd/partitions.h>
39#include <linux/mtd/physmap.h> 40#include <linux/mtd/physmap.h>
@@ -299,12 +300,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = {
299}; 300};
300#endif 301#endif
301 302
302static struct omap_board_config_kernel osk_config[] __initdata = {
303#ifdef CONFIG_OMAP_OSK_MISTRAL
304 { OMAP_TAG_LCD, &osk_lcd_config },
305#endif
306};
307
308#ifdef CONFIG_OMAP_OSK_MISTRAL 303#ifdef CONFIG_OMAP_OSK_MISTRAL
309 304
310#include <linux/input.h> 305#include <linux/input.h>
@@ -548,8 +543,6 @@ static void __init osk_init(void)
548 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); 543 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
549 osk_flash_resource.end += SZ_32M - 1; 544 osk_flash_resource.end += SZ_32M - 1;
550 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); 545 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
551 omap_board_config = osk_config;
552 omap_board_config_size = ARRAY_SIZE(osk_config);
553 546
554 l = omap_readl(USB_TRANSCEIVER_CTRL); 547 l = omap_readl(USB_TRANSCEIVER_CTRL);
555 l |= (3 << 1); 548 l |= (3 << 1);
@@ -566,6 +559,11 @@ static void __init osk_init(void)
566 omap_register_i2c_bus(1, 400, osk_i2c_board_info, 559 omap_register_i2c_bus(1, 400, osk_i2c_board_info,
567 ARRAY_SIZE(osk_i2c_board_info)); 560 ARRAY_SIZE(osk_i2c_board_info));
568 osk_mistral_init(); 561 osk_mistral_init();
562
563#ifdef CONFIG_OMAP_OSK_MISTRAL
564 omapfb_set_lcd_config(&osk_lcd_config);
565#endif
566
569} 567}
570 568
571MACHINE_START(OMAP_OSK, "TI-OSK") 569MACHINE_START(OMAP_OSK, "TI-OSK")
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 04efa7e61149..0863d8e2bdf1 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -27,6 +27,7 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/apm-emulation.h> 29#include <linux/apm-emulation.h>
30#include <linux/omapfb.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -211,10 +212,6 @@ static struct omap_lcd_config palmte_lcd_config __initdata = {
211 .ctrl_name = "internal", 212 .ctrl_name = "internal",
212}; 213};
213 214
214static struct omap_board_config_kernel palmte_config[] __initdata = {
215 { OMAP_TAG_LCD, &palmte_lcd_config },
216};
217
218static struct spi_board_info palmte_spi_info[] __initdata = { 215static struct spi_board_info palmte_spi_info[] __initdata = {
219 { 216 {
220 .modalias = "tsc2102", 217 .modalias = "tsc2102",
@@ -252,9 +249,6 @@ static void __init omap_palmte_init(void)
252 omap_cfg_reg(UART3_TX); 249 omap_cfg_reg(UART3_TX);
253 omap_cfg_reg(UART3_RX); 250 omap_cfg_reg(UART3_RX);
254 251
255 omap_board_config = palmte_config;
256 omap_board_config_size = ARRAY_SIZE(palmte_config);
257
258 platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices)); 252 platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices));
259 253
260 spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info)); 254 spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
@@ -262,6 +256,8 @@ static void __init omap_palmte_init(void)
262 omap_serial_init(); 256 omap_serial_init();
263 omap1_usb_init(&palmte_usb_config); 257 omap1_usb_init(&palmte_usb_config);
264 omap_register_i2c_bus(1, 100, NULL, 0); 258 omap_register_i2c_bus(1, 100, NULL, 0);
259
260 omapfb_set_lcd_config(&palmte_lcd_config);
265} 261}
266 262
267MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") 263MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index acd1f3645ba0..4ff699c509c0 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -24,6 +24,7 @@
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/leds.h> 26#include <linux/leds.h>
27#include <linux/omapfb.h>
27#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 29#include <linux/spi/ads7846.h>
29 30
@@ -274,10 +275,6 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = {
274 .ctrl_name = "internal", 275 .ctrl_name = "internal",
275}; 276};
276 277
277static struct omap_board_config_kernel palmtt_config[] __initdata = {
278 { OMAP_TAG_LCD, &palmtt_lcd_config },
279};
280
281static void __init omap_mpu_wdt_mode(int mode) { 278static void __init omap_mpu_wdt_mode(int mode) {
282 if (mode) 279 if (mode)
283 omap_writew(0x8000, OMAP_WDT_TIMER_MODE); 280 omap_writew(0x8000, OMAP_WDT_TIMER_MODE);
@@ -299,15 +296,14 @@ static void __init omap_palmtt_init(void)
299 296
300 omap_mpu_wdt_mode(0); 297 omap_mpu_wdt_mode(0);
301 298
302 omap_board_config = palmtt_config;
303 omap_board_config_size = ARRAY_SIZE(palmtt_config);
304
305 platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices)); 299 platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices));
306 300
307 spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo)); 301 spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
308 omap_serial_init(); 302 omap_serial_init();
309 omap1_usb_init(&palmtt_usb_config); 303 omap1_usb_init(&palmtt_usb_config);
310 omap_register_i2c_bus(1, 100, NULL, 0); 304 omap_register_i2c_bus(1, 100, NULL, 0);
305
306 omapfb_set_lcd_config(&palmtt_lcd_config);
311} 307}
312 308
313MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") 309MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index c1cd0f2d6866..abcbbd339aeb 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -27,6 +27,7 @@
27#include <linux/mtd/mtd.h> 27#include <linux/mtd/mtd.h>
28#include <linux/mtd/partitions.h> 28#include <linux/mtd/partitions.h>
29#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
30#include <linux/omapfb.h>
30#include <linux/spi/spi.h> 31#include <linux/spi/spi.h>
31#include <linux/spi/ads7846.h> 32#include <linux/spi/ads7846.h>
32 33
@@ -240,10 +241,6 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = {
240 .ctrl_name = "internal", 241 .ctrl_name = "internal",
241}; 242};
242 243
243static struct omap_board_config_kernel palmz71_config[] __initdata = {
244 {OMAP_TAG_LCD, &palmz71_lcd_config},
245};
246
247static irqreturn_t 244static irqreturn_t
248palmz71_powercable(int irq, void *dev_id) 245palmz71_powercable(int irq, void *dev_id)
249{ 246{
@@ -314,9 +311,6 @@ omap_palmz71_init(void)
314 palmz71_gpio_setup(1); 311 palmz71_gpio_setup(1);
315 omap_mpu_wdt_mode(0); 312 omap_mpu_wdt_mode(0);
316 313
317 omap_board_config = palmz71_config;
318 omap_board_config_size = ARRAY_SIZE(palmz71_config);
319
320 platform_add_devices(devices, ARRAY_SIZE(devices)); 314 platform_add_devices(devices, ARRAY_SIZE(devices));
321 315
322 spi_register_board_info(palmz71_boardinfo, 316 spi_register_board_info(palmz71_boardinfo,
@@ -325,6 +319,8 @@ omap_palmz71_init(void)
325 omap_serial_init(); 319 omap_serial_init();
326 omap_register_i2c_bus(1, 100, NULL, 0); 320 omap_register_i2c_bus(1, 100, NULL, 0);
327 palmz71_gpio_setup(0); 321 palmz71_gpio_setup(0);
322
323 omapfb_set_lcd_config(&palmz71_lcd_config);
328} 324}
329 325
330MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") 326MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 83f5b765c5b6..76d4ee05a814 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -21,6 +21,7 @@
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include <linux/smc91x.h> 23#include <linux/smc91x.h>
24#include <linux/omapfb.h>
24 25
25#include <asm/mach-types.h> 26#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -235,27 +236,17 @@ static struct platform_device kp_device = {
235 .resource = kp_resources, 236 .resource = kp_resources,
236}; 237};
237 238
238static struct platform_device lcd_device = {
239 .name = "lcd_p2",
240 .id = -1,
241};
242
243static struct platform_device *devices[] __initdata = { 239static struct platform_device *devices[] __initdata = {
244 &nor_device, 240 &nor_device,
245 &nand_device, 241 &nand_device,
246 &smc91x_device, 242 &smc91x_device,
247 &kp_device, 243 &kp_device,
248 &lcd_device,
249}; 244};
250 245
251static struct omap_lcd_config perseus2_lcd_config __initdata = { 246static struct omap_lcd_config perseus2_lcd_config __initdata = {
252 .ctrl_name = "internal", 247 .ctrl_name = "internal",
253}; 248};
254 249
255static struct omap_board_config_kernel perseus2_config[] __initdata = {
256 { OMAP_TAG_LCD, &perseus2_lcd_config },
257};
258
259static void __init perseus2_init_smc91x(void) 250static void __init perseus2_init_smc91x(void)
260{ 251{
261 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); 252 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
@@ -323,10 +314,10 @@ static void __init omap_perseus2_init(void)
323 314
324 platform_add_devices(devices, ARRAY_SIZE(devices)); 315 platform_add_devices(devices, ARRAY_SIZE(devices));
325 316
326 omap_board_config = perseus2_config;
327 omap_board_config_size = ARRAY_SIZE(perseus2_config);
328 omap_serial_init(); 317 omap_serial_init();
329 omap_register_i2c_bus(1, 100, NULL, 0); 318 omap_register_i2c_bus(1, 100, NULL, 0);
319
320 omapfb_set_lcd_config(&perseus2_lcd_config);
330} 321}
331 322
332/* Only FPGA needs to be mapped here. All others are done with ioremap */ 323/* Only FPGA needs to be mapped here. All others are done with ioremap */
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index fed4435f5d43..f34cb74a9f41 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -27,6 +27,7 @@
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/errno.h> 28#include <linux/errno.h>
29#include <linux/export.h> 29#include <linux/export.h>
30#include <linux/omapfb.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -357,11 +358,6 @@ static struct omap_usb_config sx1_usb_config __initdata = {
357 358
358/*----------- LCD -------------------------*/ 359/*----------- LCD -------------------------*/
359 360
360static struct platform_device sx1_lcd_device = {
361 .name = "lcd_sx1",
362 .id = -1,
363};
364
365static struct omap_lcd_config sx1_lcd_config __initdata = { 361static struct omap_lcd_config sx1_lcd_config __initdata = {
366 .ctrl_name = "internal", 362 .ctrl_name = "internal",
367}; 363};
@@ -370,14 +366,8 @@ static struct omap_lcd_config sx1_lcd_config __initdata = {
370static struct platform_device *sx1_devices[] __initdata = { 366static struct platform_device *sx1_devices[] __initdata = {
371 &sx1_flash_device, 367 &sx1_flash_device,
372 &sx1_kp_device, 368 &sx1_kp_device,
373 &sx1_lcd_device,
374 &sx1_irda_device, 369 &sx1_irda_device,
375}; 370};
376/*-----------------------------------------*/
377
378static struct omap_board_config_kernel sx1_config[] __initdata = {
379 { OMAP_TAG_LCD, &sx1_lcd_config },
380};
381 371
382/*-----------------------------------------*/ 372/*-----------------------------------------*/
383 373
@@ -393,8 +383,6 @@ static void __init omap_sx1_init(void)
393 383
394 platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices)); 384 platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices));
395 385
396 omap_board_config = sx1_config;
397 omap_board_config_size = ARRAY_SIZE(sx1_config);
398 omap_serial_init(); 386 omap_serial_init();
399 omap_register_i2c_bus(1, 100, NULL, 0); 387 omap_register_i2c_bus(1, 100, NULL, 0);
400 omap1_usb_init(&sx1_usb_config); 388 omap1_usb_init(&sx1_usb_config);
@@ -408,6 +396,8 @@ static void __init omap_sx1_init(void)
408 gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */ 396 gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */
409 gpio_direction_output(11, 0); /*A_SWITCH = 0 */ 397 gpio_direction_output(11, 0); /*A_SWITCH = 0 */
410 gpio_direction_output(15, 0); /*A_USB_ON = 0 */ 398 gpio_direction_output(15, 0); /*A_USB_ON = 0 */
399
400 omapfb_set_lcd_config(&sx1_lcd_config);
411} 401}
412 402
413MACHINE_START(SX1, "OMAP310 based Siemens SX1") 403MACHINE_START(SX1, "OMAP310 based Siemens SX1")
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index d06c7140392c..dcd8ddbec2bb 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -24,7 +24,6 @@
24#include <plat/mux.h> 24#include <plat/mux.h>
25#include <plat/mmc.h> 25#include <plat/mmc.h>
26#include <plat/omap7xx.h> 26#include <plat/omap7xx.h>
27#include <plat/mcbsp.h>
28 27
29#include <mach/camera.h> 28#include <mach/camera.h>
30#include <mach/hardware.h> 29#include <mach/hardware.h>
@@ -250,16 +249,8 @@ static struct platform_device omap_pcm = {
250 .id = -1, 249 .id = -1,
251}; 250};
252 251
253OMAP_MCBSP_PLATFORM_DEVICE(1);
254OMAP_MCBSP_PLATFORM_DEVICE(2);
255OMAP_MCBSP_PLATFORM_DEVICE(3);
256
257static void omap_init_audio(void) 252static void omap_init_audio(void)
258{ 253{
259 platform_device_register(&omap_mcbsp1);
260 platform_device_register(&omap_mcbsp2);
261 if (!cpu_is_omap7xx())
262 platform_device_register(&omap_mcbsp3);
263 platform_device_register(&omap_pcm); 254 platform_device_register(&omap_pcm);
264} 255}
265 256
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
index 399da4ce017b..634903ef8292 100644
--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -42,11 +42,12 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = {
42 .irqstatus = OMAP_MPUIO_GPIO_INT, 42 .irqstatus = OMAP_MPUIO_GPIO_INT,
43 .irqenable = OMAP_MPUIO_GPIO_MASKIT, 43 .irqenable = OMAP_MPUIO_GPIO_MASKIT,
44 .irqenable_inv = true, 44 .irqenable_inv = true,
45 .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE,
45}; 46};
46 47
47static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { 48static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = {
48 .virtual_irq_start = IH_MPUIO_BASE, 49 .virtual_irq_start = IH_MPUIO_BASE,
49 .bank_type = METHOD_MPUIO, 50 .is_mpuio = true,
50 .bank_width = 16, 51 .bank_width = 16,
51 .bank_stride = 1, 52 .bank_stride = 1,
52 .regs = &omap15xx_mpuio_regs, 53 .regs = &omap15xx_mpuio_regs,
@@ -83,11 +84,12 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
83 .irqstatus = OMAP1510_GPIO_INT_STATUS, 84 .irqstatus = OMAP1510_GPIO_INT_STATUS,
84 .irqenable = OMAP1510_GPIO_INT_MASK, 85 .irqenable = OMAP1510_GPIO_INT_MASK,
85 .irqenable_inv = true, 86 .irqenable_inv = true,
87 .irqctrl = OMAP1510_GPIO_INT_CONTROL,
88 .pinctrl = OMAP1510_GPIO_PIN_CONTROL,
86}; 89};
87 90
88static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { 91static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = {
89 .virtual_irq_start = IH_GPIO_BASE, 92 .virtual_irq_start = IH_GPIO_BASE,
90 .bank_type = METHOD_GPIO_1510,
91 .bank_width = 16, 93 .bank_width = 16,
92 .regs = &omap15xx_gpio_regs, 94 .regs = &omap15xx_gpio_regs,
93}; 95};
@@ -115,7 +117,6 @@ static int __init omap15xx_gpio_init(void)
115 platform_device_register(&omap15xx_mpu_gpio); 117 platform_device_register(&omap15xx_mpu_gpio);
116 platform_device_register(&omap15xx_gpio); 118 platform_device_register(&omap15xx_gpio);
117 119
118 gpio_bank_count = 2;
119 return 0; 120 return 0;
120} 121}
121postcore_initcall(omap15xx_gpio_init); 122postcore_initcall(omap15xx_gpio_init);
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
index 99cabc498ab5..1fb3b9ad496e 100644
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -24,6 +24,9 @@
24#define OMAP1610_GPIO4_BASE 0xfffbbc00 24#define OMAP1610_GPIO4_BASE 0xfffbbc00
25#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE 25#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE
26 26
27/* smart idle, enable wakeup */
28#define SYSCONFIG_WORD 0x14
29
27/* mpu gpio */ 30/* mpu gpio */
28static struct __initdata resource omap16xx_mpu_gpio_resources[] = { 31static struct __initdata resource omap16xx_mpu_gpio_resources[] = {
29 { 32 {
@@ -45,11 +48,12 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
45 .irqstatus = OMAP_MPUIO_GPIO_INT, 48 .irqstatus = OMAP_MPUIO_GPIO_INT,
46 .irqenable = OMAP_MPUIO_GPIO_MASKIT, 49 .irqenable = OMAP_MPUIO_GPIO_MASKIT,
47 .irqenable_inv = true, 50 .irqenable_inv = true,
51 .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE,
48}; 52};
49 53
50static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { 54static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = {
51 .virtual_irq_start = IH_MPUIO_BASE, 55 .virtual_irq_start = IH_MPUIO_BASE,
52 .bank_type = METHOD_MPUIO, 56 .is_mpuio = true,
53 .bank_width = 16, 57 .bank_width = 16,
54 .bank_stride = 1, 58 .bank_stride = 1,
55 .regs = &omap16xx_mpuio_regs, 59 .regs = &omap16xx_mpuio_regs,
@@ -89,11 +93,13 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs = {
89 .irqenable = OMAP1610_GPIO_IRQENABLE1, 93 .irqenable = OMAP1610_GPIO_IRQENABLE1,
90 .set_irqenable = OMAP1610_GPIO_SET_IRQENABLE1, 94 .set_irqenable = OMAP1610_GPIO_SET_IRQENABLE1,
91 .clr_irqenable = OMAP1610_GPIO_CLEAR_IRQENABLE1, 95 .clr_irqenable = OMAP1610_GPIO_CLEAR_IRQENABLE1,
96 .wkup_en = OMAP1610_GPIO_WAKEUPENABLE,
97 .edgectrl1 = OMAP1610_GPIO_EDGE_CTRL1,
98 .edgectrl2 = OMAP1610_GPIO_EDGE_CTRL2,
92}; 99};
93 100
94static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { 101static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = {
95 .virtual_irq_start = IH_GPIO_BASE, 102 .virtual_irq_start = IH_GPIO_BASE,
96 .bank_type = METHOD_GPIO_1610,
97 .bank_width = 16, 103 .bank_width = 16,
98 .regs = &omap16xx_gpio_regs, 104 .regs = &omap16xx_gpio_regs,
99}; 105};
@@ -123,7 +129,6 @@ static struct __initdata resource omap16xx_gpio2_resources[] = {
123 129
124static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { 130static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = {
125 .virtual_irq_start = IH_GPIO_BASE + 16, 131 .virtual_irq_start = IH_GPIO_BASE + 16,
126 .bank_type = METHOD_GPIO_1610,
127 .bank_width = 16, 132 .bank_width = 16,
128 .regs = &omap16xx_gpio_regs, 133 .regs = &omap16xx_gpio_regs,
129}; 134};
@@ -153,7 +158,6 @@ static struct __initdata resource omap16xx_gpio3_resources[] = {
153 158
154static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { 159static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = {
155 .virtual_irq_start = IH_GPIO_BASE + 32, 160 .virtual_irq_start = IH_GPIO_BASE + 32,
156 .bank_type = METHOD_GPIO_1610,
157 .bank_width = 16, 161 .bank_width = 16,
158 .regs = &omap16xx_gpio_regs, 162 .regs = &omap16xx_gpio_regs,
159}; 163};
@@ -183,7 +187,6 @@ static struct __initdata resource omap16xx_gpio4_resources[] = {
183 187
184static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { 188static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = {
185 .virtual_irq_start = IH_GPIO_BASE + 48, 189 .virtual_irq_start = IH_GPIO_BASE + 48,
186 .bank_type = METHOD_GPIO_1610,
187 .bank_width = 16, 190 .bank_width = 16,
188 .regs = &omap16xx_gpio_regs, 191 .regs = &omap16xx_gpio_regs,
189}; 192};
@@ -214,6 +217,10 @@ static struct __initdata platform_device * omap16xx_gpio_dev[] = {
214static int __init omap16xx_gpio_init(void) 217static int __init omap16xx_gpio_init(void)
215{ 218{
216 int i; 219 int i;
220 void __iomem *base;
221 struct resource *res;
222 struct platform_device *pdev;
223 struct omap_gpio_platform_data *pdata;
217 224
218 if (!cpu_is_omap16xx()) 225 if (!cpu_is_omap16xx())
219 return -EINVAL; 226 return -EINVAL;
@@ -225,10 +232,27 @@ static int __init omap16xx_gpio_init(void)
225 omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04, 232 omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
226 ULPD_CAM_CLK_CTRL); 233 ULPD_CAM_CLK_CTRL);
227 234
228 for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) 235 for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
229 platform_device_register(omap16xx_gpio_dev[i]); 236 pdev = omap16xx_gpio_dev[i];
237 pdata = pdev->dev.platform_data;
238
239 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
240 if (unlikely(!res)) {
241 dev_err(&pdev->dev, "Invalid mem resource.\n");
242 return -ENODEV;
243 }
230 244
231 gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev); 245 base = ioremap(res->start, resource_size(res));
246 if (unlikely(!base)) {
247 dev_err(&pdev->dev, "ioremap failed.\n");
248 return -ENOMEM;
249 }
250
251 __raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG);
252 iounmap(base);
253
254 platform_device_register(omap16xx_gpio_dev[i]);
255 }
232 256
233 return 0; 257 return 0;
234} 258}
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c
index 5ab63eab0ff5..4771d6b68b96 100644
--- a/arch/arm/mach-omap1/gpio7xx.c
+++ b/arch/arm/mach-omap1/gpio7xx.c
@@ -47,12 +47,13 @@ static struct omap_gpio_reg_offs omap7xx_mpuio_regs = {
47 .irqstatus = OMAP_MPUIO_GPIO_INT / 2, 47 .irqstatus = OMAP_MPUIO_GPIO_INT / 2,
48 .irqenable = OMAP_MPUIO_GPIO_MASKIT / 2, 48 .irqenable = OMAP_MPUIO_GPIO_MASKIT / 2,
49 .irqenable_inv = true, 49 .irqenable_inv = true,
50 .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE >> 1,
50}; 51};
51 52
52static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { 53static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = {
53 .virtual_irq_start = IH_MPUIO_BASE, 54 .virtual_irq_start = IH_MPUIO_BASE,
54 .bank_type = METHOD_MPUIO, 55 .is_mpuio = true,
55 .bank_width = 32, 56 .bank_width = 16,
56 .bank_stride = 2, 57 .bank_stride = 2,
57 .regs = &omap7xx_mpuio_regs, 58 .regs = &omap7xx_mpuio_regs,
58}; 59};
@@ -88,11 +89,11 @@ static struct omap_gpio_reg_offs omap7xx_gpio_regs = {
88 .irqstatus = OMAP7XX_GPIO_INT_STATUS, 89 .irqstatus = OMAP7XX_GPIO_INT_STATUS,
89 .irqenable = OMAP7XX_GPIO_INT_MASK, 90 .irqenable = OMAP7XX_GPIO_INT_MASK,
90 .irqenable_inv = true, 91 .irqenable_inv = true,
92 .irqctrl = OMAP7XX_GPIO_INT_CONTROL,
91}; 93};
92 94
93static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { 95static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = {
94 .virtual_irq_start = IH_GPIO_BASE, 96 .virtual_irq_start = IH_GPIO_BASE,
95 .bank_type = METHOD_GPIO_7XX,
96 .bank_width = 32, 97 .bank_width = 32,
97 .regs = &omap7xx_gpio_regs, 98 .regs = &omap7xx_gpio_regs,
98}; 99};
@@ -122,7 +123,6 @@ static struct __initdata resource omap7xx_gpio2_resources[] = {
122 123
123static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { 124static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = {
124 .virtual_irq_start = IH_GPIO_BASE + 32, 125 .virtual_irq_start = IH_GPIO_BASE + 32,
125 .bank_type = METHOD_GPIO_7XX,
126 .bank_width = 32, 126 .bank_width = 32,
127 .regs = &omap7xx_gpio_regs, 127 .regs = &omap7xx_gpio_regs,
128}; 128};
@@ -152,7 +152,6 @@ static struct __initdata resource omap7xx_gpio3_resources[] = {
152 152
153static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { 153static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = {
154 .virtual_irq_start = IH_GPIO_BASE + 64, 154 .virtual_irq_start = IH_GPIO_BASE + 64,
155 .bank_type = METHOD_GPIO_7XX,
156 .bank_width = 32, 155 .bank_width = 32,
157 .regs = &omap7xx_gpio_regs, 156 .regs = &omap7xx_gpio_regs,
158}; 157};
@@ -182,7 +181,6 @@ static struct __initdata resource omap7xx_gpio4_resources[] = {
182 181
183static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { 182static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = {
184 .virtual_irq_start = IH_GPIO_BASE + 96, 183 .virtual_irq_start = IH_GPIO_BASE + 96,
185 .bank_type = METHOD_GPIO_7XX,
186 .bank_width = 32, 184 .bank_width = 32,
187 .regs = &omap7xx_gpio_regs, 185 .regs = &omap7xx_gpio_regs,
188}; 186};
@@ -212,7 +210,6 @@ static struct __initdata resource omap7xx_gpio5_resources[] = {
212 210
213static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { 211static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = {
214 .virtual_irq_start = IH_GPIO_BASE + 128, 212 .virtual_irq_start = IH_GPIO_BASE + 128,
215 .bank_type = METHOD_GPIO_7XX,
216 .bank_width = 32, 213 .bank_width = 32,
217 .regs = &omap7xx_gpio_regs, 214 .regs = &omap7xx_gpio_regs,
218}; 215};
@@ -242,7 +239,6 @@ static struct __initdata resource omap7xx_gpio6_resources[] = {
242 239
243static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { 240static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = {
244 .virtual_irq_start = IH_GPIO_BASE + 160, 241 .virtual_irq_start = IH_GPIO_BASE + 160,
245 .bank_type = METHOD_GPIO_7XX,
246 .bank_width = 32, 242 .bank_width = 32,
247 .regs = &omap7xx_gpio_regs, 243 .regs = &omap7xx_gpio_regs,
248}; 244};
@@ -282,8 +278,6 @@ static int __init omap7xx_gpio_init(void)
282 for (i = 0; i < ARRAY_SIZE(omap7xx_gpio_dev); i++) 278 for (i = 0; i < ARRAY_SIZE(omap7xx_gpio_dev); i++)
283 platform_device_register(omap7xx_gpio_dev[i]); 279 platform_device_register(omap7xx_gpio_dev[i]);
284 280
285 gpio_bank_count = ARRAY_SIZE(omap7xx_gpio_dev);
286
287 return 0; 281 return 0;
288} 282}
289postcore_initcall(omap7xx_gpio_init); 283postcore_initcall(omap7xx_gpio_init);
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index f24c1e2c5044..2b28e1da14b0 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <asm/system_info.h>
18 19
19#include <plat/cpu.h> 20#include <plat/cpu.h>
20 21
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 56fb444a5f11..d969a7203d14 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -121,7 +121,7 @@ void __init omap16xx_map_io(void)
121/* 121/*
122 * Common low-level hardware init for omap1. 122 * Common low-level hardware init for omap1.
123 */ 123 */
124void omap1_init_early(void) 124void __init omap1_init_early(void)
125{ 125{
126 omap_check_revision(); 126 omap_check_revision();
127 127
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 123a0df63d48..86ace9aaa663 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -118,7 +118,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
118void omap_set_lcd_dma_b1_vxres(unsigned long vxres) 118void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
119{ 119{
120 if (cpu_is_omap15xx()) { 120 if (cpu_is_omap15xx()) {
121 printk(KERN_ERR "DMA virtual resulotion is not supported " 121 printk(KERN_ERR "DMA virtual resolution is not supported "
122 "in 1510 mode\n"); 122 "in 1510 mode\n");
123 BUG(); 123 BUG();
124 } 124 }
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 4b818eb9f911..f6b14a14a957 100644
--- a/arch/arm/mach-omap1/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -17,7 +17,6 @@
17 17
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19#include <asm/leds.h> 19#include <asm/leds.h>
20#include <asm/system.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22 21
23#include <plat/fpga.h> 22#include <plat/fpga.h>
diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index 9b99c2894623..3a066ee8d02c 100644
--- a/arch/arm/mach-omap1/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
@@ -5,7 +5,6 @@
5 5
6#include <mach/hardware.h> 6#include <mach/hardware.h>
7#include <asm/leds.h> 7#include <asm/leds.h>
8#include <asm/system.h>
9 8
10#include "leds.h" 9#include "leds.h"
11 10
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index da09f4364979..936ed426b84f 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -8,7 +8,6 @@
8 8
9#include <mach/hardware.h> 9#include <mach/hardware.h>
10#include <asm/leds.h> 10#include <asm/leds.h>
11#include <asm/system.h>
12 11
13#include "leds.h" 12#include "leds.h"
14 13
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 3082d60af082..adf00975b9bb 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -423,18 +423,6 @@ static int __init omap1_mcbsp_init(void)
423 return -ENODEV; 423 return -ENODEV;
424 424
425 if (cpu_is_omap7xx()) 425 if (cpu_is_omap7xx())
426 omap_mcbsp_count = OMAP7XX_MCBSP_COUNT;
427 else if (cpu_is_omap15xx())
428 omap_mcbsp_count = OMAP15XX_MCBSP_COUNT;
429 else if (cpu_is_omap16xx())
430 omap_mcbsp_count = OMAP16XX_MCBSP_COUNT;
431
432 mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *),
433 GFP_KERNEL);
434 if (!mcbsp_ptr)
435 return -ENOMEM;
436
437 if (cpu_is_omap7xx())
438 omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res_0, 426 omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res_0,
439 OMAP7XX_MCBSP_RES_SZ, 427 OMAP7XX_MCBSP_RES_SZ,
440 omap7xx_mcbsp_pdata, 428 omap7xx_mcbsp_pdata,
@@ -452,7 +440,7 @@ static int __init omap1_mcbsp_init(void)
452 omap16xx_mcbsp_pdata, 440 omap16xx_mcbsp_pdata,
453 OMAP16XX_MCBSP_COUNT); 441 OMAP16XX_MCBSP_COUNT);
454 442
455 return omap_mcbsp_init(); 443 return 0;
456} 444}
457 445
458arch_initcall(omap1_mcbsp_init); 446arch_initcall(omap1_mcbsp_init);
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 5fdef7a34828..087dba0df47e 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -27,7 +27,6 @@
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/spinlock.h> 28#include <linux/spinlock.h>
29 29
30#include <asm/system.h>
31 30
32#include <plat/mux.h> 31#include <plat/mux.h>
33 32
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 2fae6a2740f1..4d8dd9a1b04c 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -44,7 +44,6 @@
44#include <linux/clockchips.h> 44#include <linux/clockchips.h>
45#include <linux/io.h> 45#include <linux/io.h>
46 46
47#include <asm/system.h>
48#include <asm/leds.h> 47#include <asm/leds.h>
49#include <asm/irq.h> 48#include <asm/irq.h>
50#include <asm/sched_clock.h> 49#include <asm/sched_clock.h>
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index a2e6d0709df2..325b9a0aa4a0 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -46,7 +46,6 @@
46#include <linux/clockchips.h> 46#include <linux/clockchips.h>
47#include <linux/io.h> 47#include <linux/io.h>
48 48
49#include <asm/system.h>
50#include <asm/leds.h> 49#include <asm/leds.h>
51#include <asm/irq.h> 50#include <asm/irq.h>
52#include <asm/mach/irq.h> 51#include <asm/mach/irq.h>