[PATCH] Documentation: binding: Update endianness usage

Prabhakar Kushwaha prabhakar.kushwaha at nxp.com
Tue Dec 5 01:45:33 PST 2017


> -----Original Message-----
> From: Scott Wood [mailto:oss at buserror.net]
> Sent: Tuesday, December 05, 2017 8:16 AM
> To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; linux-
> mtd at lists.infradead.org; devicetree at vger.kernel.org
> Cc: dedekind1 at gmail.com; computersforpeace at gmail.com
> Subject: Re: [PATCH] Documentation: binding: Update endianness usage
> 
> On Mon, 2017-12-04 at 04:33 +0000, Prabhakar Kushwaha wrote:
> > > -----Original Message-----
> > > From: Scott Wood [mailto:oss at buserror.net]
> > > Sent: Saturday, December 02, 2017 3:25 AM
> > > To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; linux-
> > > mtd at lists.infradead.org; devicetree-discuss at lists.ozlabs.org
> > > Cc: dedekind1 at gmail.com; computersforpeace at gmail.com
> > > Subject: Re: [PATCH] Documentation: binding: Update endianness usage
> > >
> > > On Fri, 2017-12-01 at 08:42 +0000, Prabhakar Kushwaha wrote:
> > > > > -----Original Message-----
> > > > > From: Scott Wood [mailto:oss at buserror.net]
> > > > > Sent: Friday, December 01, 2017 10:43 AM
> > > > > To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; linux-
> > > > > mtd at lists.infradead.org; devicetree-discuss at lists.ozlabs.org
> > > > > Cc: dedekind1 at gmail.com; computersforpeace at gmail.com
> > > > > Subject: Re: [PATCH] Documentation: binding: Update endianness usage
> > > > >
> > > > > If big endian is the default, is this change really
> > > > > necessary?  Particularly
> > > > > since the big endian chips are older and thus have existing device
> > > > > trees.
> > > > >
> > > >
> > > > Earlier endianness information was only used for "how to"  access IFC-
> > > > NAND
> > > > register access.
> > > > Now this info  will also be used for defining swap requirement of NOR
> > > > flash.
> > >
> > > Is this a difference between LS1021A and PPC-based chips?
> > >
> >
> > Yes.
> > CONFIG_MTD_CFI_BE_BYTE_SWAP needs to be defined For LS1021A, LS1043A,
> > LS1046A
> 
> Only because you're running a little-endian kernel on those chips.  I still
> don't see why the absence of a little-endian property isn't sufficient to
> communicate that the hardware is big-endian given that that's the established
> default.
> 
> I now see your patch to of_flash_probe... where is the non-IFC-specific
> binding that says the *parent* of a CFI node should be looked at for this?
> Where in general are endian properties kept in the parent of the node with
> "reg"?  The right answer is to add endianness to mtd-physmap.txt.
> 

Flashes are always littler endian. 
It is because of IFC controller behavior, endianness is required.  
So as per my understanding, this info should go in IFC binding. 

Please help me if I am not able to understand your view.

--prabhakar




More information about the linux-mtd mailing list