aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMiguel Vadillo <vadillo@ti.com>2011-02-04 15:39:39 -0500
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:19:16 -0400
commita5f51bee0e31ddc2cdfe2cf3c62b2f22e910c703 (patch)
treef1bfb5d911c1114aa8a398134cd494f9a305941e /drivers
parent277d1ec9cedc625e954549734b8ad3584602277c (diff)
syslink: ipu_pm: hack to sofreset iss & fdif
After an iommufault iss and fdif need to be reset for the proper reuse of both. The proper api to call is _softreset() but for that sysc struct in hwmod needs to be enabled but that part is not ready. This is hack until the proper fix is done in sysc and the proper api can be used to softreset. Change-Id: I7568308bcd49697946a08a1b03b6a846dd0c9f5d Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dsp/syslink/ipu_pm/ipu_pm.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/drivers/dsp/syslink/ipu_pm/ipu_pm.c b/drivers/dsp/syslink/ipu_pm/ipu_pm.c
index 5ed0d90a293..b19522a2c43 100644
--- a/drivers/dsp/syslink/ipu_pm/ipu_pm.c
+++ b/drivers/dsp/syslink/ipu_pm/ipu_pm.c
@@ -1,4 +1,5 @@
1#define TMP_AUX_CLK_HACK 1 /* should be removed by Nov 13, 2010 */ 1#define TMP_AUX_CLK_HACK 1 /* should be removed by Nov 13, 2010 */
2#define SR_WA
2/* 3/*
3 * ipu_pm.c 4 * ipu_pm.c
4 * 5 *
@@ -319,6 +320,10 @@ static bool first_time = 1;
319/* BIOS flags states for each core in IPU */ 320/* BIOS flags states for each core in IPU */
320static void __iomem *sysm3Idle; 321static void __iomem *sysm3Idle;
321static void __iomem *appm3Idle; 322static void __iomem *appm3Idle;
323#ifdef SR_WA
324static void __iomem *issHandle;
325static void __iomem *fdifHandle;
326#endif
322 327
323/* Ducati Interrupt Capable Gptimers */ 328/* Ducati Interrupt Capable Gptimers */
324static int ipu_timer_list[NUM_IPU_TIMERS] = { 329static int ipu_timer_list[NUM_IPU_TIMERS] = {
@@ -1720,6 +1725,16 @@ static inline int ipu_pm_rel_fdif(struct ipu_pm_object *handle,
1720 retval = ipu_pm_module_stop(rcb_p->sub_type); 1725 retval = ipu_pm_module_stop(rcb_p->sub_type);
1721 if (retval) 1726 if (retval)
1722 return PM_UNSUPPORTED; 1727 return PM_UNSUPPORTED;
1728
1729#ifdef SR_WA
1730 /* Make sure the clock domain is in idle if not softreset */
1731 if ((cm_read_mod_reg(OMAP4430_CM2_CAM_MOD,
1732 OMAP4_CM_CAM_CLKSTCTRL_OFFSET)) & 0x400) {
1733 __raw_writel(__raw_readl(fdifHandle + 0x10) | 0x1,
1734 fdifHandle + 0x10);
1735 }
1736#endif
1737
1723 params->pm_fdif_counter--; 1738 params->pm_fdif_counter--;
1724 pr_debug("Release FDIF\n"); 1739 pr_debug("Release FDIF\n");
1725 1740
@@ -1901,10 +1916,19 @@ static inline int ipu_pm_rel_iss(struct ipu_pm_object *handle,
1901 1916
1902 retval = ipu_pm_module_stop(rcb_p->sub_type); 1917 retval = ipu_pm_module_stop(rcb_p->sub_type);
1903 if (retval) { 1918 if (retval) {
1904 pr_err("%s %d Error releasing ISSs\n", __func__, __LINE__); 1919 pr_err("%s %d Error releasing ISS\n", __func__, __LINE__);
1905 return PM_UNSUPPORTED; 1920 return PM_UNSUPPORTED;
1906 } 1921 }
1907 1922
1923#ifdef SR_WA
1924 /* Make sure the clock domain is in idle if not softreset */
1925 if ((cm_read_mod_reg(OMAP4430_CM2_CAM_MOD,
1926 OMAP4_CM_CAM_CLKSTCTRL_OFFSET)) & 0x100) {
1927 __raw_writel(__raw_readl(issHandle + 0x10) | 0x1,
1928 issHandle + 0x10);
1929 }
1930#endif
1931
1908 /* FIXME: 1932 /* FIXME:
1909 * disable OPTFCLKEN_CTRLCLK for camera sensors 1933 * disable OPTFCLKEN_CTRLCLK for camera sensors
1910 * should be moved to a separate function for 1934 * should be moved to a separate function for
@@ -2707,7 +2731,10 @@ int ipu_pm_setup(struct ipu_pm_config *cfg)
2707 iounmap(sysm3Idle); 2731 iounmap(sysm3Idle);
2708 goto exit; 2732 goto exit;
2709 } 2733 }
2710 2734#ifdef SR_WA
2735 issHandle = ioremap(0x52000000, (sizeof(void) * 1));
2736 fdifHandle = ioremap(0x4A10A000, (sizeof(void) * 1));
2737#endif
2711 BLOCKING_INIT_NOTIFIER_HEAD(&ipu_pm_notifier); 2738 BLOCKING_INIT_NOTIFIER_HEAD(&ipu_pm_notifier);
2712 2739
2713 return retval; 2740 return retval;
@@ -2971,6 +2998,12 @@ int ipu_pm_destroy(void)
2971 2998
2972 first_time = 1; 2999 first_time = 1;
2973 iounmap(sysm3Idle); 3000 iounmap(sysm3Idle);
3001#ifdef SR_WA
3002 iounmap(issHandle);
3003 iounmap(fdifHandle);
3004 issHandle = NULL;
3005 fdifHandle = NULL;
3006#endif
2974 sysm3Idle = NULL; 3007 sysm3Idle = NULL;
2975 appm3Idle = NULL; 3008 appm3Idle = NULL;
2976 global_rcb = NULL; 3009 global_rcb = NULL;