From: slapin@ossfans.org (Sergey Lapin)
To: linux-arm-kernel@lists.infradead.org
Subject: S3C2416 clock tree
Date: Tue, 9 Nov 2010 11:14:13 -0500 [thread overview]
Message-ID: <20101109161413.GA25138@build.ihdev.net> (raw)
In-Reply-To: <AANLkTi=H7n5tfPQkPvOhD4sUvHWYLuQBnhe64o=tkz+t@mail.gmail.com>
On Tue, Nov 09, 2010 at 06:57:02PM +0300, Dron Gus wrote:
Added Ben Dooks and Kukjin Kim to Cc:
> Hi!
>
> I work with custom board based on s3c2416 SoC. I'm trying to make
> cpufreq work. I wrote the driver based on cpu-freq.c from
> mach-s3c2410.
> On kernel start i get error message:
> cpufreq: failed to get clock 'armclk'
> s3c2416_cpufreq_add: failed to get clocks
> So i have to add dummy 'armclk' and some dummy clk_ops functions.
> Now cpufreq starts, and tries to change freqs, calling to my
> s3c2416_cpufreq_calcdivs. But the problem is that it passes wrong fclk
> value. Pll rums on 800 MHz, armclk = 400 MHz, hclk = 133, pclk = 66. I
> get fclk = 400 MHz. It is two time smaller than mpll.
> I can not understood is value of fclk the same as armclk or as mpll?
> To count correct armclk divider i must know mpll freq. But as i see in
> s3c2443_common_setup_clocks and in s3c24xx_setup_clocks, mpll rate is
> set the same as fclk, but fclk = pll / get_fdiv(clkdiv0);
> So there is three ways to solve this problem, as i see:
> 1) pass one more argument to s3c24xx_setup_clocks with value of mpll.
> This will break to many mach-s3c****
> 2) write get_rate for mpll clock and set mpll as a parent for fclk.
> Problem is that PLLs are diferent on diferent s3c SoCs.
> 3) the same as 2, but use function get_mpll, wich is passed to
> s3c2443_common_setup_clocks.
>
> Witch way is preferred?
>
> Thanks.
>
> Andrey.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2010-11-09 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 15:57 S3C2416 clock tree Dron Gus
2010-11-09 16:14 ` Sergey Lapin [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=20101109161413.GA25138@build.ihdev.net \
--to=slapin@ossfans.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).