From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRvtl-0006Le-SB for linux-mtd@lists.infradead.org; Thu, 21 Dec 2017 08:08:34 +0000 Date: Thu, 21 Dec 2017 09:07:51 +0100 From: Boris Brezillon To: Prabhakar Kushwaha Cc: "linux-mtd@lists.infradead.org" , "oss@buserror.net" , "computersforpeace@gmail.com" , Jagdish Gediya , "dedekind1@gmail.com" Subject: Re: [PATCH][v2] driver: mtd: update struct map_info's swap as per map requirement. Message-ID: <20171221090751.2e29ad0e@bbrezillon> In-Reply-To: References: <1511954812-8533-1-git-send-email-prabhakar.kushwaha@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, On Thu, 21 Dec 2017 05:03:11 +0000 Prabhakar Kushwaha wrote: > Hi Boris, > You're lucky that I poll the MTD ML from time to time, because I'm not even Cc-ed on this email. > > > -----Original Message----- > > From: Prabhakar Kushwaha [mailto:prabhakar.kushwaha@nxp.com] > > Sent: Wednesday, November 29, 2017 4:57 PM > > To: linux-mtd@lists.infradead.org > > Cc: dedekind1@gmail.com; oss@buserror.net; computersforpeace@gmail.com; > > Jagdish Gediya ; Prabhakar Kushwaha > > > > Subject: [PATCH][v2] driver: mtd: update struct map_info's swap as per map > > requirement. > > > > From: Jagdish Gediya > > > > It is not necessary for all device's maps to be CFI_HOST_ENDIAN. > > Maps device can be Big endian or little endian. > > > > Currently it is being taken care using CONFIG_MTD_CFI_LE_BYTE_SWAP or > > CONFIG_MTD_CFI_BE_BYTE_SWAP i.e. compile time. > > > > Now update struct map_info's swap field based on device characteristics > > defined in device tree. > > > > Signed-off-by: Prabhakar Kushwaha > > Signed-off-by: Jagdish Gediya > > --- > > Changes for v2: Incorporated review comments from Boris Brezillon > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatchw > > ork.ozlabs.org%2Fpatch%2F758381%2F&data=02%7C01%7Cprabhakar.kushwah > > a%40nxp.com%7C9050b00591c44afe1fcd08d5371c445a%7C686ea1d3bc2b4c6f > > a92cd99c5c301635%7C0%7C0%7C636475516901200278&sdata=l6iFa15%2FxgO > > fnmzmRgwFUbrwhY26ROw7rO1REh342mc%3D&reserved=0 > > > > drivers/mtd/maps/physmap_of_core.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/mtd/maps/physmap_of_core.c > > b/drivers/mtd/maps/physmap_of_core.c > > index b1bd4fa..27f44a0 100644 > > --- a/drivers/mtd/maps/physmap_of_core.c > > +++ b/drivers/mtd/maps/physmap_of_core.c > > @@ -20,6 +20,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -233,6 +234,13 @@ static int of_flash_probe(struct platform_device *dev) > > info->list[i].map.bankwidth = be32_to_cpup(width); > > info->list[i].map.device_node = dp; > > > > + if (of_property_read_bool(dp->parent, "big-endian")) > > + info->list[i].map.swap = CFI_BIG_ENDIAN; > > + else if (of_property_read_bool(dp->parent, "little-endian")) > > + info->list[i].map.swap = CFI_LITTLE_ENDIAN; > > + else if (of_property_read_bool(dp->parent, "host-endian")) > > + info->list[i].map.swap = CFI_HOST_ENDIAN; > > + > > err = of_flash_probe_gemini(dev, dp, &info->list[i].map); > > if (err) > > goto err_out; > > -- > > As per the patchwork status, its state is "Change Requested" > > http://patchwork.ozlabs.org/patch/842542/ > > I am not seeing any review comments on this patch. > What kind of change is required. The binding is still being discussed with Scott, and I won't merge the code supposed to handle the new property until you've agreed on something. Regards, Boris