From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/14] ARM: LPC32XX: Clock driver
Date: Fri, 19 Feb 2010 10:21:54 +0100 [thread overview]
Message-ID: <20100219092154.GA13068@pengutronix.de> (raw)
In-Reply-To: <083DF309106F364B939360100EC290F805CCD42BF8@eu1rdcrdc1wx030.exi.nxp.com>
Hello Kevin,
On Fri, Feb 19, 2010 at 01:42:30AM +0100, Kevin Wells wrote:
> > > +
> > > +static inline void clk_unlock(void)
> > > +{
> > > + mutex_unlock(&clkm_lock);
> > > +}
> > > +
> > > +static void local_clk_disable(struct clk *clk)
> > > +{
> > > + /* Don't attempt to disable clock if it has no users */
> > WARN_ON(clk->usecount <= 0)?
>
> Is the expectation that the driver will always enable a clock
> prior to disabling it and balance each disable with a previous
> enable?
Quoting include/linux/clk.h:
* Implementation detail: if the clock source is shared between
* multiple drivers, clk_enable() calls must be balanced by the
* same number of clk_disable() calls for the clock source to be
* disabled.
*/
This doesn't answer your complete question, but yes, a driver that
havn't enabled a clk must not disable it.
> I'm seeing a specific case of disable first, some
> register accesses, and then clock enable on the amba clcd
> driver (the warning fires on the first disable before enable).
>
> [<c002b098>] (clk_disable+0x0/0x34) from [<c014555c>] (clcdfb_disable+0xa8/0xb0)
> r5:00000000 r4:c3c10400
> [<c01454b4>] (clcdfb_disable+0x0/0xb0) from [<c014570c>] (clcdfb_set_par+0x50/0xe8)
> r6:00000028 r5:c3c10400 r4:c3c10400
> [<c01456bc>] (clcdfb_set_par+0x0/0xe8) from [<c0140884>] (fbcon_init+0x2f4/0x42c)
So yes, this is a bug.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2010-02-19 9:21 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 0:11 LPC32XX architecture files (updated v3) wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 01/14] ARM: LPC32XX: Initial architecture header files wellsk40 at gmail.com
2010-02-09 9:31 ` Uwe Kleine-König
2010-02-09 9:52 ` Uwe Kleine-König
2010-02-09 9:59 ` Russell King - ARM Linux
2010-02-09 16:52 ` Uwe Kleine-König
2010-02-09 17:10 ` H Hartley Sweeten
2010-02-09 17:58 ` Russell King - ARM Linux
2010-02-09 19:17 ` Kevin Wells
2010-02-09 0:11 ` [PATCH 02/14] ARM: LPC32XX: Debug and IRQ macros wellsk40 at gmail.com
2010-02-09 9:45 ` Uwe Kleine-König
2010-02-09 0:11 ` [PATCH 03/14] ARM: LPC32XX: Clock driver wellsk40 at gmail.com
2010-02-09 10:39 ` Uwe Kleine-König
2010-02-09 19:18 ` Kevin Wells
2010-02-19 0:42 ` Kevin Wells
2010-02-19 9:21 ` Uwe Kleine-König [this message]
2010-02-09 0:11 ` [PATCH 04/14] ARM: LPC32XX: GPIO, timer, and IRQ drivers wellsk40 at gmail.com
2010-02-09 10:58 ` Uwe Kleine-König
2010-02-09 0:11 ` [PATCH 05/14] ARM: LPC32XX: System suspend support wellsk40 at gmail.com
2010-02-09 17:03 ` Uwe Kleine-König
2010-02-09 19:18 ` Kevin Wells
2010-02-14 16:51 ` Pavel Machek
2010-02-14 19:45 ` Russell King - ARM Linux
2010-02-09 0:11 ` [PATCH 06/14] ARM: LPC32XX: Serial support code wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 07/14] ARM: LPC32XX: Misc support functions wellsk40 at gmail.com
2010-02-12 20:06 ` Uwe Kleine-König
2010-02-09 0:11 ` [PATCH 08/14] ARM: LPC32XX: Phytec 3250 platform support wellsk40 at gmail.com
2010-02-12 20:08 ` Uwe Kleine-König
2010-02-16 19:43 ` Kevin Wells
2010-02-09 0:11 ` [PATCH 09/14] ARM: LPC32XX: Arch config menu supoport and makefiles wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 10/14] ARM: LPC32XX: Default PHY3250 kernel config (ramdisk) wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 11/14] ARM: Add support for the LPC32XX arch wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 12/14] AMBA: CLCD: LPC32XX register swap in the clcd header file wellsk40 at gmail.com
2010-02-12 14:31 ` Russell King - ARM Linux
2010-02-12 16:32 ` Kevin Wells
2010-02-12 16:41 ` Russell King - ARM Linux
2010-02-16 20:27 ` Kevin Wells
2010-02-18 17:21 ` Russell King - ARM Linux
2010-02-09 0:11 ` [PATCH 13/14] i2c: Add support for the LPC32XX arch wellsk40 at gmail.com
2010-02-09 0:11 ` [PATCH 14/14] WATCHDOG: " wellsk40 at gmail.com
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=20100219092154.GA13068@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--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).