Re: [PATCH] mtd: rawnand: mxc: set spare area size register explicitly
From: Martin Kaiser
Date: Sun Jun 10 2018 - 09:16:18 EST
Hi Miquel,
Thus wrote Miquel Raynal (miquel.raynal@xxxxxxxxxxx):
> > Usually, this register is updated from settings in the IIM fuses when
> > the system is booting from nand flash. For other boot media, however,
> s/nand/NAND
ok
> > + /* spare area size in 16bit words */
> I thought I understood the problem with your commit message but
> then I don't get this comment. What's the link between 16-bit buses? Is
> this preset valid for both 8 and 16-bit bus width?
The register value is unrelated to the bus width.
> > + writew(mtd->oobsize >> 1, NFC_V21_RSLTSPARE_AREA);
> > +
> If this is for dividing per two oobsize value,
That's exactly what I wanted to do: mtd->oobsize is in bytes, the
register value must be in 16bit words (the specification uses the term
half-words, I'll update the comment while at it).
> I would really prefer a '/ 2' and let the compiler optimize things.
> Unless the spec is explicit about some shifting of course.
Ok, I'll use / 2 and resend the patch shortly.
Best regards,
Martin