openwrtv4/target/linux/omap24xx/patches-2.6.37/700-video-omap.patch
Michael Büsch 45179d077c omap24xx: Add linux 2.6.37 config/patches
SVN-Revision: 23888
2010-11-05 16:59:39 +00:00

196 lines
6 KiB
Diff

Index: linux-2.6.37-rc1/drivers/video/omap/dispc.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/dispc.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/dispc.c 2010-11-05 17:04:58.562000054 +0100
@@ -190,6 +190,11 @@
struct omapfb_color_key color_key;
} dispc;
+struct platform_device omapdss_device = {
+ .name = "omapdss",
+ .id = -1,
+};
+
static void enable_lcd_clocks(int enable);
static void inline dispc_write_reg(int idx, u32 val)
@@ -916,20 +921,20 @@
static int get_dss_clocks(void)
{
- dispc.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick");
+ dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
if (IS_ERR(dispc.dss_ick)) {
dev_err(dispc.fbdev->dev, "can't get ick\n");
return PTR_ERR(dispc.dss_ick);
}
- dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck");
+ dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
if (IS_ERR(dispc.dss1_fck)) {
dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
clk_put(dispc.dss_ick);
return PTR_ERR(dispc.dss1_fck);
}
- dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck");
+ dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
if (IS_ERR(dispc.dss_54m_fck)) {
dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
clk_put(dispc.dss_ick);
@@ -1381,6 +1386,12 @@
int skip_init = 0;
int i;
+ r = platform_device_register(&omapdss_device);
+ if (r) {
+ dev_err(fbdev->dev, "can't register omapdss device\n");
+ return r;
+ }
+
memset(&dispc, 0, sizeof(dispc));
dispc.base = ioremap(DISPC_BASE, SZ_1K);
@@ -1524,6 +1535,7 @@
free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
put_dss_clocks();
iounmap(dispc.base);
+ platform_device_unregister(&omapdss_device);
}
const struct lcd_ctrl omap2_int_ctrl = {
Index: linux-2.6.37-rc1/drivers/video/omap/lcd_htcherald.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/lcd_htcherald.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/lcd_htcherald.c 2010-11-05 17:04:58.562000054 +0100
@@ -115,12 +115,12 @@
},
};
-static int __init htcherald_panel_drv_init(void)
+static int htcherald_panel_drv_init(void)
{
return platform_driver_register(&htcherald_panel_driver);
}
-static void __exit htcherald_panel_drv_cleanup(void)
+static void htcherald_panel_drv_cleanup(void)
{
platform_driver_unregister(&htcherald_panel_driver);
}
Index: linux-2.6.37-rc1/drivers/video/omap/lcd_mipid.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/lcd_mipid.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/lcd_mipid.c 2010-11-05 17:04:58.563000039 +0100
@@ -551,9 +551,9 @@
md->esd_check = ls041y3_esd_check;
break;
default:
- md->panel.name = "unknown";
- dev_err(&md->spi->dev, "invalid display ID\n");
- return -ENODEV;
+ dev_err(&md->spi->dev, "FIXME: LCD panel detection failed! ID: %02x%02x%02x\n", display_id[0], display_id[1], display_id[2]);
+ md->panel.name = "ls041y3";
+ md->esd_check = ls041y3_esd_check;
}
md->revision = display_id[1];
Index: linux-2.6.37-rc1/drivers/video/omap/omapfb.h
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/omapfb.h 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/omapfb.h 2010-11-05 17:04:58.563000039 +0100
@@ -203,8 +203,6 @@
struct omapfb_mem_desc mem_desc;
struct fb_info *fb_info[OMAPFB_PLANE_NUM];
-
- struct platform_device *dssdev; /* dummy dev for clocks */
};
#ifdef CONFIG_ARCH_OMAP1
@@ -226,4 +224,6 @@
void (*callback)(void *),
void *callback_data);
+extern struct platform_device omapdss_device;
+
#endif /* __OMAPFB_H */
Index: linux-2.6.37-rc1/drivers/video/omap/omapfb_main.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/omapfb_main.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/omapfb_main.c 2010-11-05 17:04:58.563000039 +0100
@@ -84,19 +84,6 @@
{ 1 << OMAPFB_COLOR_YUY422, "YUY422", },
};
-static void omapdss_release(struct device *dev)
-{
-}
-
-/* dummy device for clocks */
-static struct platform_device omapdss_device = {
- .name = "omapdss",
- .id = -1,
- .dev = {
- .release = omapdss_release,
- },
-};
-
/*
* ---------------------------------------------------------------------------
* LCD panel
@@ -1715,7 +1702,6 @@
fbdev->dev = &pdev->dev;
fbdev->panel = panel;
- fbdev->dssdev = &omapdss_device;
platform_set_drvdata(pdev, fbdev);
mutex_init(&fbdev->rqueue_mutex);
@@ -1830,16 +1816,8 @@
static int omapfb_probe(struct platform_device *pdev)
{
- int r;
-
BUG_ON(fbdev_pdev != NULL);
- r = platform_device_register(&omapdss_device);
- if (r) {
- dev_err(&pdev->dev, "can't register omapdss device\n");
- return r;
- }
-
/* Delay actual initialization until the LCD is registered */
fbdev_pdev = pdev;
if (fbdev_panel != NULL)
@@ -1867,9 +1845,6 @@
fbdev->state = OMAPFB_DISABLED;
omapfb_free_resources(fbdev, saved_state);
- platform_device_unregister(&omapdss_device);
- fbdev->dssdev = NULL;
-
return 0;
}
Index: linux-2.6.37-rc1/drivers/video/omap/rfbi.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/video/omap/rfbi.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/drivers/video/omap/rfbi.c 2010-11-05 17:04:58.563000039 +0100
@@ -84,13 +84,13 @@
static int rfbi_get_clocks(void)
{
- rfbi.dss_ick = clk_get(&rfbi.fbdev->dssdev->dev, "ick");
+ rfbi.dss_ick = clk_get(&omapdss_device.dev, "ick");
if (IS_ERR(rfbi.dss_ick)) {
dev_err(rfbi.fbdev->dev, "can't get ick\n");
return PTR_ERR(rfbi.dss_ick);
}
- rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck");
+ rfbi.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
if (IS_ERR(rfbi.dss1_fck)) {
dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
clk_put(rfbi.dss_ick);