diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-05 08:14:17 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-11-07 16:26:27 -0500 |
commit | 0191bf368fd95ecd4f83e62b0ad6de12048b14bf (patch) | |
tree | abd962268d5e58ef6c016474cb80c3f58fe4ea9e /arch/arm/mach-omap2/board-omap4panda.c | |
parent | cc0677979e3ef1ae25ea9db4edc63786a3731526 (diff) |
OMAP: panda: move display init from board file to dss-common.c
Device tree support for omapdss is still some way in the future. In an
effort to get a minimal DSS support for DT enabled kernel on selected
OMAP4 boards, we'll go for a temporary solution: We will call the same
non-DT omapdss setup code for OMAP4 SDP and Pandaboards from
board-generic.c, thus enabling DSS for those boards.
This patch moves the display setup code from board-omap4panda.c to
dss-common.c. dss-common.c will be called by the board-omap4panda.c when
running on non-DT kernel, and by board-generic.c when running on DT
enabled kernel.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 68 |
1 files changed, 1 insertions, 67 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index bfcd397e233c..ab505a21f703 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -36,26 +36,22 @@ | |||
36 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
39 | #include <video/omapdss.h> | ||
40 | 39 | ||
41 | #include "common.h" | 40 | #include "common.h" |
42 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
43 | #include <plat/mmc.h> | 42 | #include <plat/mmc.h> |
44 | #include <video/omap-panel-tfp410.h> | ||
45 | 43 | ||
46 | #include "soc.h" | 44 | #include "soc.h" |
47 | #include "hsmmc.h" | 45 | #include "hsmmc.h" |
48 | #include "control.h" | 46 | #include "control.h" |
49 | #include "mux.h" | 47 | #include "mux.h" |
50 | #include "common-board-devices.h" | 48 | #include "common-board-devices.h" |
49 | #include "dss-common.h" | ||
51 | 50 | ||
52 | #define GPIO_HUB_POWER 1 | 51 | #define GPIO_HUB_POWER 1 |
53 | #define GPIO_HUB_NRESET 62 | 52 | #define GPIO_HUB_NRESET 62 |
54 | #define GPIO_WIFI_PMENA 43 | 53 | #define GPIO_WIFI_PMENA 43 |
55 | #define GPIO_WIFI_IRQ 53 | 54 | #define GPIO_WIFI_IRQ 53 |
56 | #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ | ||
57 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | ||
58 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
59 | 55 | ||
60 | /* wl127x BT, FM, GPS connectivity chip */ | 56 | /* wl127x BT, FM, GPS connectivity chip */ |
61 | static struct ti_st_plat_data wilink_platform_data = { | 57 | static struct ti_st_plat_data wilink_platform_data = { |
@@ -409,68 +405,6 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
409 | #define board_mux NULL | 405 | #define board_mux NULL |
410 | #endif | 406 | #endif |
411 | 407 | ||
412 | /* Display DVI */ | ||
413 | #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 | ||
414 | |||
415 | /* Using generic display panel */ | ||
416 | static struct tfp410_platform_data omap4_dvi_panel = { | ||
417 | .i2c_bus_num = 3, | ||
418 | .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, | ||
419 | }; | ||
420 | |||
421 | static struct omap_dss_device omap4_panda_dvi_device = { | ||
422 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
423 | .name = "dvi", | ||
424 | .driver_name = "tfp410", | ||
425 | .data = &omap4_dvi_panel, | ||
426 | .phy.dpi.data_lines = 24, | ||
427 | .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, | ||
428 | .channel = OMAP_DSS_CHANNEL_LCD2, | ||
429 | }; | ||
430 | |||
431 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { | ||
432 | .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, | ||
433 | .ls_oe_gpio = HDMI_GPIO_LS_OE, | ||
434 | .hpd_gpio = HDMI_GPIO_HPD, | ||
435 | }; | ||
436 | |||
437 | static struct omap_dss_device omap4_panda_hdmi_device = { | ||
438 | .name = "hdmi", | ||
439 | .driver_name = "hdmi_panel", | ||
440 | .type = OMAP_DISPLAY_TYPE_HDMI, | ||
441 | .channel = OMAP_DSS_CHANNEL_DIGIT, | ||
442 | .data = &omap4_panda_hdmi_data, | ||
443 | }; | ||
444 | |||
445 | static struct omap_dss_device *omap4_panda_dss_devices[] = { | ||
446 | &omap4_panda_dvi_device, | ||
447 | &omap4_panda_hdmi_device, | ||
448 | }; | ||
449 | |||
450 | static struct omap_dss_board_info omap4_panda_dss_data = { | ||
451 | .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), | ||
452 | .devices = omap4_panda_dss_devices, | ||
453 | .default_device = &omap4_panda_dvi_device, | ||
454 | }; | ||
455 | |||
456 | static void __init omap4_panda_display_init(void) | ||
457 | { | ||
458 | |||
459 | omap_display_init(&omap4_panda_dss_data); | ||
460 | |||
461 | /* | ||
462 | * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and | ||
463 | * later have external pull up on the HDMI I2C lines | ||
464 | */ | ||
465 | if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2) | ||
466 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | ||
467 | else | ||
468 | omap_hdmi_init(0); | ||
469 | |||
470 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
471 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
472 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
473 | } | ||
474 | 408 | ||
475 | static void omap4_panda_init_rev(void) | 409 | static void omap4_panda_init_rev(void) |
476 | { | 410 | { |