linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <bbrezillon@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: fsmc: Keep CE enabled fix mb() drain
Date: Wed, 9 Jan 2019 23:05:25 +0100	[thread overview]
Message-ID: <20190109230525.62038898@bbrezillon> (raw)
In-Reply-To: <CACRpkdaouj-0gC4p1Ymx+guxDLO7R0FzQZncgNQjaHkGuiAhLQ@mail.gmail.com>

On Wed, 9 Jan 2019 22:40:22 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:

> On Wed, Jan 9, 2019 at 10:21 PM Boris Brezillon <bbrezillon@kernel.org> wrote:
> > On Wed,  9 Jan 2019 21:55:30 +0100
> > Linus Walleij <linus.walleij@linaro.org> wrote:  
> 
> > > This patch keeps the CE (chip enable, the only chip select)
> > > signal from the FSMC block enabled from the first command
> > > after probe() or resume() until the driver either suspend()
> > > or remove(). Create a state variable to track this.  
> >
> > I just read the Spear600 reference manual, and I'm not sure the
> > BANK_ENABLE bit controls the CE line. My understanding is that it just
> > marks the bank as active and CE line is asserted when you actually
> > access the AHB mem bank range (probably after making sure the FSMC bus
> > is idle).  
> 
> The Nomadik STn8815 says (for this bit):
> 
> PBKEN PC-card/NAND-Flash chip-select enable.
> Enables the corresponding chip-select.
> If a disabled chip-select is accessed, an HRESP = ERROR is generated
> on the AHB bus.
> 0: disabled (default after reset)
> 1: enabled
> 
> The same for Nomadik STn8820 and the Ux500 variants.
> 
> So "enable" might very well have the meaning you say above,
> it's just very unclear and confusing.
> 
> > If I'm correct, I'd recommend dropping fsmc_ce_ctrl() and marking the
> > bank enabled at probe time.  
> 
> This already happens in fsmc_nand_setup() so we just
> need to delete some code then.
> 
> But maybe we should disable it during remove()
> at least?

Yep, and set it again at resume time, just in case regs content is lost
at suspend time.

  reply	other threads:[~2019-01-09 22:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 20:55 [PATCH] mtd: rawnand: fsmc: Keep CE enabled fix mb() drain Linus Walleij
2019-01-09 21:21 ` Boris Brezillon
2019-01-09 21:40   ` Linus Walleij
2019-01-09 22:05     ` Boris Brezillon [this message]
2019-01-09 21:49   ` Boris Brezillon

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=20190109230525.62038898@bbrezillon \
    --to=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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).