From: Scott Wood <scottwood@freescale.com>
To: Aaron Sierra <asierra@xes-inc.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linuxppc-dev@lists.ozlabs.org, Arnd Bergmann <arnd@arndb.de>,
Prabhakar Kushwaha <prabhakar@freescale.com>
Subject: Re: [PATCH v2] fsl_ifc: Support all 8 IFC chip selects
Date: Tue, 26 Aug 2014 16:48:12 -0500 [thread overview]
Message-ID: <1409089692.6510.86.camel@snotra.buserror.net> (raw)
In-Reply-To: <1923004045.447083.1409088847731.JavaMail.zimbra@xes-inc.com>
On Tue, 2014-08-26 at 16:34 -0500, Aaron Sierra wrote:
> > > +static inline u32 fsl_ifc_version(struct fsl_ifc_regs *regs) {
> > > + return ioread32be(®s->ifc_rev) & FSL_IFC_VERSION_MASK;
> > > +}
> > > +
> > > +static inline int fsl_ifc_bank_count(struct fsl_ifc_regs *regs) {
> > > + return (fsl_ifc_version(regs) == FSL_IFC_VERSION_1_0_0) ? 4 : 8;
> > > +}
> >
> > Whitespace
>
> Oops.
>
> > Do we really need the bank count here, as opposed to just checking it in
> > probe()? I also don't really care for reading the registers over and
> > over, even though it's not performance critical.
>
> The bank count is used in fsl_ifc_nand.c and fsl_ifc.c, so I thought it
> was a good idea to have the version to bank count mapping defined in one
> place rather than two.
OK.
> > The reserved bits of the version register are defined as zero for
> > current versions -- I think just comparing ifc_rev to the version
> > constant, as is currently done, is fine.
>
> I wasn't sure because the manuals I have only say that reserved values
> are zero at reset.
Well, we already have a version check that assumes they're zero, but if
you want to be especially safe I guess that's OK. :-)
-Scott
prev parent reply other threads:[~2014-08-26 21:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1991824361.262160.1409074072267.JavaMail.zimbra@xes-inc.com>
2014-08-26 17:31 ` [PATCH v2] fsl_ifc: Support all 8 IFC chip selects Aaron Sierra
2014-08-26 20:48 ` Scott Wood
2014-08-26 21:34 ` Aaron Sierra
2014-08-26 21:48 ` Scott Wood [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=1409089692.6510.86.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=arnd@arndb.de \
--cc=asierra@xes-inc.com \
--cc=gregkh@linuxfoundation.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=prabhakar@freescale.com \
/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).