From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [NAND] S3C2410: Fix NFC clock enable/disable imbalance
Date: Tue, 8 Dec 2009 12:16:08 +0000 [thread overview]
Message-ID: <20091208121607.GA20364@trinity.fluff.org> (raw)
In-Reply-To: <200912081307.17955.jbe@pengutronix.de>
On Tue, Dec 08, 2009 at 01:07:17PM +0100, Juergen Beisert wrote:
> On Dienstag, 8. Dezember 2009, Sergei Shtylyov wrote:
> > Hello.
> >
> > Juergen Beisert wrote:
> > > When unmounting an mtd filesystem the s3c2410_nand_select_chip() function
> > > gets called again with "chip == -1". In this case the current code
> > > disables the NFC clock at least a second time, so it does not work
> > > anymore. Clock disabling should only happen if it was really enabled.
> > >
> > > Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
> > >
> > > ---
> > > drivers/mtd/nand/s3c2410.c | 8 ++++++--
> > > 1 file changed, 6 insertions(+), 2 deletions(-)
> > >
> > > Index: linux-2.6.32/drivers/mtd/nand/s3c2410.c
> > > ===================================================================
> > > --- linux-2.6.32.orig/drivers/mtd/nand/s3c2410.c
> > > +++ linux-2.6.32/drivers/mtd/nand/s3c2410.c
> > > @@ -329,12 +329,16 @@ static void s3c2410_nand_select_chip(str
> > > struct s3c2410_nand_mtd *nmtd;
> > > struct nand_chip *this = mtd->priv;
> > > unsigned long cur;
> > > + int clock_enabled;
> >
> > Could be *bool*...
>
> I'm not sure. When this function is called more than once to disable a NAND
> device chip select, who knows if it might be called more than once to enable
> it? Just an idea.
it might be worth tracking the clock state, not only in these case but to
ensure that things like suspend/resume cycles don't cause problems too.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
prev parent reply other threads:[~2009-12-08 12:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 9:56 [PATCH] [NAND] S3C2410: Fix NFC clock enable/disable imbalance Juergen Beisert
2009-12-08 10:23 ` Juergen Beisert
2009-12-08 12:01 ` [PATCH] [NAND] S3C2410: Fix NFC clock enable/disable imbalance (2nd try) Juergen Beisert
2009-12-08 13:17 ` Ladislav Michl
[not found] ` <4B1E3815.9020901@ru.mvista.com>
2009-12-08 12:07 ` [PATCH] [NAND] S3C2410: Fix NFC clock enable/disable imbalance Juergen Beisert
2009-12-08 12:16 ` Ben Dooks [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=20091208121607.GA20364@trinity.fluff.org \
--to=ben-linux@fluff.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).