* [PATCH] OMAP1: clock_data: use runtime cpu / machine checks
@ 2010-12-11 20:50 Janusz Krzysztofik
2010-12-13 9:24 ` Paul Walmsley
0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2010-12-11 20:50 UTC (permalink / raw)
To: linux-arm-kernel
Otherwise multi-omap1 configurations may set wrong clock speed.
Created and tested against l-o master on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
Tested with omap1_defconfig after dropping
CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y and those of 12MHz xtal based clock
speeds which are too high for my board.
arch/arm/mach-omap1/clock_data.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--- git/arch/arm/mach-omap1/clock_data.c.orig 2010-12-09 23:07:35.000000000 +0100
+++ git/arch/arm/mach-omap1/clock_data.c 2010-12-11 21:05:52.000000000 +0100
@@ -823,12 +823,10 @@ int __init omap1_clk_init(void)
crystal_type = info->system_clock_type;
}
-#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
- ck_ref.rate = 13000000;
-#elif defined(CONFIG_ARCH_OMAP16XX)
- if (crystal_type == 2)
+ if (cpu_is_omap7xx())
+ ck_ref.rate = 13000000;
+ if (cpu_is_omap16xx() && crystal_type == 2)
ck_ref.rate = 19200000;
-#endif
pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: "
"0x%04x\n", omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
@@ -883,10 +881,11 @@ int __init omap1_clk_init(void)
ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
-#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
- /* Select slicer output as OMAP input clock */
- omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, OMAP7XX_PCC_UPLD_CTRL);
-#endif
+ if (machine_is_omap_perseus2() || machine_is_omap_fsample()) {
+ /* Select slicer output as OMAP input clock */
+ omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1,
+ OMAP7XX_PCC_UPLD_CTRL);
+ }
/* Amstrad Delta wants BCLK high when inactive */
if (machine_is_ams_delta())
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] OMAP1: clock_data: use runtime cpu / machine checks
2010-12-11 20:50 [PATCH] OMAP1: clock_data: use runtime cpu / machine checks Janusz Krzysztofik
@ 2010-12-13 9:24 ` Paul Walmsley
2010-12-16 22:16 ` Cory Maccarrone
2010-12-18 5:14 ` Cory Maccarrone
0 siblings, 2 replies; 4+ messages in thread
From: Paul Walmsley @ 2010-12-13 9:24 UTC (permalink / raw)
To: linux-arm-kernel
Hello Janusz, Cory,
On Sat, 11 Dec 2010, Janusz Krzysztofik wrote:
> Otherwise multi-omap1 configurations may set wrong clock speed.
>
> Created and tested against l-o master on Amstrad Delta.
>
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Thanks, this is a significant step forward in building a good
omap1_defconfig. Cory, do you mind testing this out? If it works for you
also, let's plan to take this for 2.6.38.
However:
> Tested with omap1_defconfig after dropping
> CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y and those of 12MHz xtal based
> clock speeds which are too high for my board.
This is also key. Until the board files can somehow indicate which rate
sets are usable for their boards at runtime -- which is what the
CONFIG_OMAP_ARM* KConfig options used to do at KConfig-time -- I don't
think omap1_defconfig is possible yet.
Volunteers to tackle that project are gladly welcome :-)
- Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] OMAP1: clock_data: use runtime cpu / machine checks
2010-12-13 9:24 ` Paul Walmsley
@ 2010-12-16 22:16 ` Cory Maccarrone
2010-12-18 5:14 ` Cory Maccarrone
1 sibling, 0 replies; 4+ messages in thread
From: Cory Maccarrone @ 2010-12-16 22:16 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 13, 2010 at 1:24 AM, Paul Walmsley <paul@pwsan.com> wrote:
>
> Hello Janusz, Cory,
>
> On Sat, 11 Dec 2010, Janusz Krzysztofik wrote:
>
> > Otherwise multi-omap1 configurations may set wrong clock speed.
> >
> > Created and tested against l-o master on Amstrad Delta.
> >
> > Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
>
> Thanks, this is a significant step forward in building a good
> omap1_defconfig. ?Cory, do you mind testing this out? ?If it works for you
> also, let's plan to take this for 2.6.38.
>
Sure, no problem, I'll add it to my testing queue.
- Cory
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] OMAP1: clock_data: use runtime cpu / machine checks
2010-12-13 9:24 ` Paul Walmsley
2010-12-16 22:16 ` Cory Maccarrone
@ 2010-12-18 5:14 ` Cory Maccarrone
1 sibling, 0 replies; 4+ messages in thread
From: Cory Maccarrone @ 2010-12-18 5:14 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 13, 2010 at 1:24 AM, Paul Walmsley <paul@pwsan.com> wrote:
> Hello Janusz, Cory,
>
> On Sat, 11 Dec 2010, Janusz Krzysztofik wrote:
>
>> Otherwise multi-omap1 configurations may set wrong clock speed.
>>
>> Created and tested against l-o master on Amstrad Delta.
>>
>> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
>
> Thanks, this is a significant step forward in building a good
> omap1_defconfig. ?Cory, do you mind testing this out? ?If it works for you
> also, let's plan to take this for 2.6.38.
>
> However:
>
>> Tested with omap1_defconfig after dropping
>> CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y and those of 12MHz xtal based
>> clock speeds which are too high for my board.
>
> This is also key. ?Until the board files can somehow indicate which rate
> sets are usable for their boards at runtime -- which is what the
> CONFIG_OMAP_ARM* KConfig options used to do at KConfig-time -- I don't
> think omap1_defconfig is possible yet.
>
> Volunteers to tackle that project are gladly welcome :-)
>
>
> - Paul
>
This doesn't seem to work for me. Using my own config, it'll boot
fine, but the omap1_defconfig, even after making the above changes,
still fails to boot. I'll see if I can figure out what makes it stop.
- Cory
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-18 5:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-11 20:50 [PATCH] OMAP1: clock_data: use runtime cpu / machine checks Janusz Krzysztofik
2010-12-13 9:24 ` Paul Walmsley
2010-12-16 22:16 ` Cory Maccarrone
2010-12-18 5:14 ` Cory Maccarrone
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).