aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-06-18 06:02:39 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-09 05:04:32 -0500
commitdadd2bb931a08a4b6b17f9e82d9bbe7bedebbc98 (patch)
treef23b9f9732d61e42f88cfdab6a3923eff28ed8d3
parent91773a00f8235e4b697217867529f73e298298df (diff)
OMAP: OMAPFB: add omapdss device
The upcoming new display subsystem driver is divided to two devices, omapdss and omapfb, of which omapdss handles the actual hardware. This patch adds a dummy omapdss platform device for the current omapfb driver, which is then used to get the clocks. This will make it possible for the current and the new display drivers to co-exist. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/clock24xx.c8
-rw-r--r--arch/arm/mach-omap2/clock34xx.c14
-rw-r--r--drivers/video/omap/dispc.c19
3 files changed, 27 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index e70e7e000eaa..845b478ebeee 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -116,10 +116,10 @@ static struct omap_clk omap24xx_clks[] = {
116 CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), 116 CLK(NULL, "mdm_ick", &mdm_ick, CK_243X),
117 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), 117 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
118 /* DSS domain clocks */ 118 /* DSS domain clocks */
119 CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X), 119 CLK("omapdss", "ick", &dss_ick, CK_243X | CK_242X),
120 CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X), 120 CLK("omapdss", "dss1_fck", &dss1_fck, CK_243X | CK_242X),
121 CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X), 121 CLK("omapdss", "dss2_fck", &dss2_fck, CK_243X | CK_242X),
122 CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), 122 CLK("omapdss", "tv_fck", &dss_54m_fck, CK_243X | CK_242X),
123 /* L3 domain clocks */ 123 /* L3 domain clocks */
124 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), 124 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X),
125 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), 125 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X),
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 9f2feaf79865..ecbb5cd8eec8 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -236,13 +236,13 @@ static struct omap_clk omap34xx_clks[] = {
236 CLK("omap_rng", "ick", &rng_ick, CK_343X), 236 CLK("omap_rng", "ick", &rng_ick, CK_343X),
237 CLK(NULL, "sha11_ick", &sha11_ick, CK_343X), 237 CLK(NULL, "sha11_ick", &sha11_ick, CK_343X),
238 CLK(NULL, "des1_ick", &des1_ick, CK_343X), 238 CLK(NULL, "des1_ick", &des1_ick, CK_343X),
239 CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1), 239 CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
240 CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2), 240 CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2),
241 CLK("omapfb", "tv_fck", &dss_tv_fck, CK_343X), 241 CLK("omapdss", "tv_fck", &dss_tv_fck, CK_343X),
242 CLK("omapfb", "video_fck", &dss_96m_fck, CK_343X), 242 CLK("omapdss", "video_fck", &dss_96m_fck, CK_343X),
243 CLK("omapfb", "dss2_fck", &dss2_alwon_fck, CK_343X), 243 CLK("omapdss", "dss2_fck", &dss2_alwon_fck, CK_343X),
244 CLK("omapfb", "ick", &dss_ick_3430es1, CK_3430ES1), 244 CLK("omapdss", "ick", &dss_ick_3430es1, CK_3430ES1),
245 CLK("omapfb", "ick", &dss_ick_3430es2, CK_3430ES2), 245 CLK("omapdss", "ick", &dss_ick_3430es2, CK_3430ES2),
246 CLK(NULL, "cam_mclk", &cam_mclk, CK_343X), 246 CLK(NULL, "cam_mclk", &cam_mclk, CK_343X),
247 CLK(NULL, "cam_ick", &cam_ick, CK_343X), 247 CLK(NULL, "cam_ick", &cam_ick, CK_343X),
248 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X), 248 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X),
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index b8f75a7936a2..c7c6455f1fa8 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -24,6 +24,7 @@
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/board.h> 30#include <plat/board.h>
@@ -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 = {