From: Stephen Rothwell Date: Tue, 4 Oct 2011 04:06:22 +0000 (+1100) Subject: Merge remote-tracking branch 'omap_dss2/for-next' X-Git-Tag: next-20111004~36 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5d33fe3f7af36dcc63f696b2f3971f6bec2d64a1;p=karo-tx-linux.git Merge remote-tracking branch 'omap_dss2/for-next' Conflicts: arch/arm/mach-omap2/board-2430sdp.c arch/arm/mach-omap2/board-4430sdp.c arch/arm/mach-omap2/board-apollon.c arch/arm/mach-omap2/board-h4.c arch/arm/mach-omap2/board-ldp.c arch/arm/mach-omap2/board-rx51.c drivers/video/omap/lcd_apollon.c drivers/video/omap/lcd_ldp.c drivers/video/omap/lcd_overo.c --- 5d33fe3f7af36dcc63f696b2f3971f6bec2d64a1 diff --cc arch/arm/mach-omap2/board-2430sdp.c index 4191743e2a58,6ab6350b0157..ba7d92bbf49a --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@@ -137,10 -192,12 +192,6 @@@ static inline void board_smc91x_init(vo #endif - static struct omap_board_config_kernel sdp2430_config[] __initdata = { - {OMAP_TAG_LCD, &sdp2430_lcd_config}, - }; -static void __init omap_2430sdp_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(NULL, NULL); -} -- static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; diff --cc arch/arm/mach-omap2/board-4430sdp.c index f3917b3e12d6,d3874a68b059..4d0c8b9c644a --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@@ -381,14 -379,12 +379,6 @@@ static struct platform_device *sdp4430_ &sdp4430_vbat, }; - static struct omap_lcd_config sdp4430_lcd_config __initdata = { - .ctrl_name = "internal", - }; - - static struct omap_board_config_kernel sdp4430_config[] __initdata = { - { OMAP_TAG_LCD, &sdp4430_lcd_config }, - }; -static void __init omap_4430sdp_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(NULL, NULL); -} -- static struct omap_musb_board_data musb_board_data = { .interface_type = MUSB_INTERFACE_UTMI, .mode = MUSB_OTG, diff --cc arch/arm/mach-omap2/board-apollon.c index 868d5f0af29e,d8eb81e7d318..66f38425a20e --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@@ -265,14 -262,34 +262,28 @@@ static struct omap_usb_config apollon_u .pins[0] = 6, }; - static struct omap_lcd_config apollon_lcd_config __initdata = { - .ctrl_name = "internal", + static struct panel_generic_dpi_data apollon_panel_data = { + .name = "apollon", }; - static struct omap_board_config_kernel apollon_config[] __initdata = { - { OMAP_TAG_LCD, &apollon_lcd_config }, + static struct omap_dss_device apollon_lcd_device = { + .name = "lcd", + .driver_name = "generic_dpi_panel", + .type = OMAP_DISPLAY_TYPE_DPI, + .phy.dpi.data_lines = 18, + .data = &apollon_panel_data, + }; + + static struct omap_dss_device *apollon_dss_devices[] = { + &apollon_lcd_device, + }; + + static struct omap_dss_board_info apollon_dss_data = { + .num_devices = ARRAY_SIZE(apollon_dss_devices), + .devices = apollon_dss_devices, + .default_device = &apollon_lcd_device, }; -static void __init omap_apollon_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(NULL, NULL); -} - static struct gpio apollon_gpio_leds[] __initdata = { { LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */ { LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */ @@@ -334,7 -349,8 +343,9 @@@ static void __init omap_apollon_init(vo */ platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); omap_serial_init(); + omap_sdrc_init(NULL, NULL); + + omap_display_init(&apollon_dss_data); } static void __init omap_apollon_map_io(void) diff --cc arch/arm/mach-omap2/board-h4.c index f0ddc273a3cc,f7c09de2ed1c..ba814844d8d0 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@@ -285,10 -301,12 +300,6 @@@ static struct omap_usb_config h4_usb_co .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ }; - static struct omap_board_config_kernel h4_config[] __initdata = { - { OMAP_TAG_LCD, &h4_lcd_config }, - }; -static void __init omap_h4_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(NULL, NULL); -} -- static void __init omap_h4_init_irq(void) { omap2_init_irq(); @@@ -364,8 -379,9 +372,10 @@@ static void __init omap_h4_init(void platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); omap2_usbfs_init(&h4_usb_config); omap_serial_init(); + omap_sdrc_init(NULL, NULL); h4_init_flash(); + + omap_display_init(&h4_dss_data); } static void __init omap_h4_map_io(void) diff --cc arch/arm/mach-omap2/board-ldp.c index 57979175cff3,689ed499bdfd..e179da0c4da5 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@@ -179,19 -183,103 +183,97 @@@ static inline void __init ldp_init_smsc gpmc_smsc911x_init(&smsc911x_cfg); } - static struct platform_device ldp_lcd_device = { - .name = "ldp_lcd", - .id = -1, + /* LCD */ + + static int ldp_backlight_gpio; + static int ldp_lcd_enable_gpio; + + #define LCD_PANEL_RESET_GPIO 55 + #define LCD_PANEL_QVGA_GPIO 56 + + static int ldp_panel_enable_lcd(struct omap_dss_device *dssdev) + { + if (gpio_is_valid(ldp_lcd_enable_gpio)) + gpio_direction_output(ldp_lcd_enable_gpio, 1); + if (gpio_is_valid(ldp_backlight_gpio)) + gpio_direction_output(ldp_backlight_gpio, 1); + + return 0; + } + + static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev) + { + if (gpio_is_valid(ldp_lcd_enable_gpio)) + gpio_direction_output(ldp_lcd_enable_gpio, 0); + if (gpio_is_valid(ldp_backlight_gpio)) + gpio_direction_output(ldp_backlight_gpio, 0); + } + + static struct panel_generic_dpi_data ldp_panel_data = { + .name = "nec_nl2432dr22-11b", + .platform_enable = ldp_panel_enable_lcd, + .platform_disable = ldp_panel_disable_lcd, }; - static struct omap_lcd_config ldp_lcd_config __initdata = { - .ctrl_name = "internal", + static struct omap_dss_device ldp_lcd_device = { + .name = "lcd", + .driver_name = "generic_dpi_panel", + .type = OMAP_DISPLAY_TYPE_DPI, + .phy.dpi.data_lines = 18, + .data = &ldp_panel_data, + }; + + static struct omap_dss_device *ldp_dss_devices[] = { + &ldp_lcd_device, }; - static struct omap_board_config_kernel ldp_config[] __initdata = { - { OMAP_TAG_LCD, &ldp_lcd_config }, + static struct omap_dss_board_info ldp_dss_data = { + .num_devices = ARRAY_SIZE(ldp_dss_devices), + .devices = ldp_dss_devices, + .default_device = &ldp_lcd_device, }; + static void __init ldp_display_init(void) + { + int r; + + static struct gpio gpios[] __initdata = { + {LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"}, + {LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"}, + }; + + r = gpio_request_array(gpios, ARRAY_SIZE(gpios)); + if (r) { + pr_err("Cannot request LCD GPIOs, error %d\n", r); + return; + } + + omap_display_init(&ldp_dss_data); + } + -static void __init omap_ldp_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(NULL, NULL); -} - + static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) + { + int r; + + struct gpio gpios[] = { + {gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"}, + {gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"}, + }; + + r = gpio_request_array(gpios, ARRAY_SIZE(gpios)); + if (r) { + pr_err("Cannot request LCD GPIOs, error %d\n", r); + ldp_backlight_gpio = -EINVAL; + ldp_lcd_enable_gpio = -EINVAL; + return r; + } + + ldp_backlight_gpio = gpio + 15; + ldp_lcd_enable_gpio = gpio + 7; + + return 0; + } + static struct twl4030_gpio_platform_data ldp_gpio_data = { .gpio_base = OMAP_MAX_GPIO_LINES, .irq_base = TWL4030_GPIO_IRQ_BASE, diff --cc arch/arm/mach-omap2/board-rx51.c index e2e958aa15ae,9e7dde6a7a90..34858c89389d --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@@ -79,29 -79,15 +79,6 @@@ static struct cpuidle_params rx51_cpuid {7505 + 15274, 484329, 1}, }; - static struct omap_lcd_config rx51_lcd_config = { - .ctrl_name = "internal", - }; - - static struct omap_fbmem_config rx51_fbmem0_config = { - .size = 752 * 1024, - }; - - static struct omap_fbmem_config rx51_fbmem1_config = { - .size = 752 * 1024, - }; - - static struct omap_fbmem_config rx51_fbmem2_config = { - .size = 752 * 1024, - }; -static void __init rx51_init_early(void) -{ - struct omap_sdrc_params *sdrc_params; -- - static struct omap_board_config_kernel rx51_config[] = { - { OMAP_TAG_FBMEM, &rx51_fbmem0_config }, - { OMAP_TAG_FBMEM, &rx51_fbmem1_config }, - { OMAP_TAG_FBMEM, &rx51_fbmem2_config }, - { OMAP_TAG_LCD, &rx51_lcd_config }, - }; - omap2_init_common_infrastructure(); - sdrc_params = nokia_get_sdram_timings(); - omap2_init_common_devices(sdrc_params, sdrc_params); -} -- extern void __init rx51_peripherals_init(void); #ifdef CONFIG_OMAP_MUX @@@ -118,17 -104,9 +95,15 @@@ static struct omap_musb_board_data musb static void __init rx51_init(void) { + struct omap_sdrc_params *sdrc_params; + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); - omap_board_config = rx51_config; - omap_board_config_size = ARRAY_SIZE(rx51_config); omap3_pm_init_cpuidle(rx51_cpuidle_params); omap_serial_init(); + + sdrc_params = nokia_get_sdram_timings(); + omap_sdrc_init(sdrc_params, sdrc_params); + usb_musb_init(&musb_board_data); rx51_peripherals_init();