From: Stephen Rothwell Date: Fri, 14 Oct 2011 03:08:03 +0000 (+1100) Subject: Merge remote-tracking branch 'omap_dss2/for-next' X-Git-Tag: next-20111014~40 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4e51354b4a2e88accd75bbd0ae6586a8723c7504;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 --- 4e51354b4a2e88accd75bbd0ae6586a8723c7504 diff --cc arch/arm/mach-omap2/board-2430sdp.c index 638cecb9ea1a,6ab6350b0157..d704f0ac328d --- 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"), }; @@@ -242,14 -294,22 +290,16 @@@ static void __init omap_2430sdp_init(vo /* Turn off secondary LCD backlight */ gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW, "Secondary LCD backlight"); + + sdp2430_display_init(); } -static void __init omap_2430sdp_map_io(void) -{ - omap2_set_globals_243x(); - omap243x_map_common_io(); -} - MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") /* Maintainer: Syed Khasim - Texas Instruments Inc */ - .boot_params = 0x80000100, + .atag_offset = 0x100, .reserve = omap_reserve, - .map_io = omap_2430sdp_map_io, - .init_early = omap_2430sdp_init_early, + .map_io = omap243x_map_io, + .init_early = omap2430_init_early, .init_irq = omap2_init_irq, .init_machine = omap_2430sdp_init, .timer = &omap2_timer, diff --cc arch/arm/mach-omap2/board-4430sdp.c index 6d2b61409c1b,d3874a68b059..515646886b59 --- 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 29c409b68b52,d8eb81e7d318..1468edbd403a --- 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,15 -349,22 +343,17 @@@ 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) -{ - omap2_set_globals_242x(); - omap242x_map_common_io(); -} - MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") /* Maintainer: Kyungmin Park */ - .boot_params = 0x80000100, + .atag_offset = 0x100, .reserve = omap_reserve, - .map_io = omap_apollon_map_io, - .init_early = omap_apollon_init_early, + .map_io = omap242x_map_io, + .init_early = omap2420_init_early, .init_irq = omap2_init_irq, .init_machine = omap_apollon_init, .timer = &omap2_timer, diff --cc arch/arm/mach-omap2/board-h4.c index a65effe7e8d5,f7c09de2ed1c..c12666ee7017 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@@ -285,10 -301,17 +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(); -} -- static struct at24_platform_data m24c01 = { .byte_len = SZ_1K / 8, .page_size = 16, @@@ -359,17 -379,24 +367,19 @@@ 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) -{ - omap2_set_globals_242x(); - omap242x_map_common_io(); -} - MACHINE_START(OMAP_H4, "OMAP2420 H4 board") /* Maintainer: Paul Mundt */ - .boot_params = 0x80000100, + .atag_offset = 0x100, .reserve = omap_reserve, - .map_io = omap_h4_map_io, - .init_early = omap_h4_init_early, - .init_irq = omap_h4_init_irq, + .map_io = omap242x_map_io, + .init_early = omap2420_init_early, + .init_irq = omap2_init_irq, .init_machine = omap_h4_init, .timer = &omap2_timer, MACHINE_END 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-omap3touchbook.c index c2d5348f5422,80e82763ebd1..a2d0d1971e27 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c @@@ -326,8 -311,19 +311,7 @@@ static struct omap_board_mux board_mux[ }; #endif -static void __init omap3_touchbook_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params); -} - -static void __init omap3_touchbook_init_irq(void) -{ - omap3_init_irq(); -} - static struct platform_device *omap3_touchbook_devices[] __initdata = { - &omap3_touchbook_lcd_device, &leds_gpio, &keys_gpio, }; diff --cc arch/arm/mach-omap2/board-rx51.c index 74c8aadc0a19,9e7dde6a7a90..4af7c4b2881a --- 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();