From: Dirk Behme <dirk.behme@googlemail.com>
To: Paul Walmsley <paul@pwsan.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Cc: "Gadiyar, Anand" <gadiyar@ti.com>,
"jouni.hogander@nokia.com" <jouni.hogander@nokia.com>
Subject: Re: [PATCH] OMAP3 clock: fix omap2_clk_wait_ready for OMAP3430ES2 DSS
Date: Sun, 22 Jun 2008 14:01:23 +0200 [thread overview]
Message-ID: <485E3F13.9040801@googlemail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0806211054100.19765@utopia.booyaka.com>
Paul Walmsley wrote:
> On OMAP3430ES2, DSS has both an initiator standby CM_IDLEST bit, and a
> target idle CM_IDLEST bit. This is a departure from previous silicon,
> which only had an initiator standby bit.
>
> This means we need to test the target idle bit after enabling
> dss1_alwon_fclk. Previous clock code has done the wrong thing since ES2
> came out: it's either tested the wrong bit, causing intermittent
>
> Clock dss1_alwon_fck didn't enable in 100000 tries
>
> messages; or not tested anything at all, causing intermittent crashes
> during DISPC initialization with:
>
> Unhandled fault: external abort on non-linefetch (0x1028)
>
> This patch modifies omap2_clk_wait_ready() to wait for the DSS to become
> accessible after dss1_alwon_fclk is enabled.
>
> Thanks to Anand Gadiyar <gadiyar@ti.com> for identifying one of the
> problem patches.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Dirk Behme <dirk.behme@gmail.com>
> arch/arm/mach-omap2/clock.c | 30 ++++++++++++++++++++++++------
> arch/arm/mach-omap2/cm-regbits-34xx.h | 4 +++-
> 2 files changed, 27 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
> index ed15868..1820f75 100644
> --- a/arch/arm/mach-omap2/clock.c
> +++ b/arch/arm/mach-omap2/clock.c
> @@ -244,18 +244,36 @@ static void omap2_clk_wait_ready(struct clk *clk)
> }
>
> /* REVISIT: What are the appropriate exclusions for 34XX? */
> - /* OMAP3: ignore DSS-mod clocks */
> - if (cpu_is_omap34xx() &&
> - ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) ||
> - (((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(CORE_MOD, 0)) &&
> - clk->enable_bit == OMAP3430_EN_SSI_SHIFT)))
> - return;
> + if (cpu_is_omap34xx()) {
> +
> + /* 3430ES1 DSS and SSI have no target idlest bits */
> + if (is_sil_rev_equal_to(OMAP3430_REV_ES1_0) &&
> + ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) ||
> + ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(CORE_MOD, 0) &&
> + clk->enable_bit == OMAP3430_EN_SSI_SHIFT)))
> + return;
> +
> + /* Even for 3430ES2 DSS, only wait for dss1_alwon_fclk */
> + if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0) &&
> + (reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) &&
> + clk->enable_bit != OMAP3430_EN_DSS1_SHIFT)
> + return;
> +
> + }
>
> /* Check if both functional and interface clocks
> * are running. */
> bit = 1 << clk->enable_bit;
> if (!(__raw_readl((__force void __iomem *)other_reg) & bit))
> return;
> +
> + /* OMAP3430ES2 DSS is an unusual case */
> + if (cpu_is_omap34xx() &&
> + (reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) &&
> + clk->enable_bit == OMAP3430_EN_DSS1_SHIFT) {
> + bit = OMAP3430ES2_ST_DSS_IDLE;
> + }
> +
> st_reg = ((other_reg & ~0xf0) | 0x20); /* CM_IDLEST* */
>
> omap2_wait_clock_ready((__force void __iomem *)st_reg, bit, clk->name);
> diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
> index 6ec66f4..946c552 100644
> --- a/arch/arm/mach-omap2/cm-regbits-34xx.h
> +++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
> @@ -500,7 +500,9 @@
> #define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0
>
> /* CM_IDLEST_DSS */
> -#define OMAP3430_ST_DSS (1 << 0)
> +#define OMAP3430ES2_ST_DSS_IDLE (1 << 1)
> +#define OMAP3430ES2_ST_DSS_STDBY (1 << 0)
> +#define OMAP3430ES1_ST_DSS (1 << 0)
>
> /* CM_AUTOIDLE_DSS */
> #define OMAP3430_AUTO_DSS (1 << 0)
>
prev parent reply other threads:[~2008-06-22 12:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 14:33 Boot failure on OMAP 3430 SDP Gadiyar, Anand
2008-06-21 6:44 ` Dirk Behme
2008-06-21 8:20 ` Gadiyar, Anand
2008-06-21 12:18 ` Dirk Behme
2008-06-21 17:05 ` [PATCH] OMAP3 clock: fix omap2_clk_wait_ready for OMAP3430ES2 DSS Paul Walmsley
2008-06-22 10:35 ` Koen Kooi
2008-06-22 12:51 ` Woodruff, Richard
2008-06-22 13:21 ` Koen Kooi
2008-06-22 19:09 ` [PATCH v2] " Paul Walmsley
2008-06-23 6:16 ` Högander Jouni
2008-06-23 14:52 ` Paul Walmsley
2008-06-24 5:54 ` Högander Jouni
2008-06-22 12:01 ` Dirk Behme [this message]
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=485E3F13.9040801@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=gadiyar@ti.com \
--cc=jouni.hogander@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.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