aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci/isif.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/davinci/isif.c')
-rw-r--r--drivers/media/platform/davinci/isif.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
index 5050f9265f48..3332cca632e5 100644
--- a/drivers/media/platform/davinci/isif.c
+++ b/drivers/media/platform/davinci/isif.c
@@ -32,7 +32,6 @@
32#include <linux/uaccess.h> 32#include <linux/uaccess.h>
33#include <linux/io.h> 33#include <linux/io.h>
34#include <linux/videodev2.h> 34#include <linux/videodev2.h>
35#include <linux/clk.h>
36#include <linux/err.h> 35#include <linux/err.h>
37#include <linux/module.h> 36#include <linux/module.h>
38 37
@@ -88,8 +87,6 @@ static struct isif_oper_config {
88 struct isif_ycbcr_config ycbcr; 87 struct isif_ycbcr_config ycbcr;
89 struct isif_params_raw bayer; 88 struct isif_params_raw bayer;
90 enum isif_data_pack data_pack; 89 enum isif_data_pack data_pack;
91 /* Master clock */
92 struct clk *mclk;
93 /* ISIF base address */ 90 /* ISIF base address */
94 void __iomem *base_addr; 91 void __iomem *base_addr;
95 /* ISIF Linear Table 0 */ 92 /* ISIF Linear Table 0 */
@@ -604,7 +601,7 @@ static int isif_config_raw(void)
604 if (module_params->compress.alg == ISIF_ALAW) 601 if (module_params->compress.alg == ISIF_ALAW)
605 val |= ISIF_ALAW_ENABLE; 602 val |= ISIF_ALAW_ENABLE;
606 603
607 val |= (params->data_msb << ISIF_ALAW_GAMA_WD_SHIFT); 604 val |= (params->data_msb << ISIF_ALAW_GAMMA_WD_SHIFT);
608 regw(val, CGAMMAWD); 605 regw(val, CGAMMAWD);
609 606
610 /* Configure DPCM compression settings */ 607 /* Configure DPCM compression settings */
@@ -1039,6 +1036,10 @@ static int isif_probe(struct platform_device *pdev)
1039 void *__iomem addr; 1036 void *__iomem addr;
1040 int status = 0, i; 1037 int status = 0, i;
1041 1038
1039 /* Platform data holds setup_pinmux function ptr */
1040 if (!pdev->dev.platform_data)
1041 return -ENODEV;
1042
1042 /* 1043 /*
1043 * first try to register with vpfe. If not correct platform, then we 1044 * first try to register with vpfe. If not correct platform, then we
1044 * don't have to iomap 1045 * don't have to iomap
@@ -1047,22 +1048,6 @@ static int isif_probe(struct platform_device *pdev)
1047 if (status < 0) 1048 if (status < 0)
1048 return status; 1049 return status;
1049 1050
1050 /* Get and enable Master clock */
1051 isif_cfg.mclk = clk_get(&pdev->dev, "master");
1052 if (IS_ERR(isif_cfg.mclk)) {
1053 status = PTR_ERR(isif_cfg.mclk);
1054 goto fail_mclk;
1055 }
1056 if (clk_prepare_enable(isif_cfg.mclk)) {
1057 status = -ENODEV;
1058 goto fail_mclk;
1059 }
1060
1061 /* Platform data holds setup_pinmux function ptr */
1062 if (NULL == pdev->dev.platform_data) {
1063 status = -ENODEV;
1064 goto fail_mclk;
1065 }
1066 setup_pinmux = pdev->dev.platform_data; 1051 setup_pinmux = pdev->dev.platform_data;
1067 /* 1052 /*
1068 * setup Mux configuration for ccdc which may be different for 1053 * setup Mux configuration for ccdc which may be different for
@@ -1124,9 +1109,6 @@ fail_nobase_res:
1124 release_mem_region(res->start, resource_size(res)); 1109 release_mem_region(res->start, resource_size(res));
1125 i--; 1110 i--;
1126 } 1111 }
1127fail_mclk:
1128 clk_disable_unprepare(isif_cfg.mclk);
1129 clk_put(isif_cfg.mclk);
1130 vpfe_unregister_ccdc_device(&isif_hw_dev); 1112 vpfe_unregister_ccdc_device(&isif_hw_dev);
1131 return status; 1113 return status;
1132} 1114}
@@ -1146,8 +1128,6 @@ static int isif_remove(struct platform_device *pdev)
1146 i++; 1128 i++;
1147 } 1129 }
1148 vpfe_unregister_ccdc_device(&isif_hw_dev); 1130 vpfe_unregister_ccdc_device(&isif_hw_dev);
1149 clk_disable_unprepare(isif_cfg.mclk);
1150 clk_put(isif_cfg.mclk);
1151 return 0; 1131 return 0;
1152} 1132}
1153 1133