diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-20 08:23:13 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-23 02:39:23 -0500 |
commit | ddba6c7f7ec6a82ccbce4126d615e73e00b4be12 (patch) | |
tree | 6dfd41afcce098982958c2cd137f57a85fc25462 /arch | |
parent | f060f95365ce71acbf29ef5dac580ab067600f4c (diff) |
OMAP1: pass LCD config with omapfb_set_lcd_config()
LCD config for old omapfb driver is passed with OMAP_TAG_LCD from board
files or from the bootloader. In an effort to remove OMAP_TAG_LCD, this
patch adds omapfb_set_lcd_config() function that the board files can
call to set the LCD config.
This has the drawback that configuration can no longer come from the
bootloader. Of the boards supported by the kernel, this should only
affect N770 which depends on the data from the bootloader. This patch
adds an LCD config for N770 to its board files, but that is most
probably broken. Fixing this would need information about the HW setup
in N770 boards.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 9 | ||||
-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-htcherald.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 10 | ||||
-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 | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/fb.c | 22 |
14 files changed, 62 insertions, 92 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 88909cc0b254..e0e8245f3c9f 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
22 | #include <linux/export.h> | 22 | #include <linux/export.h> |
23 | #include <linux/omapfb.h> | ||
23 | 24 | ||
24 | #include <media/soc_camera.h> | 25 | #include <media/soc_camera.h> |
25 | 26 | ||
@@ -169,10 +170,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { | |||
169 | .pins[0] = 2, | 170 | .pins[0] = 2, |
170 | }; | 171 | }; |
171 | 172 | ||
172 | static struct omap_board_config_kernel ams_delta_config[] __initdata = { | ||
173 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, | ||
174 | }; | ||
175 | |||
176 | static struct resource ams_delta_nand_resources[] = { | 173 | static struct resource ams_delta_nand_resources[] = { |
177 | [0] = { | 174 | [0] = { |
178 | .start = OMAP1_MPUIO_BASE, | 175 | .start = OMAP1_MPUIO_BASE, |
@@ -302,8 +299,6 @@ static void __init ams_delta_init(void) | |||
302 | omap_cfg_reg(J19_1610_CAM_D6); | 299 | omap_cfg_reg(J19_1610_CAM_D6); |
303 | omap_cfg_reg(J18_1610_CAM_D7); | 300 | omap_cfg_reg(J18_1610_CAM_D7); |
304 | 301 | ||
305 | omap_board_config = ams_delta_config; | ||
306 | omap_board_config_size = ARRAY_SIZE(ams_delta_config); | ||
307 | omap_serial_init(); | 302 | omap_serial_init(); |
308 | omap_register_i2c_bus(1, 100, NULL, 0); | 303 | omap_register_i2c_bus(1, 100, NULL, 0); |
309 | 304 | ||
@@ -321,6 +316,8 @@ static void __init ams_delta_init(void) | |||
321 | ams_delta_init_fiq(); | 316 | ams_delta_init_fiq(); |
322 | 317 | ||
323 | omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1); | 318 | omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1); |
319 | |||
320 | omapfb_set_lcd_config(&ams_delta_lcd_config); | ||
324 | } | 321 | } |
325 | 322 | ||
326 | static struct plat_serial8250_port ams_delta_modem_ports[] = { | 323 | static struct plat_serial8250_port ams_delta_modem_ports[] = { |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 0b9464b41212..b00844f7414d 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 <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
@@ -290,10 +291,6 @@ static struct omap_lcd_config fsample_lcd_config = { | |||
290 | .ctrl_name = "internal", | 291 | .ctrl_name = "internal", |
291 | }; | 292 | }; |
292 | 293 | ||
293 | static struct omap_board_config_kernel fsample_config[] __initdata = { | ||
294 | { OMAP_TAG_LCD, &fsample_lcd_config }, | ||
295 | }; | ||
296 | |||
297 | static void __init omap_fsample_init(void) | 294 | static void __init omap_fsample_init(void) |
298 | { | 295 | { |
299 | /* Early, board-dependent init */ | 296 | /* Early, board-dependent init */ |
@@ -352,10 +349,10 @@ static void __init omap_fsample_init(void) | |||
352 | 349 | ||
353 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 350 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
354 | 351 | ||
355 | omap_board_config = fsample_config; | ||
356 | omap_board_config_size = ARRAY_SIZE(fsample_config); | ||
357 | omap_serial_init(); | 352 | omap_serial_init(); |
358 | omap_register_i2c_bus(1, 100, NULL, 0); | 353 | omap_register_i2c_bus(1, 100, NULL, 0); |
354 | |||
355 | omapfb_set_lcd_config(&fsample_lcd_config); | ||
359 | } | 356 | } |
360 | 357 | ||
361 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 358 | /* 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 00ad6b22d60a..471233fe147a 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 <mach/hardware.h> | 35 | #include <mach/hardware.h> |
35 | 36 | ||
@@ -391,10 +392,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = { | |||
391 | .ctrl_name = "internal", | 392 | .ctrl_name = "internal", |
392 | }; | 393 | }; |
393 | 394 | ||
394 | static struct omap_board_config_kernel h2_config[] __initdata = { | ||
395 | { OMAP_TAG_LCD, &h2_lcd_config }, | ||
396 | }; | ||
397 | |||
398 | static void __init h2_init(void) | 395 | static void __init h2_init(void) |
399 | { | 396 | { |
400 | h2_init_smc91x(); | 397 | h2_init_smc91x(); |
@@ -438,13 +435,13 @@ static void __init h2_init(void) | |||
438 | omap_cfg_reg(N19_1610_KBR5); | 435 | omap_cfg_reg(N19_1610_KBR5); |
439 | 436 | ||
440 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 437 | 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(); | 438 | omap_serial_init(); |
444 | omap_register_i2c_bus(1, 100, h2_i2c_board_info, | 439 | omap_register_i2c_bus(1, 100, h2_i2c_board_info, |
445 | ARRAY_SIZE(h2_i2c_board_info)); | 440 | ARRAY_SIZE(h2_i2c_board_info)); |
446 | omap1_usb_init(&h2_usb_config); | 441 | omap1_usb_init(&h2_usb_config); |
447 | h2_mmc_init(); | 442 | h2_mmc_init(); |
443 | |||
444 | omapfb_set_lcd_config(&h2_lcd_config); | ||
448 | } | 445 | } |
449 | 446 | ||
450 | MACHINE_START(OMAP_H2, "TI-H2") | 447 | MACHINE_START(OMAP_H2, "TI-H2") |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4a7f25149703..7cfd25b90735 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 | ||
373 | static struct omap_board_config_kernel h3_config[] __initdata = { | ||
374 | { OMAP_TAG_LCD, &h3_lcd_config }, | ||
375 | }; | ||
376 | |||
377 | static struct i2c_board_info __initdata h3_i2c_board_info[] = { | 374 | static 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 | ||
438 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | 435 | MACHINE_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 731cc3db7ab3..af2afcf24f75 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> |
@@ -398,10 +399,6 @@ static struct omap_lcd_config htcherald_lcd_config __initdata = { | |||
398 | .ctrl_name = "internal", | 399 | .ctrl_name = "internal", |
399 | }; | 400 | }; |
400 | 401 | ||
401 | static struct omap_board_config_kernel htcherald_config[] __initdata = { | ||
402 | { OMAP_TAG_LCD, &htcherald_lcd_config }, | ||
403 | }; | ||
404 | |||
405 | static struct platform_device lcd_device = { | 402 | static struct platform_device lcd_device = { |
406 | .name = "lcd_htcherald", | 403 | .name = "lcd_htcherald", |
407 | .id = -1, | 404 | .id = -1, |
@@ -580,8 +577,6 @@ static void __init htcherald_init(void) | |||
580 | printk(KERN_INFO "HTC Herald init.\n"); | 577 | printk(KERN_INFO "HTC Herald init.\n"); |
581 | 578 | ||
582 | /* Do board initialization before we register all the devices */ | 579 | /* Do board initialization before we register all the devices */ |
583 | omap_board_config = htcherald_config; | ||
584 | omap_board_config_size = ARRAY_SIZE(htcherald_config); | ||
585 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 580 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
586 | 581 | ||
587 | htcherald_disable_watchdog(); | 582 | htcherald_disable_watchdog(); |
@@ -598,6 +593,8 @@ static void __init htcherald_init(void) | |||
598 | htc_mmc_data[0] = &htc_mmc1_data; | 593 | htc_mmc_data[0] = &htc_mmc1_data; |
599 | omap1_init_mmc(htc_mmc_data, 1); | 594 | omap1_init_mmc(htc_mmc_data, 1); |
600 | #endif | 595 | #endif |
596 | |||
597 | omapfb_set_lcd_config(&htcherald_lcd_config); | ||
601 | } | 598 | } |
602 | 599 | ||
603 | MACHINE_START(HERALD, "HTC Herald") | 600 | MACHINE_START(HERALD, "HTC Herald") |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 309369ea6978..1d5ab6606b9f 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 <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -370,10 +371,6 @@ static inline void innovator_mmc_init(void) | |||
370 | } | 371 | } |
371 | #endif | 372 | #endif |
372 | 373 | ||
373 | static struct omap_board_config_kernel innovator_config[] = { | ||
374 | { OMAP_TAG_LCD, NULL }, | ||
375 | }; | ||
376 | |||
377 | static void __init innovator_init(void) | 374 | static void __init innovator_init(void) |
378 | { | 375 | { |
379 | if (cpu_is_omap1510()) | 376 | if (cpu_is_omap1510()) |
@@ -416,17 +413,15 @@ static void __init innovator_init(void) | |||
416 | #ifdef CONFIG_ARCH_OMAP15XX | 413 | #ifdef CONFIG_ARCH_OMAP15XX |
417 | if (cpu_is_omap1510()) { | 414 | if (cpu_is_omap1510()) { |
418 | omap1_usb_init(&innovator1510_usb_config); | 415 | omap1_usb_init(&innovator1510_usb_config); |
419 | innovator_config[1].data = &innovator1510_lcd_config; | 416 | omapfb_set_lcd_config(&innovator1510_lcd_config); |
420 | } | 417 | } |
421 | #endif | 418 | #endif |
422 | #ifdef CONFIG_ARCH_OMAP16XX | 419 | #ifdef CONFIG_ARCH_OMAP16XX |
423 | if (cpu_is_omap1610()) { | 420 | if (cpu_is_omap1610()) { |
424 | omap1_usb_init(&h2_usb_config); | 421 | omap1_usb_init(&h2_usb_config); |
425 | innovator_config[1].data = &innovator1610_lcd_config; | 422 | omapfb_set_lcd_config(&innovator1610_lcd_config); |
426 | } | 423 | } |
427 | #endif | 424 | #endif |
428 | omap_board_config = innovator_config; | ||
429 | omap_board_config_size = ARRAY_SIZE(innovator_config); | ||
430 | omap_serial_init(); | 425 | omap_serial_init(); |
431 | omap_register_i2c_bus(1, 100, NULL, 0); | 426 | omap_register_i2c_bus(1, 100, NULL, 0); |
432 | innovator_mmc_init(); | 427 | innovator_mmc_init(); |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 7155d8ce516a..9b6332a31fb6 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -98,15 +98,16 @@ static struct mipid_platform_data nokia770_mipid_platform_data = { | |||
98 | .shutdown = mipid_shutdown, | 98 | .shutdown = mipid_shutdown, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static struct omap_lcd_config nokia770_lcd_config __initdata = { | ||
102 | .ctrl_name = "hwa742", | ||
103 | }; | ||
104 | |||
101 | static void __init mipid_dev_init(void) | 105 | static void __init mipid_dev_init(void) |
102 | { | 106 | { |
103 | const struct omap_lcd_config *conf; | 107 | nokia770_mipid_platform_data.nreset_gpio = 13; |
108 | nokia770_mipid_platform_data.data_lines = 16; | ||
104 | 109 | ||
105 | conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); | 110 | omapfb_set_lcd_config(&nokia770_lcd_config); |
106 | if (conf != NULL) { | ||
107 | nokia770_mipid_platform_data.nreset_gpio = conf->nreset_gpio; | ||
108 | nokia770_mipid_platform_data.data_lines = conf->data_lines; | ||
109 | } | ||
110 | } | 111 | } |
111 | 112 | ||
112 | static void __init ads7846_dev_init(void) | 113 | static void __init ads7846_dev_init(void) |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 675de06557aa..ef874655fbd3 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 | 38 | ||
38 | #include <linux/mtd/mtd.h> | 39 | #include <linux/mtd/mtd.h> |
39 | #include <linux/mtd/partitions.h> | 40 | #include <linux/mtd/partitions.h> |
@@ -300,12 +301,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = { | |||
300 | }; | 301 | }; |
301 | #endif | 302 | #endif |
302 | 303 | ||
303 | static struct omap_board_config_kernel osk_config[] __initdata = { | ||
304 | #ifdef CONFIG_OMAP_OSK_MISTRAL | ||
305 | { OMAP_TAG_LCD, &osk_lcd_config }, | ||
306 | #endif | ||
307 | }; | ||
308 | |||
309 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 304 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
310 | 305 | ||
311 | #include <linux/input.h> | 306 | #include <linux/input.h> |
@@ -549,8 +544,6 @@ static void __init osk_init(void) | |||
549 | osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); | 544 | osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); |
550 | osk_flash_resource.end += SZ_32M - 1; | 545 | osk_flash_resource.end += SZ_32M - 1; |
551 | platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); | 546 | platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); |
552 | omap_board_config = osk_config; | ||
553 | omap_board_config_size = ARRAY_SIZE(osk_config); | ||
554 | 547 | ||
555 | l = omap_readl(USB_TRANSCEIVER_CTRL); | 548 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
556 | l |= (3 << 1); | 549 | l |= (3 << 1); |
@@ -567,6 +560,11 @@ static void __init osk_init(void) | |||
567 | omap_register_i2c_bus(1, 400, osk_i2c_board_info, | 560 | omap_register_i2c_bus(1, 400, osk_i2c_board_info, |
568 | ARRAY_SIZE(osk_i2c_board_info)); | 561 | ARRAY_SIZE(osk_i2c_board_info)); |
569 | osk_mistral_init(); | 562 | osk_mistral_init(); |
563 | |||
564 | #ifdef CONFIG_OMAP_OSK_MISTRAL | ||
565 | omapfb_set_lcd_config(&osk_lcd_config); | ||
566 | #endif | ||
567 | |||
570 | } | 568 | } |
571 | 569 | ||
572 | MACHINE_START(OMAP_OSK, "TI-OSK") | 570 | MACHINE_START(OMAP_OSK, "TI-OSK") |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 81fa27f88369..612342cb2a2d 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 <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
@@ -209,10 +210,6 @@ static struct omap_lcd_config palmte_lcd_config __initdata = { | |||
209 | .ctrl_name = "internal", | 210 | .ctrl_name = "internal", |
210 | }; | 211 | }; |
211 | 212 | ||
212 | static struct omap_board_config_kernel palmte_config[] __initdata = { | ||
213 | { OMAP_TAG_LCD, &palmte_lcd_config }, | ||
214 | }; | ||
215 | |||
216 | static struct spi_board_info palmte_spi_info[] __initdata = { | 213 | static struct spi_board_info palmte_spi_info[] __initdata = { |
217 | { | 214 | { |
218 | .modalias = "tsc2102", | 215 | .modalias = "tsc2102", |
@@ -250,9 +247,6 @@ static void __init omap_palmte_init(void) | |||
250 | omap_cfg_reg(UART3_TX); | 247 | omap_cfg_reg(UART3_TX); |
251 | omap_cfg_reg(UART3_RX); | 248 | omap_cfg_reg(UART3_RX); |
252 | 249 | ||
253 | omap_board_config = palmte_config; | ||
254 | omap_board_config_size = ARRAY_SIZE(palmte_config); | ||
255 | |||
256 | platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices)); | 250 | platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices)); |
257 | 251 | ||
258 | spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info)); | 252 | spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info)); |
@@ -260,6 +254,8 @@ static void __init omap_palmte_init(void) | |||
260 | omap_serial_init(); | 254 | omap_serial_init(); |
261 | omap1_usb_init(&palmte_usb_config); | 255 | omap1_usb_init(&palmte_usb_config); |
262 | omap_register_i2c_bus(1, 100, NULL, 0); | 256 | omap_register_i2c_bus(1, 100, NULL, 0); |
257 | |||
258 | omapfb_set_lcd_config(&palmte_lcd_config); | ||
263 | } | 259 | } |
264 | 260 | ||
265 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") | 261 | MACHINE_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 81cb82178388..b63350bc88fd 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 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -273,10 +274,6 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = { | |||
273 | .ctrl_name = "internal", | 274 | .ctrl_name = "internal", |
274 | }; | 275 | }; |
275 | 276 | ||
276 | static struct omap_board_config_kernel palmtt_config[] __initdata = { | ||
277 | { OMAP_TAG_LCD, &palmtt_lcd_config }, | ||
278 | }; | ||
279 | |||
280 | static void __init omap_mpu_wdt_mode(int mode) { | 277 | static void __init omap_mpu_wdt_mode(int mode) { |
281 | if (mode) | 278 | if (mode) |
282 | omap_writew(0x8000, OMAP_WDT_TIMER_MODE); | 279 | omap_writew(0x8000, OMAP_WDT_TIMER_MODE); |
@@ -298,15 +295,14 @@ static void __init omap_palmtt_init(void) | |||
298 | 295 | ||
299 | omap_mpu_wdt_mode(0); | 296 | omap_mpu_wdt_mode(0); |
300 | 297 | ||
301 | omap_board_config = palmtt_config; | ||
302 | omap_board_config_size = ARRAY_SIZE(palmtt_config); | ||
303 | |||
304 | platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices)); | 298 | platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices)); |
305 | 299 | ||
306 | spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo)); | 300 | spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo)); |
307 | omap_serial_init(); | 301 | omap_serial_init(); |
308 | omap1_usb_init(&palmtt_usb_config); | 302 | omap1_usb_init(&palmtt_usb_config); |
309 | omap_register_i2c_bus(1, 100, NULL, 0); | 303 | omap_register_i2c_bus(1, 100, NULL, 0); |
304 | |||
305 | omapfb_set_lcd_config(&palmtt_lcd_config); | ||
310 | } | 306 | } |
311 | 307 | ||
312 | MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") | 308 | MACHINE_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 e881945ce8ec..9924c70af09f 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 | 31 | ||
31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
@@ -239,10 +240,6 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = { | |||
239 | .ctrl_name = "internal", | 240 | .ctrl_name = "internal", |
240 | }; | 241 | }; |
241 | 242 | ||
242 | static struct omap_board_config_kernel palmz71_config[] __initdata = { | ||
243 | {OMAP_TAG_LCD, &palmz71_lcd_config}, | ||
244 | }; | ||
245 | |||
246 | static irqreturn_t | 243 | static irqreturn_t |
247 | palmz71_powercable(int irq, void *dev_id) | 244 | palmz71_powercable(int irq, void *dev_id) |
248 | { | 245 | { |
@@ -313,9 +310,6 @@ omap_palmz71_init(void) | |||
313 | palmz71_gpio_setup(1); | 310 | palmz71_gpio_setup(1); |
314 | omap_mpu_wdt_mode(0); | 311 | omap_mpu_wdt_mode(0); |
315 | 312 | ||
316 | omap_board_config = palmz71_config; | ||
317 | omap_board_config_size = ARRAY_SIZE(palmz71_config); | ||
318 | |||
319 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 313 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
320 | 314 | ||
321 | spi_register_board_info(palmz71_boardinfo, | 315 | spi_register_board_info(palmz71_boardinfo, |
@@ -324,6 +318,8 @@ omap_palmz71_init(void) | |||
324 | omap_serial_init(); | 318 | omap_serial_init(); |
325 | omap_register_i2c_bus(1, 100, NULL, 0); | 319 | omap_register_i2c_bus(1, 100, NULL, 0); |
326 | palmz71_gpio_setup(0); | 320 | palmz71_gpio_setup(0); |
321 | |||
322 | omapfb_set_lcd_config(&palmz71_lcd_config); | ||
327 | } | 323 | } |
328 | 324 | ||
329 | MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") | 325 | MACHINE_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 c000bed76276..44df93172653 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 <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
@@ -249,10 +250,6 @@ static struct omap_lcd_config perseus2_lcd_config __initdata = { | |||
249 | .ctrl_name = "internal", | 250 | .ctrl_name = "internal", |
250 | }; | 251 | }; |
251 | 252 | ||
252 | static struct omap_board_config_kernel perseus2_config[] __initdata = { | ||
253 | { OMAP_TAG_LCD, &perseus2_lcd_config }, | ||
254 | }; | ||
255 | |||
256 | static void __init perseus2_init_smc91x(void) | 253 | static void __init perseus2_init_smc91x(void) |
257 | { | 254 | { |
258 | fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); | 255 | fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); |
@@ -320,10 +317,10 @@ static void __init omap_perseus2_init(void) | |||
320 | 317 | ||
321 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 318 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
322 | 319 | ||
323 | omap_board_config = perseus2_config; | ||
324 | omap_board_config_size = ARRAY_SIZE(perseus2_config); | ||
325 | omap_serial_init(); | 320 | omap_serial_init(); |
326 | omap_register_i2c_bus(1, 100, NULL, 0); | 321 | omap_register_i2c_bus(1, 100, NULL, 0); |
322 | |||
323 | omapfb_set_lcd_config(&perseus2_lcd_config); | ||
327 | } | 324 | } |
328 | 325 | ||
329 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 326 | /* 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 7bcd82ab0fd0..0c880be11276 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 <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
@@ -371,11 +372,6 @@ static struct platform_device *sx1_devices[] __initdata = { | |||
371 | &sx1_lcd_device, | 372 | &sx1_lcd_device, |
372 | &sx1_irda_device, | 373 | &sx1_irda_device, |
373 | }; | 374 | }; |
374 | /*-----------------------------------------*/ | ||
375 | |||
376 | static struct omap_board_config_kernel sx1_config[] __initdata = { | ||
377 | { OMAP_TAG_LCD, &sx1_lcd_config }, | ||
378 | }; | ||
379 | 375 | ||
380 | /*-----------------------------------------*/ | 376 | /*-----------------------------------------*/ |
381 | 377 | ||
@@ -391,8 +387,6 @@ static void __init omap_sx1_init(void) | |||
391 | 387 | ||
392 | platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices)); | 388 | platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices)); |
393 | 389 | ||
394 | omap_board_config = sx1_config; | ||
395 | omap_board_config_size = ARRAY_SIZE(sx1_config); | ||
396 | omap_serial_init(); | 390 | omap_serial_init(); |
397 | omap_register_i2c_bus(1, 100, NULL, 0); | 391 | omap_register_i2c_bus(1, 100, NULL, 0); |
398 | omap1_usb_init(&sx1_usb_config); | 392 | omap1_usb_init(&sx1_usb_config); |
@@ -406,6 +400,8 @@ static void __init omap_sx1_init(void) | |||
406 | gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */ | 400 | gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */ |
407 | gpio_direction_output(11, 0); /*A_SWITCH = 0 */ | 401 | gpio_direction_output(11, 0); /*A_SWITCH = 0 */ |
408 | gpio_direction_output(15, 0); /*A_USB_ON = 0 */ | 402 | gpio_direction_output(15, 0); /*A_USB_ON = 0 */ |
403 | |||
404 | omapfb_set_lcd_config(&sx1_lcd_config); | ||
409 | } | 405 | } |
410 | 406 | ||
411 | MACHINE_START(SX1, "OMAP310 based Siemens SX1") | 407 | MACHINE_START(SX1, "OMAP310 based Siemens SX1") |
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 45f35c983f44..24e62693b809 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) | 38 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) |
39 | 39 | ||
40 | static bool omapfb_lcd_configured; | ||
40 | static struct omapfb_platform_data omapfb_config; | 41 | static struct omapfb_platform_data omapfb_config; |
41 | 42 | ||
42 | static u64 omap_fb_dma_mask = ~(u32)0; | 43 | static u64 omap_fb_dma_mask = ~(u32)0; |
@@ -52,16 +53,21 @@ static struct platform_device omap_fb_device = { | |||
52 | .num_resources = 0, | 53 | .num_resources = 0, |
53 | }; | 54 | }; |
54 | 55 | ||
55 | static int __init omap_init_fb(void) | 56 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) |
56 | { | 57 | { |
57 | const struct omap_lcd_config *conf; | 58 | omapfb_config.lcd = *config; |
59 | omapfb_lcd_configured = true; | ||
60 | } | ||
58 | 61 | ||
59 | conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); | 62 | static int __init omap_init_fb(void) |
60 | if (conf == NULL) | 63 | { |
64 | /* | ||
65 | * If the board file has not set the lcd config with | ||
66 | * omapfb_set_lcd_config(), don't bother registering the omapfb device | ||
67 | */ | ||
68 | if (!omapfb_lcd_configured) | ||
61 | return 0; | 69 | return 0; |
62 | 70 | ||
63 | omapfb_config.lcd = *conf; | ||
64 | |||
65 | return platform_device_register(&omap_fb_device); | 71 | return platform_device_register(&omap_fb_device); |
66 | } | 72 | } |
67 | 73 | ||
@@ -90,4 +96,8 @@ static int __init omap_init_fb(void) | |||
90 | 96 | ||
91 | arch_initcall(omap_init_fb); | 97 | arch_initcall(omap_init_fb); |
92 | 98 | ||
99 | #else | ||
100 | |||
101 | void __init omapfb_set_lcd_config(omap_lcd_config *config) { } | ||
102 | |||
93 | #endif | 103 | #endif |