[PATCH 3/4] OMAP: DSS2: Move DPI & SDI init into DSS plat driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DPI and SDI are different from the other interfaces as they are not
hwmods and there is not platform driver for them. They could be said to
be a part of DSS or DISPC modules, although it's not a clear definition.

This patch moves DPI and SDI initialization into DSS platform driver,
making the code more consistent: omap_dss_probe() only initializes
platform drivers now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
---
 drivers/video/omap2/dss/core.c |   19 -------------------
 drivers/video/omap2/dss/dss.c  |   17 ++++++++++++++++-
 2 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index acefe50..8cfedae 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -191,12 +191,6 @@ static int omap_dss_probe(struct platform_device *pdev)
 		goto err_rfbi;
 	}
 
-	r = dpi_init();
-	if (r) {
-		DSSERR("Failed to initialize dpi\n");
-		goto err_dpi;
-	}
-
 	r = dispc_init_platform_driver();
 	if (r) {
 		DSSERR("Failed to initialize dispc platform driver\n");
@@ -210,12 +204,6 @@ static int omap_dss_probe(struct platform_device *pdev)
 	}
 
 	if (cpu_is_omap34xx()) {
-		r = sdi_init();
-		if (r) {
-			DSSERR("Failed to initialize SDI\n");
-			goto err_sdi;
-		}
-
 		r = dsi_init_platform_driver();
 		if (r) {
 			DSSERR("Failed to initialize DSI platform driver\n");
@@ -255,15 +243,10 @@ err_debugfs:
 	if (cpu_is_omap34xx())
 		dsi_uninit_platform_driver();
 err_dsi:
-	if (cpu_is_omap34xx())
-		sdi_exit();
-err_sdi:
 	venc_uninit_platform_driver();
 err_venc:
 	dispc_uninit_platform_driver();
 err_dispc:
-	dpi_exit();
-err_dpi:
 	rfbi_uninit_platform_driver();
 err_rfbi:
 	dss_uninit_platform_driver();
@@ -281,11 +264,9 @@ static int omap_dss_remove(struct platform_device *pdev)
 
 	venc_uninit_platform_driver();
 	dispc_uninit_platform_driver();
-	dpi_exit();
 	rfbi_uninit_platform_driver();
 	if (cpu_is_omap34xx()) {
 		dsi_uninit_platform_driver();
-		sdi_exit();
 	}
 
 	dss_uninit_platform_driver();
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 4025a14..e5da050 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -970,9 +970,24 @@ static int omap_dsshw_probe(struct platform_device *pdev)
 		goto err_dss;
 	}
 
+	r = dpi_init();
+	if (r) {
+		DSSERR("Failed to initialize DPI\n");
+		goto err_dpi;
+	}
+
+	r = sdi_init();
+	if (r) {
+		DSSERR("Failed to initialize SDI\n");
+		goto err_sdi;
+	}
+
 	dss_clk_disable_all_no_ctx();
 	return 0;
-
+err_sdi:
+	dpi_exit();
+err_dpi:
+	dss_exit();
 err_dss:
 	dss_clk_disable_all_no_ctx();
 	dss_put_clocks();
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux