diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-video.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-rx51-video.c | 81 |
1 files changed, 19 insertions, 62 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 85503fed4e1..9cfebc5c745 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c @@ -14,13 +14,14 @@ #include <linux/gpio.h> #include <linux/spi/spi.h> #include <linux/mm.h> - #include <asm/mach-types.h> -#include <plat/display.h> -#include <plat/vram.h> -#include <plat/mcspi.h> +#include <video/omapdss.h> +#include <video/omap-panel-data.h> + +#include <linux/platform_data/spi-omap2-mcspi.h> -#include <mach/board-rx51.h> +#include "soc.h" +#include "board-rx51.h" #include "mux.h" @@ -28,47 +29,21 @@ #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) -static int rx51_lcd_enable(struct omap_dss_device *dssdev) -{ - gpio_set_value(dssdev->reset_gpio, 1); - return 0; -} - -static void rx51_lcd_disable(struct omap_dss_device *dssdev) -{ - gpio_set_value(dssdev->reset_gpio, 0); -} - -static struct omap_dss_device rx51_lcd_device = { - .name = "lcd", - .driver_name = "panel-acx565akm", - .type = OMAP_DISPLAY_TYPE_SDI, - .phy.sdi.datapairs = 2, - .reset_gpio = RX51_LCD_RESET_GPIO, - .platform_enable = rx51_lcd_enable, - .platform_disable = rx51_lcd_disable, +static struct connector_atv_platform_data rx51_tv_pdata = { + .name = "tv", + .source = "venc.0", + .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE, + .invert_polarity = false, }; -static struct omap_dss_device *rx51_dss_devices[] = { - &rx51_lcd_device, +static struct platform_device rx51_tv_connector_device = { + .name = "connector-analog-tv", + .id = 0, + .dev.platform_data = &rx51_tv_pdata, }; static struct omap_dss_board_info rx51_dss_board_info = { - .num_devices = ARRAY_SIZE(rx51_dss_devices), - .devices = rx51_dss_devices, - .default_device = &rx51_lcd_device, -}; - -struct platform_device rx51_display_device = { - .name = "omapdss", - .id = -1, - .dev = { - .platform_data = &rx51_dss_board_info, - }, -}; - -static struct platform_device *rx51_video_devices[] __initdata = { - &rx51_display_device, + .default_display_name = "lcd", }; static int __init rx51_video_init(void) @@ -81,30 +56,12 @@ static int __init rx51_video_init(void) return 0; } - if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) { - pr_err("%s failed to get LCD Reset GPIO\n", __func__); - return 0; - } + omap_display_init(&rx51_dss_board_info); - gpio_direction_output(RX51_LCD_RESET_GPIO, 1); + platform_device_register(&rx51_tv_connector_device); - platform_add_devices(rx51_video_devices, - ARRAY_SIZE(rx51_video_devices)); return 0; } -subsys_initcall(rx51_video_init); - -void __init rx51_video_mem_init(void) -{ - /* - * GFX 864x480x32bpp - * VID1/2 1280x720x32bpp double buffered - */ - omap_vram_set_sdram_vram(PAGE_ALIGN(864 * 480 * 4) + - 2 * PAGE_ALIGN(1280 * 720 * 4 * 2), 0); -} - -#else -void __init rx51_video_mem_init(void) { } +omap_subsys_initcall(rx51_video_init); #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ |
