From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: DEBUG_LL on OMAP1 (was Re: [PATCH] ARM: OMAP: Fix map_io for Amstrad E3)
Date: Sat, 12 Nov 2011 14:16:42 +0200 (EET) [thread overview]
Message-ID: <alpine.DEB.2.00.1111121403370.6049@dell> (raw)
In-Reply-To: <20111110232349.GY31337@atomide.com>
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.
So I think the code should reset the other bits, and leave serial bits
untouched:
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) */
A.
next prev parent reply other threads:[~2011-11-12 12:16 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 ` Aaro Koskinen [this message]
2011-11-14 18:24 ` DEBUG_LL on OMAP1 (was Re: [PATCH] ARM: OMAP: Fix map_io for Amstrad E3) Tony Lindgren
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=alpine.DEB.2.00.1111121403370.6049@dell \
--to=aaro.koskinen@iki.fi \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--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