Thread (4 messages) 4 messages, 2 authors, 2014-08-26

Re: [PATCH v2] fsl_ifc: Support all 8 IFC chip selects

From: Scott Wood <hidden>
Date: 2014-08-26 21:48:48

On Tue, 2014-08-26 at 16:34 -0500, Aaron Sierra wrote:
quoted
quoted
+static inline u32 fsl_ifc_version(struct fsl_ifc_regs *regs) {
+	return ioread32be(&regs->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.
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help