Skip to contentSkip to conversation

tidspbridge: Fix compilation

PATCH In review Pali Rohár 3 participants 4 messages Feb 28, 2013 – Mar 6, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tidspbridge: Fix compilation

Fix includes and use clk_prepare_enable/clk_disable_unprepare

---
 drivers/staging/tidspbridge/core/dsp-clock.c  |   16 ++++++++--------
 drivers/staging/tidspbridge/core/tiomap3430.c |    2 ++
 drivers/staging/tidspbridge/core/tiomap_io.c  |    2 ++
 drivers/staging/tidspbridge/core/wdt.c        |    8 ++++----
 4 files changed, 16 insertions(+), 12 deletions(-)
drivers/staging/tidspbridge/core/dsp-clock.c +8 -8
index 2f084e18..7d56693 100644
@@ -221,7 +221,7 @@ int dsp_clk_enable(enum dsp_clk_id clk_id)
 
 	switch (get_clk_type(clk_id)) {
 	case IVA2_CLK:
-		clk_enable(iva2_clk);
+		clk_prepare_enable(iva2_clk);
 		break;
 	case GPT_CLK:
 		status = omap_dm_timer_start(timer[clk_id - 1]);
@@ -236,9 +236,9 @@ int dsp_clk_enable(enum dsp_clk_id clk_id)
 		dev_err(bridge, "ERROR: DSP requested to enable WDT3 clk\n");
 		break;
 	case SSI_CLK:
-		clk_enable(ssi.sst_fck);
-		clk_enable(ssi.ssr_fck);
-		clk_enable(ssi.ick);
+		clk_prepare_enable(ssi.sst_fck);
+		clk_prepare_enable(ssi.ssr_fck);
+		clk_prepare_enable(ssi.ick);
 
 		/*
 		 * The SSI module need to configured not to have the Forced
@@ -297,7 +297,7 @@ int dsp_clk_disable(enum dsp_clk_id clk_id)
 
 	switch (get_clk_type(clk_id)) {
 	case IVA2_CLK:
-		clk_disable(iva2_clk);
+		clk_disable_unprepare(iva2_clk);
 		break;
 	case GPT_CLK:
 		status = omap_dm_timer_stop(timer[clk_id - 1]);
@@ -314,9 +314,9 @@ int dsp_clk_disable(enum dsp_clk_id clk_id)
 	case SSI_CLK:
 		ssi_clk_prepare(false);
 		ssi_clk_prepare(false);
-		clk_disable(ssi.sst_fck);
-		clk_disable(ssi.ssr_fck);
-		clk_disable(ssi.ick);
+		clk_disable_unprepare(ssi.sst_fck);
+		clk_disable_unprepare(ssi.ssr_fck);
+		clk_disable_unprepare(ssi.ick);
 		break;
 	default:
 		dev_err(bridge, "Invalid clock id for disable\n");
drivers/staging/tidspbridge/core/tiomap3430.c +2 -0
index f619fb3..1ba45b1 100644
@@ -55,6 +55,8 @@
 #include "_tiomap_pwr.h"
 #include "tiomap_io.h"
 
+#include "../../../../arch/arm/mach-omap2/cm3xxx.h"
+
 /* Offset in shared mem to write to in order to synchronize start with DSP */
 #define SHMSYNCOFFSET 4		/* GPP byte offset */
 
drivers/staging/tidspbridge/core/tiomap_io.c +2 -0
index f53ed98..b481bd8 100644
@@ -33,6 +33,8 @@
 #include "_tiomap_pwr.h"
 #include "tiomap_io.h"
 
+#include "../../../../arch/arm/mach-omap2/cm3xxx.h"
+
 static u32 ul_ext_base;
 static u32 ul_ext_end;
 
drivers/staging/tidspbridge/core/wdt.c +4 -4
index 7ff0e6c..b7f2348 100644
@@ -128,8 +128,8 @@ void dsp_wdt_enable(bool enable)
 	wdt_enable = enable;
 
 	if (enable) {
-		clk_enable(dsp_wdt.fclk);
-		clk_enable(dsp_wdt.iclk);
+		clk_prepare_enable(dsp_wdt.fclk);
+		clk_prepare_enable(dsp_wdt.iclk);
 		dsp_wdt.sm_wdt->wdt_setclocks = 1;
 		tmp = __raw_readl(dsp_wdt.reg_base + OMAP3_WDT3_ISR_OFFSET);
 		__raw_writel(tmp, dsp_wdt.reg_base + OMAP3_WDT3_ISR_OFFSET);
@@ -137,7 +137,7 @@ void dsp_wdt_enable(bool enable)
 	} else {
 		disable_irq(INT_34XX_WDT3_IRQ);
 		dsp_wdt.sm_wdt->wdt_setclocks = 0;
-		clk_disable(dsp_wdt.iclk);
-		clk_disable(dsp_wdt.fclk);
+		clk_disable_unprepare(dsp_wdt.iclk);
+		clk_disable_unprepare(dsp_wdt.fclk);
 	}
 }
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 10 lines · Pali Rohár

