diff options
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/dispc.c | 18 | ||||
-rw-r--r-- | drivers/video/omap/lcd_htcherald.c | 4 | ||||
-rw-r--r-- | drivers/video/omap/omapfb.h | 2 | ||||
-rw-r--r-- | drivers/video/omap/omapfb_main.c | 25 | ||||
-rw-r--r-- | drivers/video/omap/rfbi.c | 4 |
5 files changed, 34 insertions, 19 deletions
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index c7c6455f1fa8..e192b058a688 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -189,11 +189,6 @@ static struct { | |||
189 | struct omapfb_color_key color_key; | 189 | struct omapfb_color_key color_key; |
190 | } dispc; | 190 | } dispc; |
191 | 191 | ||
192 | static struct platform_device omapdss_device = { | ||
193 | .name = "omapdss", | ||
194 | .id = -1, | ||
195 | }; | ||
196 | |||
197 | static void enable_lcd_clocks(int enable); | 192 | static void enable_lcd_clocks(int enable); |
198 | 193 | ||
199 | static void inline dispc_write_reg(int idx, u32 val) | 194 | static void inline dispc_write_reg(int idx, u32 val) |
@@ -920,20 +915,20 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev) | |||
920 | 915 | ||
921 | static int get_dss_clocks(void) | 916 | static int get_dss_clocks(void) |
922 | { | 917 | { |
923 | dispc.dss_ick = clk_get(&omapdss_device.dev, "ick"); | 918 | dispc.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick"); |
924 | if (IS_ERR(dispc.dss_ick)) { | 919 | if (IS_ERR(dispc.dss_ick)) { |
925 | dev_err(dispc.fbdev->dev, "can't get ick\n"); | 920 | dev_err(dispc.fbdev->dev, "can't get ick\n"); |
926 | return PTR_ERR(dispc.dss_ick); | 921 | return PTR_ERR(dispc.dss_ick); |
927 | } | 922 | } |
928 | 923 | ||
929 | dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck"); | 924 | dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck"); |
930 | if (IS_ERR(dispc.dss1_fck)) { | 925 | if (IS_ERR(dispc.dss1_fck)) { |
931 | dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); | 926 | dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); |
932 | clk_put(dispc.dss_ick); | 927 | clk_put(dispc.dss_ick); |
933 | return PTR_ERR(dispc.dss1_fck); | 928 | return PTR_ERR(dispc.dss1_fck); |
934 | } | 929 | } |
935 | 930 | ||
936 | dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck"); | 931 | dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck"); |
937 | if (IS_ERR(dispc.dss_54m_fck)) { | 932 | if (IS_ERR(dispc.dss_54m_fck)) { |
938 | dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); | 933 | dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); |
939 | clk_put(dispc.dss_ick); | 934 | clk_put(dispc.dss_ick); |
@@ -1385,12 +1380,6 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1385 | int skip_init = 0; | 1380 | int skip_init = 0; |
1386 | int i; | 1381 | int i; |
1387 | 1382 | ||
1388 | r = platform_device_register(&omapdss_device); | ||
1389 | if (r) { | ||
1390 | dev_err(fbdev->dev, "can't register omapdss device\n"); | ||
1391 | return r; | ||
1392 | } | ||
1393 | |||
1394 | memset(&dispc, 0, sizeof(dispc)); | 1383 | memset(&dispc, 0, sizeof(dispc)); |
1395 | 1384 | ||
1396 | dispc.base = ioremap(DISPC_BASE, SZ_1K); | 1385 | dispc.base = ioremap(DISPC_BASE, SZ_1K); |
@@ -1534,7 +1523,6 @@ static void omap_dispc_cleanup(void) | |||
1534 | free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); | 1523 | free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); |
1535 | put_dss_clocks(); | 1524 | put_dss_clocks(); |
1536 | iounmap(dispc.base); | 1525 | iounmap(dispc.base); |
1537 | platform_device_unregister(&omapdss_device); | ||
1538 | } | 1526 | } |
1539 | 1527 | ||
1540 | const struct lcd_ctrl omap2_int_ctrl = { | 1528 | const struct lcd_ctrl omap2_int_ctrl = { |
diff --git a/drivers/video/omap/lcd_htcherald.c b/drivers/video/omap/lcd_htcherald.c index a9007c5d1fad..4802419da83b 100644 --- a/drivers/video/omap/lcd_htcherald.c +++ b/drivers/video/omap/lcd_htcherald.c | |||
@@ -115,12 +115,12 @@ struct platform_driver htcherald_panel_driver = { | |||
115 | }, | 115 | }, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static int htcherald_panel_drv_init(void) | 118 | static int __init htcherald_panel_drv_init(void) |
119 | { | 119 | { |
120 | return platform_driver_register(&htcherald_panel_driver); | 120 | return platform_driver_register(&htcherald_panel_driver); |
121 | } | 121 | } |
122 | 122 | ||
123 | static void htcherald_panel_drv_cleanup(void) | 123 | static void __exit htcherald_panel_drv_cleanup(void) |
124 | { | 124 | { |
125 | platform_driver_unregister(&htcherald_panel_driver); | 125 | platform_driver_unregister(&htcherald_panel_driver); |
126 | } | 126 | } |
diff --git a/drivers/video/omap/omapfb.h b/drivers/video/omap/omapfb.h index 46e4714014e8..af3c9e571ec3 100644 --- a/drivers/video/omap/omapfb.h +++ b/drivers/video/omap/omapfb.h | |||
@@ -203,6 +203,8 @@ struct omapfb_device { | |||
203 | 203 | ||
204 | struct omapfb_mem_desc mem_desc; | 204 | struct omapfb_mem_desc mem_desc; |
205 | struct fb_info *fb_info[OMAPFB_PLANE_NUM]; | 205 | struct fb_info *fb_info[OMAPFB_PLANE_NUM]; |
206 | |||
207 | struct platform_device *dssdev; /* dummy dev for clocks */ | ||
206 | }; | 208 | }; |
207 | 209 | ||
208 | #ifdef CONFIG_ARCH_OMAP1 | 210 | #ifdef CONFIG_ARCH_OMAP1 |
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index c7f59a5ccdbc..2c4f470fa086 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c | |||
@@ -83,6 +83,19 @@ static struct caps_table_struct color_caps[] = { | |||
83 | { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, | 83 | { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static void omapdss_release(struct device *dev) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | /* dummy device for clocks */ | ||
91 | static struct platform_device omapdss_device = { | ||
92 | .name = "omapdss", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .release = omapdss_release, | ||
96 | }, | ||
97 | }; | ||
98 | |||
86 | /* | 99 | /* |
87 | * --------------------------------------------------------------------------- | 100 | * --------------------------------------------------------------------------- |
88 | * LCD panel | 101 | * LCD panel |
@@ -1700,6 +1713,7 @@ static int omapfb_do_probe(struct platform_device *pdev, | |||
1700 | 1713 | ||
1701 | fbdev->dev = &pdev->dev; | 1714 | fbdev->dev = &pdev->dev; |
1702 | fbdev->panel = panel; | 1715 | fbdev->panel = panel; |
1716 | fbdev->dssdev = &omapdss_device; | ||
1703 | platform_set_drvdata(pdev, fbdev); | 1717 | platform_set_drvdata(pdev, fbdev); |
1704 | 1718 | ||
1705 | mutex_init(&fbdev->rqueue_mutex); | 1719 | mutex_init(&fbdev->rqueue_mutex); |
@@ -1814,8 +1828,16 @@ cleanup: | |||
1814 | 1828 | ||
1815 | static int omapfb_probe(struct platform_device *pdev) | 1829 | static int omapfb_probe(struct platform_device *pdev) |
1816 | { | 1830 | { |
1831 | int r; | ||
1832 | |||
1817 | BUG_ON(fbdev_pdev != NULL); | 1833 | BUG_ON(fbdev_pdev != NULL); |
1818 | 1834 | ||
1835 | r = platform_device_register(&omapdss_device); | ||
1836 | if (r) { | ||
1837 | dev_err(&pdev->dev, "can't register omapdss device\n"); | ||
1838 | return r; | ||
1839 | } | ||
1840 | |||
1819 | /* Delay actual initialization until the LCD is registered */ | 1841 | /* Delay actual initialization until the LCD is registered */ |
1820 | fbdev_pdev = pdev; | 1842 | fbdev_pdev = pdev; |
1821 | if (fbdev_panel != NULL) | 1843 | if (fbdev_panel != NULL) |
@@ -1843,6 +1865,9 @@ static int omapfb_remove(struct platform_device *pdev) | |||
1843 | fbdev->state = OMAPFB_DISABLED; | 1865 | fbdev->state = OMAPFB_DISABLED; |
1844 | omapfb_free_resources(fbdev, saved_state); | 1866 | omapfb_free_resources(fbdev, saved_state); |
1845 | 1867 | ||
1868 | platform_device_unregister(&omapdss_device); | ||
1869 | fbdev->dssdev = NULL; | ||
1870 | |||
1846 | return 0; | 1871 | return 0; |
1847 | } | 1872 | } |
1848 | 1873 | ||
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index fed7b1bda19c..1162603c72e5 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c | |||
@@ -83,13 +83,13 @@ static inline u32 rfbi_read_reg(int idx) | |||
83 | 83 | ||
84 | static int rfbi_get_clocks(void) | 84 | static int rfbi_get_clocks(void) |
85 | { | 85 | { |
86 | rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick"); | 86 | rfbi.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick"); |
87 | if (IS_ERR(rfbi.dss_ick)) { | 87 | if (IS_ERR(rfbi.dss_ick)) { |
88 | dev_err(rfbi.fbdev->dev, "can't get ick\n"); | 88 | dev_err(rfbi.fbdev->dev, "can't get ick\n"); |
89 | return PTR_ERR(rfbi.dss_ick); | 89 | return PTR_ERR(rfbi.dss_ick); |
90 | } | 90 | } |
91 | 91 | ||
92 | rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck"); | 92 | rfbi.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck"); |
93 | if (IS_ERR(rfbi.dss1_fck)) { | 93 | if (IS_ERR(rfbi.dss1_fck)) { |
94 | dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); | 94 | dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); |
95 | clk_put(rfbi.dss_ick); | 95 | clk_put(rfbi.dss_ick); |