[PATCH] driver: mtd: update struct map_info's swap as per map requirement.

Scott Wood oss at buserror.net
Mon May 15 10:28:33 PDT 2017


On Mon, 2017-05-15 at 10:48 +0200, Boris Brezillon wrote:
> 
> You can even make this property a string property:
> 
> 		if (!of_property_read_string(dp->parent,
> 					     "cfi-endianness",
> 					     &endianness)) {
> 			if (!strcmp("big", endianness))
> 				info->list[i].map.swap = CFI_BIG_ENDIAN;
> 			else if (!strcmp("little", endianness))
> 				info->list[i].map.swap = CFI_LITTLE_ENDIAN;
> 			else if (!strcmp("host", endianness))
> 				info->list[i].map.swap = CFI_HOST_ENDIAN;
> 		}

Boolean endianness properties are the standard elsewhere -- why should CFI be
different?

See Documentation/devicetree/bindings/common-properties.txt

-Scott




More information about the linux-mtd mailing list