diff options
Diffstat (limited to 'drivers/video')
27 files changed, 195 insertions, 50 deletions
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index cbad67e8982..8693e5fcd2e 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c @@ -26,8 +26,8 @@ #include <linux/backlight.h> #include <mach/hardware.h> -#include <mach/board.h> -#include <mach/mux.h> +#include <plat/board.h> +#include <plat/mux.h> #define OMAPBL_MAX_INTENSITY 0xff diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index b63b198d1f0..49226a1b909 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile @@ -35,6 +35,7 @@ objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o +objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o omapfb-objs := $(objs-yy) diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c index 70dadf9d233..f5d75f22cef 100644 --- a/drivers/video/omap/blizzard.c +++ b/drivers/video/omap/blizzard.c @@ -26,9 +26,9 @@ #include <linux/delay.h> #include <linux/clk.h> -#include <mach/dma.h> -#include <mach/omapfb.h> -#include <mach/blizzard.h> +#include <plat/dma.h> +#include <plat/omapfb.h> +#include <plat/blizzard.h> #include "dispc.h" diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index f16e4215422..7c833db4f9b 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -25,9 +25,9 @@ #include <linux/clk.h> #include <linux/io.h> -#include <mach/sram.h> -#include <mach/omapfb.h> -#include <mach/board.h> +#include <plat/sram.h> +#include <plat/omapfb.h> +#include <plat/board.h> #include "dispc.h" @@ -204,6 +204,7 @@ static u32 inline dispc_read_reg(int idx) /* Select RFBI or bypass mode */ static void enable_rfbi_mode(int enable) { + void __iomem *rfbi_control; u32 l; l = dispc_read_reg(DISPC_CONTROL); @@ -216,9 +217,15 @@ static void enable_rfbi_mode(int enable) dispc_write_reg(DISPC_CONTROL, l); /* Set bypass mode in RFBI module */ - l = __raw_readl(OMAP2_IO_ADDRESS(RFBI_CONTROL)); + rfbi_control = ioremap(RFBI_CONTROL, SZ_1K); + if (!rfbi_control) { + pr_err("Unable to ioremap rfbi_control\n"); + return; + } + l = __raw_readl(rfbi_control); l |= enable ? 0 : (1 << 1); - __raw_writel(l, OMAP2_IO_ADDRESS(RFBI_CONTROL)); + __raw_writel(l, rfbi_control); + iounmap(rfbi_control); } static void set_lcd_data_lines(int data_lines) @@ -1367,6 +1374,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, int r; u32 l; struct lcd_panel *panel = fbdev->panel; + void __iomem *ram_fw_base; int tmo = 10000; int skip_init = 0; int i; @@ -1441,7 +1449,13 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, } /* L3 firewall setting: enable access to OCM RAM */ - __raw_writel(0x402000b0, OMAP2_IO_ADDRESS(0x680050a0)); + ram_fw_base = ioremap(0x68005000, SZ_1K); + if (!ram_fw_base) { + dev_err(dispc.fbdev->dev, "Cannot ioremap to enable OCM RAM\n"); + goto fail1; + } + __raw_writel(0x402000b0, ram_fw_base + 0xa0); + iounmap(ram_fw_base); if ((r = alloc_palette_ram()) < 0) goto fail2; diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c index ca51583ec98..17a975e4c9c 100644 --- a/drivers/video/omap/hwa742.c +++ b/drivers/video/omap/hwa742.c @@ -26,9 +26,9 @@ #include <linux/delay.h> #include <linux/clk.h> -#include <mach/dma.h> -#include <mach/omapfb.h> -#include <mach/hwa742.h> +#include <plat/dma.h> +#include <plat/omapfb.h> +#include <plat/hwa742.h> #define HWA742_REV_CODE_REG 0x0 #define HWA742_CONFIG_REG 0x2 diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c index 393712b6f36..fea7feee0b7 100644 --- a/drivers/video/omap/lcd_2430sdp.c +++ b/drivers/video/omap/lcd_2430sdp.c @@ -27,8 +27,8 @@ #include <linux/gpio.h> #include <linux/i2c/twl4030.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c index 1f7439955e0..3d5277252ca 100644 --- a/drivers/video/omap/lcd_ams_delta.c +++ b/drivers/video/omap/lcd_ams_delta.c @@ -25,9 +25,9 @@ #include <linux/io.h> #include <linux/delay.h> -#include <mach/board-ams-delta.h> +#include <plat/board-ams-delta.h> #include <mach/hardware.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> #define AMS_DELTA_DEFAULT_CONTRAST 112 diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c index 626ae3a532f..4c5cefc5153 100644 --- a/drivers/video/omap/lcd_apollon.c +++ b/drivers/video/omap/lcd_apollon.c @@ -25,8 +25,8 @@ #include <linux/platform_device.h> #include <mach/gpio.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> /* #define USE_35INCH_LCD 1 */ diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c index 417ae5efa8b..240b4fb1074 100644 --- a/drivers/video/omap/lcd_h3.c +++ b/drivers/video/omap/lcd_h3.c @@ -24,7 +24,7 @@ #include <linux/i2c/tps65010.h> #include <mach/gpio.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> #define MODULE_NAME "omapfb-lcd_h3" diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c index 0c398bda760..720625da1f4 100644 --- a/drivers/video/omap/lcd_h4.c +++ b/drivers/video/omap/lcd_h4.c @@ -22,7 +22,7 @@ #include <linux/module.h> #include <linux/platform_device.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) { diff --git a/drivers/video/omap/lcd_htcherald.c b/drivers/video/omap/lcd_htcherald.c new file mode 100644 index 00000000000..2e0c81ea748 --- /dev/null +++ b/drivers/video/omap/lcd_htcherald.c @@ -0,0 +1,130 @@ +/* + * File: drivers/video/omap/lcd-htcherald.c + * + * LCD panel support for the HTC Herald + * + * Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com> + * Copyright (C) 2009 Wing Linux + * + * Based on the lcd_htcwizard.c file from the linwizard project: + * Copyright (C) linwizard.sourceforge.net + * Author: Angelo Arrifano <miknix@gmail.com> + * Based on lcd_h4 by Imre Deak <imre.deak@nokia.com> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <linux/module.h> +#include <linux/platform_device.h> + +#include <plat/omapfb.h> + +static int htcherald_panel_init(struct lcd_panel *panel, + struct omapfb_device *fbdev) +{ + return 0; +} + +static void htcherald_panel_cleanup(struct lcd_panel *panel) +{ +} + +static int htcherald_panel_enable(struct lcd_panel *panel) +{ + return 0; +} + +static void htcherald_panel_disable(struct lcd_panel *panel) +{ +} + +static unsigned long htcherald_panel_get_caps(struct lcd_panel *panel) +{ + return 0; +} + +/* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */ +struct lcd_panel htcherald_panel_1 = { + .name = "lcd_herald", + .config = OMAP_LCDC_PANEL_TFT | + OMAP_LCDC_INV_HSYNC | + OMAP_LCDC_INV_VSYNC | + OMAP_LCDC_INV_PIX_CLOCK, + .bpp = 16, + .data_lines = 16, + .x_res = 240, + .y_res = 320, + .pixel_clock = 6093, + .pcd = 0, /* 15 */ + .hsw = 10, + .hfp = 10, + .hbp = 20, + .vsw = 3, + .vfp = 2, + .vbp = 2, + + .init = htcherald_panel_init, + .cleanup = htcherald_panel_cleanup, + .enable = htcherald_panel_enable, + .disable = htcherald_panel_disable, + .get_caps = htcherald_panel_get_caps, +}; + +static int htcherald_panel_probe(struct platform_device *pdev) +{ + omapfb_register_panel(&htcherald_panel_1); + return 0; +} + +static int htcherald_panel_remove(struct platform_device *pdev) +{ + return 0; +} + +static int htcherald_panel_suspend(struct platform_device *pdev, + pm_message_t mesg) +{ + return 0; +} + +static int htcherald_panel_resume(struct platform_device *pdev) +{ + return 0; +} + +struct platform_driver htcherald_panel_driver = { + .probe = htcherald_panel_probe, + .remove = htcherald_panel_remove, + .suspend = htcherald_panel_suspend, + .resume = htcherald_panel_resume, + .driver = { + .name = "lcd_htcherald", + .owner = THIS_MODULE, + }, +}; + +static int htcherald_panel_drv_init(void) +{ + return platform_driver_register(&htcherald_panel_driver); +} + +static void htcherald_panel_drv_cleanup(void) +{ + platform_driver_unregister(&htcherald_panel_driver); +} + +module_init(htcherald_panel_drv_init); +module_exit(htcherald_panel_drv_cleanup); + diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c index cdbd8bb607b..aafe9b497e2 100644 --- a/drivers/video/omap/lcd_inn1510.c +++ b/drivers/video/omap/lcd_inn1510.c @@ -23,8 +23,8 @@ #include <linux/platform_device.h> #include <linux/io.h> -#include <mach/fpga.h> -#include <mach/omapfb.h> +#include <plat/fpga.h> +#include <plat/omapfb.h> static int innovator1510_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c index 268f7f808a4..0de338264a8 100644 --- a/drivers/video/omap/lcd_inn1610.c +++ b/drivers/video/omap/lcd_inn1610.c @@ -23,7 +23,7 @@ #include <linux/platform_device.h> #include <mach/gpio.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> #define MODULE_NAME "omapfb-lcd_h3" diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c index dbfe8974fb9..6a260dfdadc 100644 --- a/drivers/video/omap/lcd_ldp.c +++ b/drivers/video/omap/lcd_ldp.c @@ -27,8 +27,8 @@ #include <linux/i2c/twl4030.h> #include <mach/gpio.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES) diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c index 918ee893419..2162eb09e0f 100644 --- a/drivers/video/omap/lcd_mipid.c +++ b/drivers/video/omap/lcd_mipid.c @@ -23,8 +23,8 @@ #include <linux/workqueue.h> #include <linux/spi/spi.h> -#include <mach/omapfb.h> -#include <mach/lcd_mipid.h> +#include <plat/omapfb.h> +#include <plat/lcd_mipid.h> #define MIPID_MODULE_NAME "lcd_mipid" diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c index 7a2bbe2ecec..e1a38abca3e 100644 --- a/drivers/video/omap/lcd_omap2evm.c +++ b/drivers/video/omap/lcd_omap2evm.c @@ -26,8 +26,8 @@ #include <linux/gpio.h> #include <linux/i2c/twl4030.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define LCD_PANEL_ENABLE_GPIO 154 diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c index 4011910123b..ccec084ed64 100644 --- a/drivers/video/omap/lcd_omap3beagle.c +++ b/drivers/video/omap/lcd_omap3beagle.c @@ -25,8 +25,8 @@ #include <linux/gpio.h> #include <linux/i2c/twl4030.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define LCD_PANEL_ENABLE_GPIO 170 diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c index b6a4c2c57a2..556eb31db24 100644 --- a/drivers/video/omap/lcd_omap3evm.c +++ b/drivers/video/omap/lcd_omap3evm.c @@ -25,8 +25,8 @@ #include <linux/gpio.h> #include <linux/i2c/twl4030.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define LCD_PANEL_ENABLE_GPIO 153 diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c index b3fa88bc626..bb21d7dca39 100644 --- a/drivers/video/omap/lcd_osk.c +++ b/drivers/video/omap/lcd_osk.c @@ -24,8 +24,8 @@ #include <linux/platform_device.h> #include <mach/gpio.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) { diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c index 2bc5c9268e5..b0f86e514cd 100644 --- a/drivers/video/omap/lcd_overo.c +++ b/drivers/video/omap/lcd_overo.c @@ -24,8 +24,8 @@ #include <linux/i2c/twl4030.h> #include <mach/gpio.h> -#include <mach/mux.h> -#include <mach/omapfb.h> +#include <plat/mux.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> #define LCD_ENABLE 144 diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c index 4bf3c79f3cc..d30289603ce 100644 --- a/drivers/video/omap/lcd_palmte.c +++ b/drivers/video/omap/lcd_palmte.c @@ -23,8 +23,8 @@ #include <linux/platform_device.h> #include <linux/io.h> -#include <mach/fpga.h> -#include <mach/omapfb.h> +#include <plat/fpga.h> +#include <plat/omapfb.h> static int palmte_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c index 48ea1f9f2cb..557424fb6df 100644 --- a/drivers/video/omap/lcd_palmtt.c +++ b/drivers/video/omap/lcd_palmtt.c @@ -30,7 +30,7 @@ GPIO13 - screen blanking #include <linux/io.h> #include <mach/gpio.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> static int palmtt_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video/omap/lcd_palmz71.c index 0697d29b4d3..5f4b5b2c1f4 100644 --- a/drivers/video/omap/lcd_palmz71.c +++ b/drivers/video/omap/lcd_palmz71.c @@ -24,7 +24,7 @@ #include <linux/platform_device.h> #include <linux/io.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> static int palmz71_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c index ab394925667..5f32cafbf74 100644 --- a/drivers/video/omap/lcdc.c +++ b/drivers/video/omap/lcdc.c @@ -29,8 +29,8 @@ #include <linux/vmalloc.h> #include <linux/clk.h> -#include <mach/dma.h> -#include <mach/omapfb.h> +#include <plat/dma.h> +#include <plat/omapfb.h> #include <asm/mach-types.h> diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 0d0c8c8b9b5..f900a43db8d 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -28,8 +28,8 @@ #include <linux/mm.h> #include <linux/uaccess.h> -#include <mach/dma.h> -#include <mach/omapfb.h> +#include <plat/dma.h> +#include <plat/omapfb.h> #include "lcdc.h" #include "dispc.h" diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index ee01e84e19c..c90fa39486b 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c @@ -27,7 +27,7 @@ #include <linux/clk.h> #include <linux/io.h> -#include <mach/omapfb.h> +#include <plat/omapfb.h> #include "dispc.h" diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c index a7694622024..79dc84f0971 100644 --- a/drivers/video/omap/sossi.c +++ b/drivers/video/omap/sossi.c @@ -24,8 +24,8 @@ #include <linux/irq.h> #include <linux/io.h> -#include <mach/dma.h> -#include <mach/omapfb.h> +#include <plat/dma.h> +#include <plat/omapfb.h> #include "lcdc.h" |