Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98bb1551 authored by Abhijit Pagare's avatar Abhijit Pagare Committed by Paul Walmsley
Browse files

ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.



In OMAP2/3 some of the clock-domains which did not have control
facility were being falsely written to and read using the CM_CLKSTCTRL
register though it did not exist for them. One check is added to remove
this flaw.

Signed-off-by: default avatarAbhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
parent 48bca0e9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
	 * downstream clocks for debugging purposes?
	 */

	if (!clkdm || !clk)
	if (!clkdm || !clk || !clkdm->clktrctrl_mask)
		return -EINVAL;

	if (atomic_inc_return(&clkdm->usecount) > 1)
@@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
	 * downstream clocks for debugging purposes?
	 */

	if (!clkdm || !clk)
	if (!clkdm || !clk || !clkdm->clktrctrl_mask)
		return -EINVAL;

#ifdef DEBUG