devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sathya Prakash M R <sathyap@ti.com>
To: tony@atomide.com, tomi.valkeinen@ti.com,
	devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
	rob.herring@calxeda.com, pawel.moll@arm.com,
	mark.rutland@arm.com, paul@pwsan.com
Subject: [PATCH v2 2/4] ARM: AM43xx: fix dpll init in bypass mode
Date: Thu, 13 Mar 2014 14:28:27 +0530	[thread overview]
Message-ID: <1394701109-6721-3-git-send-email-sathyap@ti.com> (raw)
In-Reply-To: <1394701109-6721-1-git-send-email-sathyap@ti.com>

From: Tomi Valkeinen <tomi.valkeinen@ti.com>

On AM43xx, if a PLL is in bypass at kernel init, the code in
omap2_get_dpll_rate() will not realize this and will try to calculate
the clock rate using the multiplier and the divider, resulting in
errors.

omap2_init_dpll_parent() has similar issue.

Add the missing soc_is_am43xx() check to make the code work on AM43xx.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/clkt_dpll.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index 924c230..14e9e45 100644
--- a/arch/arm/mach-omap2/clkt_dpll.c
+++ b/arch/arm/mach-omap2/clkt_dpll.c
@@ -209,7 +209,7 @@ u8 omap2_init_dpll_parent(struct clk_hw *hw)
 		if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
 		    v == OMAP3XXX_EN_DPLL_FRBYPASS)
 			return 1;
-	} else if (soc_is_am33xx() || cpu_is_omap44xx()) {
+	} else if (soc_is_am33xx() || cpu_is_omap44xx() || soc_is_am43xx()) {
 		if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
 		    v == OMAP4XXX_EN_DPLL_FRBYPASS ||
 		    v == OMAP4XXX_EN_DPLL_MNBYPASS)
@@ -255,7 +255,7 @@ unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
 		if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
 		    v == OMAP3XXX_EN_DPLL_FRBYPASS)
 			return __clk_get_rate(dd->clk_bypass);
-	} else if (soc_is_am33xx() || cpu_is_omap44xx()) {
+	} else if (soc_is_am33xx() || cpu_is_omap44xx() || soc_is_am43xx()) {
 		if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
 		    v == OMAP4XXX_EN_DPLL_FRBYPASS ||
 		    v == OMAP4XXX_EN_DPLL_MNBYPASS)
-- 
1.7.9.5


  parent reply	other threads:[~2014-03-13  8:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  8:58 [PATCH v2 0/4] Add Display support for AM43xx Sathya Prakash M R
2014-03-13  8:58 ` [PATCH v2 1/4] OMAPDSS: Add DSS features " Sathya Prakash M R
2014-03-13  8:58 ` Sathya Prakash M R [this message]
2014-03-13 10:24   ` [PATCH v2 2/4] ARM: AM43xx: fix dpll init in bypass mode Tomi Valkeinen
2014-03-13 10:32     ` Sathya Prakash
2014-03-13  8:58 ` [PATCH v2 3/4] ARM: OMAP2+: AM43xx DSS Hwmod Sathya Prakash M R
2014-03-13  8:58 ` [PATCH v2 4/4] ARM: DTS: AM43x: Add DSS node Sathya Prakash M R
2014-03-13 10:21   ` Tomi Valkeinen
2014-03-13 10:30     ` Sathya Prakash
2014-03-13 17:46   ` Mark Rutland
2014-03-13 18:22     ` Tomi Valkeinen
2014-03-14  9:10       ` Mark Rutland
2014-03-14  9:42         ` Tomi Valkeinen
2014-03-14 10:14           ` Mark Rutland
2014-03-14 10:19             ` Tomi Valkeinen
2014-03-14 11:07               ` Tomi Valkeinen
2014-03-14 14:07                 ` Mark Rutland
2014-03-14 16:04                   ` Felipe Balbi
2014-03-14 16:34                     ` Tomi Valkeinen
2014-03-14 18:00                       ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394701109-6721-3-git-send-email-sathyap@ti.com \
    --to=sathyap@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=paul@pwsan.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).