]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] s5p-fimc: Remove sclk_cam clock handling
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 10 Jun 2011 18:36:45 +0000 (15:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 6 Sep 2011 18:19:16 +0000 (15:19 -0300)
There are 2 separate clock outputs available in the SoC for external sensors.
These two clocks can be shared among all FIMC entities and there is
currently no any arbitration of the clocks in the driver.

So make the capture driver not touching these clocks and let them be
be properly handled at the media device driver level, enabling proper
arbitration between FIMC entities.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-core.c
drivers/media/video/s5p-fimc/fimc-core.h

index 93c4e1a02f90d8562014c41c44b335b25cee1134..9809764b53880f75b7641ff3770ea7759187ab70 100644 (file)
@@ -30,7 +30,7 @@
 #include "fimc-core.h"
 
 static char *fimc_clocks[MAX_FIMC_CLOCKS] = {
-       "sclk_fimc", "fimc", "sclk_cam"
+       "sclk_fimc", "fimc"
 };
 
 static struct fimc_fmt fimc_formats[] = {
@@ -1636,7 +1636,6 @@ static int fimc_probe(struct platform_device *pdev)
        struct samsung_fimc_driverdata *drv_data;
        struct s5p_platform_fimc *pdata;
        int ret = 0;
-       int cap_input_index = -1;
 
        dev_dbg(&pdev->dev, "%s():\n", __func__);
 
@@ -1689,14 +1688,6 @@ static int fimc_probe(struct platform_device *pdev)
                goto err_req_region;
        }
 
-       fimc->num_clocks = MAX_FIMC_CLOCKS - 1;
-
-       /* Check if a video capture node needs to be registered. */
-       if (pdata && pdata->num_clients > 0) {
-               cap_input_index = 0;
-               fimc->num_clocks++;
-       }
-
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (!res) {
                dev_err(&pdev->dev, "failed to get IRQ resource\n");
@@ -1705,6 +1696,7 @@ static int fimc_probe(struct platform_device *pdev)
        }
        fimc->irq = res->start;
 
+       fimc->num_clocks = MAX_FIMC_CLOCKS;
        ret = fimc_clk_get(fimc);
        if (ret)
                goto err_regs_unmap;
index c8a2bab9a6f60119c1342f4fc9682797874aa23d..d82bff8c4d1636220e879593ac34a6c99c96b038 100644 (file)
@@ -34,7 +34,7 @@
 
 /* Time to wait for next frame VSYNC interrupt while stopping operation. */
 #define FIMC_SHUTDOWN_TIMEOUT  ((100*HZ)/1000)
-#define MAX_FIMC_CLOCKS                3
+#define MAX_FIMC_CLOCKS                2
 #define MODULE_NAME            "s5p-fimc"
 #define FIMC_MAX_DEVS          4
 #define FIMC_MAX_OUT_BUFS      4
@@ -46,7 +46,6 @@
 enum {
        CLK_BUS,
        CLK_GATE,
-       CLK_CAM,
 };
 
 enum fimc_dev_flags {