Re: [PATCH v4 1/4] mtd: nand: gpio: Add DT property to automatically determine bus width

Alexander Shiyan shc_work at mail.ru
Sat Aug 17 17:27:30 EDT 2013


> On Fri, Aug 16, 2013 at 11:19:42AM +0400, Alexander Shiyan wrote:
> > This patch adds a property to automatically determine the NAND
> > bus width. This property works if the bus width is not specified
> > explicitly.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
[...]
> > +	if (resource_size(res) < 2)
> > +		gpiomtd->plat.options &= ~(NAND_BUSWIDTH_16 |
> > +					   NAND_BUSWIDTH_AUTO);
> 
> I can't quite figure out what the significance of resource_size(res) < 2
> is. It doesn't quite match my reading of the device-tree documentation.
> Maybe I'm being dense. Is the resource provided as either an 8-bit IO
> address (length=1) or 16-bit IO address (length=2)?

Size in bytes, so this is just a fault protect for length==1 && (busw==16 || busw==auto).
Do you think it's not necessary?

[...]
> I can fixup the first 2 without a resend. Depending on your response to
> the third comment, I'll apply this.

I'll prefer to resend all in next few days.
Thanks.

---


More information about the linux-mtd mailing list