linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: fix regression in RealView after the introduction of pclk
Date: Fri, 30 Jul 2010 21:08:57 +0100	[thread overview]
Message-ID: <20100730200857.GA15062@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTin2+hwoRmBxaxUi5Rt-9qpJO2N61YQA=0UgVPtm@mail.gmail.com>

On Fri, Jul 30, 2010 at 05:27:28PM +0200, Linus Walleij wrote:
> In the PB1176 manual there is a drawing of the clock tree, it
> shows that the fixed 24MHz reference clock is divided by a binary
> divider down to 1 MHz. So this one is likewise set in stone. I would
> be surprised if some other scheme was used for the other boards.

That's not quite the full story, because there's this in the code:

        /*
         * set clock frequency:
         *      REALVIEW_REFCLK is 32KHz
         *      REALVIEW_TIMCLK is 1MHz
         */
        val = readl(__io_address(REALVIEW_SCTL_BASE));
        writel((REALVIEW_TIMCLK << REALVIEW_TIMER1_EnSel) |
               (REALVIEW_TIMCLK << REALVIEW_TIMER2_EnSel) |
               (REALVIEW_TIMCLK << REALVIEW_TIMER3_EnSel) |
               (REALVIEW_TIMCLK << REALVIEW_TIMER4_EnSel) | val,
               __io_address(REALVIEW_SCTL_BASE));

which isn't documented in the user manual.  Yet it's necessary in order
to run the timers@1MHz.

> Thinking about it I however see that since some platforms are
> initializing their clocks in .init_irq and some in core_initcall(), some
> in arch_initcall() etc, and since most platforms have some clock
> implementation these dats, it might be worth it to add an
> optional .init_clocks() call to the struct machine_desc and
> MACHINE_START() macro to get this in uniform and call
> that even before .init_irq(). Do you think it's worth it?

It may be, but it's rather a large change to do.  We can certainly
provide the .init_clocks callback so new stuff can use it.

  reply	other threads:[~2010-07-30 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 13:05 [PATCH] ARM: fix regression in RealView after the introduction of pclk Linus Walleij
2010-07-29 13:56 ` Russell King - ARM Linux
2010-07-29 21:41   ` Linus Walleij
2010-07-29 22:21     ` Russell King - ARM Linux
2010-07-30 15:27       ` Linus Walleij
2010-07-30 20:08         ` Russell King - ARM Linux [this message]
2010-07-30 23:12           ` Linus Walleij

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=20100730200857.GA15062@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).