Fix includes and use clk_prepare_enable/clk_disable_unprepare

---
 drivers/staging/tidspbridge/core/dsp-clock.c  |   16 ++++++++--------
 drivers/staging/tidspbridge/core/tiomap3430.c |    2 ++
 drivers/staging/tidspbridge/core/tiomap_io.c  |    2 ++
 drivers/staging/tidspbridge/core/wdt.c        |    8 ++++----
 4 files changed, 16 insertions(+), 12 deletions(-)

Fix compilation of what? What broke? What is the error message? When did it break? In what tree does this need to go into? Why am I asking so many questions?

greg k-h

#2 lore raw
In reply to Pali Rohár

Hi,

Quoted 10 lines · Pali Rohár

Fix includes and use clk_prepare_enable/clk_disable_unprepare

---
 drivers/staging/tidspbridge/core/dsp-clock.c  |   16 ++++++++--------
 drivers/staging/tidspbridge/core/tiomap3430.c |    2 ++
 drivers/staging/tidspbridge/core/tiomap_io.c  |    2 ++
 drivers/staging/tidspbridge/core/wdt.c        |    8 ++++----
 4 files changed, 16 insertions(+), 12 deletions(-)

AFAIK, this has been taken care in the past by:

e16a922a staging: tidspbridge: use prepare/unprepare on dsp clocks fe025085 staging: tidspbridge: Fix build breakage due to splitting CM functions

Would you mind pointing the target for your patches? Perhaps stable?

Cheers,

Omar

#3 lore raw
Quoted 3 lines · On Monday 04 March 2013 10:14:31 Omar Ramirez Luna wrote:

Hi,

On Thu, Feb 28, 2013 at 11:51 AM, Pali Rohár

Quoted 21 lines · <[email protected]> wrote:
Quoted 7 lines

Fix includes and use
clk_prepare_enable/clk_disable_unprepare

---

Quoted 7 lines
 drivers/staging/tidspbridge/core/dsp-clock.c  |   16
 ++++++++--------
 drivers/staging/tidspbridge/core/tiomap3430.c |    2 ++
 drivers/staging/tidspbridge/core/tiomap_io.c  |    2 ++
 drivers/staging/tidspbridge/core/wdt.c        |    8

++++---- 4 files changed, 16 insertions(+), 12
deletions(-)

AFAIK, this has been taken care in the past by:

e16a922a staging: tidspbridge: use prepare/unprepare on dsp clocks fe025085 staging: tidspbridge: Fix build breakage due to splitting CM functions

Quoted 6 lines

Would you mind pointing the target for your patches? Perhaps stable?

Cheers,

Omar

I was not able to compile tidspbridge on 3.8-rc3. But now with 3.8 it is fixed. So drop this patch.

Signature · 2 lines
Pali Rohár
[email protected]