aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap/dispc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap/dispc.c')
-rw-r--r--drivers/video/omap/dispc.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 7c833db4f9b7..c7c6455f1fa8 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -24,11 +24,12 @@
24#include <linux/vmalloc.h> 24#include <linux/vmalloc.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/platform_device.h>
27 28
28#include <plat/sram.h> 29#include <plat/sram.h>
29#include <plat/omapfb.h>
30#include <plat/board.h> 30#include <plat/board.h>
31 31
32#include "omapfb.h"
32#include "dispc.h" 33#include "dispc.h"
33 34
34#define MODULE_NAME "dispc" 35#define MODULE_NAME "dispc"
@@ -188,6 +189,11 @@ static struct {
188 struct omapfb_color_key color_key; 189 struct omapfb_color_key color_key;
189} dispc; 190} dispc;
190 191
192static struct platform_device omapdss_device = {
193 .name = "omapdss",
194 .id = -1,
195};
196
191static void enable_lcd_clocks(int enable); 197static void enable_lcd_clocks(int enable);
192 198
193static void inline dispc_write_reg(int idx, u32 val) 199static void inline dispc_write_reg(int idx, u32 val)
@@ -914,20 +920,20 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
914 920
915static int get_dss_clocks(void) 921static int get_dss_clocks(void)
916{ 922{
917 dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick"); 923 dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
918 if (IS_ERR(dispc.dss_ick)) { 924 if (IS_ERR(dispc.dss_ick)) {
919 dev_err(dispc.fbdev->dev, "can't get ick\n"); 925 dev_err(dispc.fbdev->dev, "can't get ick\n");
920 return PTR_ERR(dispc.dss_ick); 926 return PTR_ERR(dispc.dss_ick);
921 } 927 }
922 928
923 dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck"); 929 dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
924 if (IS_ERR(dispc.dss1_fck)) { 930 if (IS_ERR(dispc.dss1_fck)) {
925 dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); 931 dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
926 clk_put(dispc.dss_ick); 932 clk_put(dispc.dss_ick);
927 return PTR_ERR(dispc.dss1_fck); 933 return PTR_ERR(dispc.dss1_fck);
928 } 934 }
929 935
930 dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck"); 936 dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
931 if (IS_ERR(dispc.dss_54m_fck)) { 937 if (IS_ERR(dispc.dss_54m_fck)) {
932 dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); 938 dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
933 clk_put(dispc.dss_ick); 939 clk_put(dispc.dss_ick);
@@ -1379,6 +1385,12 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
1379 int skip_init = 0; 1385 int skip_init = 0;
1380 int i; 1386 int i;
1381 1387
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
1382 memset(&dispc, 0, sizeof(dispc)); 1394 memset(&dispc, 0, sizeof(dispc));
1383 1395
1384 dispc.base = ioremap(DISPC_BASE, SZ_1K); 1396 dispc.base = ioremap(DISPC_BASE, SZ_1K);
@@ -1522,6 +1534,7 @@ static void omap_dispc_cleanup(void)
1522 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); 1534 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
1523 put_dss_clocks(); 1535 put_dss_clocks();
1524 iounmap(dispc.base); 1536 iounmap(dispc.base);
1537 platform_device_unregister(&omapdss_device);
1525} 1538}
1526 1539
1527const struct lcd_ctrl omap2_int_ctrl = { 1540const struct lcd_ctrl omap2_int_ctrl = {