diff options
author | Dima Zavin <dima@android.com> | 2011-04-22 12:46:58 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-14 11:49:08 -0700 |
commit | f1ee8080e0511044068fba9a22edde42bd8e8e06 (patch) | |
tree | a8a103992f916abd72ae3032d175599d93b32699 /arch | |
parent | 968b17621a48a4ea5049968d3601f59624f33dd3 (diff) | |
download | kernel_samsung_tuna-f1ee8080e0511044068fba9a22edde42bd8e8e06.zip kernel_samsung_tuna-f1ee8080e0511044068fba9a22edde42bd8e8e06.tar.gz kernel_samsung_tuna-f1ee8080e0511044068fba9a22edde42bd8e8e06.tar.bz2 |
ARM: omap4: tuna: Add pre-lunchbox parallel display support
Change-Id: I0703ca170adaf9508757bc6057c8c31fe1dd3469
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna-panel.c | 66 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna.h | 1 |
4 files changed, 69 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 53c3bc2..fac4a6b 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -252,6 +252,7 @@ obj-$(CONFIG_MACH_TUNA) += board-tuna.o \ hsmmc.o \ omap_phy_internal.o obj-$(CONFIG_MACH_TUNA) += board-tuna-android-usb.o +obj-$(CONFIG_MACH_TUNA) += board-tuna-panel.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ diff --git a/arch/arm/mach-omap2/board-tuna-panel.c b/arch/arm/mach-omap2/board-tuna-panel.c new file mode 100644 index 0000000..92b940b --- /dev/null +++ b/arch/arm/mach-omap2/board-tuna-panel.c @@ -0,0 +1,66 @@ +/* Display panel support for Samsung Tuna Board. + * + * Copyright (C) 2011 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <linux/err.h> +#include <linux/kernel.h> +#include <linux/omapfb.h> + +#include <plat/display.h> +#include <plat/panel-generic-dpi.h> +#include <plat/vram.h> + +#define TUNA_FB_RAM_SIZE SZ_8M /* ~1280*720*4 * 2 */ + +static struct panel_generic_dpi_data tuna_lcd_panel = { + .name = "samsung_ams452gn05", + .platform_enable = NULL, + .platform_disable = NULL, +}; + +static struct omap_dss_device tuna_lcd_device = { + .name = "lcd", + .driver_name = "generic_dpi_panel", + .type = OMAP_DISPLAY_TYPE_DPI, + .channel = OMAP_DSS_CHANNEL_LCD2, + .data = &tuna_lcd_panel, + .phy.dpi.data_lines = 24, +}; + +static struct omap_dss_device *tuna_dss_devices[] = { + &tuna_lcd_device, +}; + +static struct omap_dss_board_info tuna_dss_data = { + .num_devices = ARRAY_SIZE(tuna_dss_devices), + .devices = tuna_dss_devices, + .default_device = &tuna_lcd_device, +}; + +static struct omapfb_platform_data tuna_fb_pdata = { + .mem_desc = { + .region_cnt = 1, + .region = { + [0] = { + .size = TUNA_FB_RAM_SIZE, + }, + }, + }, +}; + +void __init omap4_tuna_display_init(void) +{ + omap_vram_set_sdram_vram(TUNA_FB_RAM_SIZE, 0); + omapfb_set_platform_data(&tuna_fb_pdata); + omap_display_init(&tuna_dss_data); +} diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c index 5e3fc09..665efad 100644 --- a/arch/arm/mach-omap2/board-tuna.c +++ b/arch/arm/mach-omap2/board-tuna.c @@ -39,7 +39,6 @@ #include <plat/common.h> #include <plat/usb.h> #include <plat/mmc.h> -#include <plat/panel-generic-dpi.h> #include "timer-gp.h" #include "hsmmc.h" @@ -463,6 +462,7 @@ static void __init tuna_init(void) omap2_hsmmc_init(mmc); usb_musb_init(&musb_board_data); omap4_tuna_android_usb_init(); + omap4_tuna_display_init(); } static void __init tuna_map_io(void) diff --git a/arch/arm/mach-omap2/board-tuna.h b/arch/arm/mach-omap2/board-tuna.h index 456f142..0ed0e76 100644 --- a/arch/arm/mach-omap2/board-tuna.h +++ b/arch/arm/mach-omap2/board-tuna.h @@ -15,5 +15,6 @@ #define _MACH_OMAP2_BOARD_TUNA_H_ void omap4_tuna_android_usb_init(void); +void omap4_tuna_display_init(void); #endif |