From: Tony Lindgren <tony@atomide.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: DEBUG_LL on OMAP1 (was Re: [PATCH] ARM: OMAP: Fix map_io for Amstrad E3)
Date: Mon, 14 Nov 2011 10:24:53 -0800 [thread overview]
Message-ID: <20111114182453.GK31337@atomide.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1111121403370.6049@dell>
* Aaro Koskinen <aaro.koskinen@iki.fi> [111112 03:42]:
> Hi,
>
> On Thu, 10 Nov 2011, Tony Lindgren wrote:
> >* Aaro Koskinen <aaro.koskinen@iki.fi> [111110 13:31]:
> >>--- a/arch/arm/mach-omap1/clock_data.c
> >>+++ b/arch/arm/mach-omap1/clock_data.c
> >>@@ -774,14 +774,6 @@ int __init omap1_clk_init(void)
> >> int crystal_type = 0; /* Default 12 MHz */
> >> u32 reg, cpu_mask;
> >>
> >>-#ifdef CONFIG_DEBUG_LL
> >>- /*
> >>- * Resets some clocks that may be left on from bootloader,
> >>- * but leaves serial clocks on.
> >>- */
> >>- omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
> >>-#endif
> >>-
> >> /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
> >> reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
> >> omap_writew(reg, SOFT_REQ_REG);
> >
> >Hmm that should keep the serial clocks on. What other bit(s) need to
> >be on in MOD_CONF_CTRL_0 for you in addition to the serial bits?
>
> On my board those serial bits are zero during the early boot (and the
> serial works). By setting those bits the clock will switch from 12 ->
> 48 MHz and I guess the baud rate will change and that's why the output
> turns into garbage.
OK, looks like on OSK5912 the uart1 serial bit is zero and must be set..
> So I think the code should reset the other bits, and leave serial bits
> untouched:
Sounds like we need SoC specific init_early for omap1 too. That way we
can also get rid of the CONFIG_OMAP_ARM_XXXMHZ Kconfig options that
are needed to make omap1_defconfig more usable.
Regards,
Tony
> diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
> index 1297bb5..b3b69d8 100644
> --- a/arch/arm/mach-omap1/clock_data.c
> +++ b/arch/arm/mach-omap1/clock_data.c
> @@ -788,7 +788,11 @@ int __init omap1_clk_init(void)
> * Resets some clocks that may be left on from bootloader,
> * but leaves serial clocks on.
> */
> - omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
> + reg = omap_readl(MOD_CONF_CTRL_0) &
> + ((1 << CONF_MOD_UART1_CLK_MODE_R) |
> + (1 << CONF_MOD_UART2_CLK_MODE_R) |
> + (1 << CONF_MOD_UART3_CLK_MODE_R));
> + omap_writel(reg, MOD_CONF_CTRL_0);
> #endif
>
> /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
>
prev parent reply other threads:[~2011-11-14 18:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 22:55 3.2-rc1 boot broken on OMAP1 / Amstrad E3 Aaro Koskinen
2011-11-09 23:19 ` Tony Lindgren
2011-11-09 23:25 ` [PATCH] ARM: OMAP: Fix map_io for " Tony Lindgren
2011-11-09 23:39 ` Russell King - ARM Linux
2011-11-10 0:00 ` Aaro Koskinen
2011-11-10 0:04 ` Tony Lindgren
2011-11-10 0:28 ` Aaro Koskinen
2011-11-10 23:33 ` Janusz Krzysztofik
2011-11-10 22:06 ` Aaro Koskinen
2011-11-10 23:23 ` Tony Lindgren
2011-11-11 19:16 ` [PATCH] ARM: OMAP: Fix reprogramming of dpll1 rate Tony Lindgren
2011-11-11 23:22 ` Aaro Koskinen
2011-11-14 17:44 ` Tony Lindgren
2011-11-12 12:16 ` DEBUG_LL on OMAP1 (was Re: [PATCH] ARM: OMAP: Fix map_io for Amstrad E3) Aaro Koskinen
2011-11-14 18:24 ` Tony Lindgren [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=20111114182453.GK31337@atomide.com \
--to=tony@atomide.com \
--cc=aaro.koskinen@iki.fi \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/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