dt-bindings: mtd-physmap: Add endianness supports
v4 cover dt-bindings: mtd-physmap: Add endianness supports
Connection between flash and controller is not necessary to be always of same type. It may varies from platform to platform.
Adding endianness (optional) property to provide connection type information. This endianness property is checked in physmap_of_core.c to decide swap type.
This patch also set "big-endian" property for ls1021a, ls1043a and ls1046a device tree. here connection between IFC controller and NOR flash is big-endian.
Prabhakar Kushwaha (4):
dt-bindings: mtd-physmap: Add endianness supports
driver: mtd: update struct map_info's swap as per map requirement
ARM: dts: Add NOR connection type with IFC
ARM64: dts: Add NOR connection type with IFC
Resending as all patches of patchset never reaches to patchwork.
Documentation/devicetree/bindings/mtd/mtd-physmap.txt | 5 +++++ arch/arm/boot/dts/ls1021a-qds.dts | 1 + arch/arm/boot/dts/ls1021a-twr.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 1 + drivers/mtd/maps/physmap_of_core.c | 8 ++++++++ 7 files changed, 18 insertions(+)
Signature · 1 line
2.14.1
PATCH RESEND v4 1/4 dt-bindings: mtd-physmap: Add endianness supports
Connection between flash and controller is not necessary to be always of same type. It may varies from platform to platform.
Adding endianness (optional) property to provide connection type information.
---
Changes for v2: updated subject
Changes for v3: fixed typo for "big-endian" Changes for v4: Moved binding definition in mtd-physmap.txt as discussed at https://patchwork.ozlabs.org/patch/842543/
Resending as all patches of patchset never reaches to patchwork.
Documentation/devicetree/bindings/mtd/mtd-physmap.txt | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/mtd/mtd-physmap.txt +5 -0
@@ -41,6 +41,11 @@ additional (optional) property is defined: - erase-size : The chip's physical erase block size in bytes. + The device tree may optionally contain endianness property. + little-endian or big-endian : It represents connection between controller and + flash. If this property is absent, flash is considered + to be host-endian. + The device tree may optionally contain sub-nodes describing partitions of the address space. See partition.txt for more detail.
Signature · 1 line
2.14.1
PATCH RESEND v4 2/4 driver: mtd: update struct map_info's swap as per map requirement
In reply to Prabhakar KushwahaIt 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.
---
Changes for v2: Incorporated review comments from Boris Brezillon
http://patchwork.ozlabs.org/patch/758381/
Changes for v3: None
Changes for v4: Updated code as per new defined binding of physmap.txt
Resending as all patches of patchset never reaches to patchwork.
drivers/mtd/maps/physmap_of_core.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/mtd/maps/physmap_of_core.c +8 -0
@@ -20,6 +20,7 @@#include <linux/mtd/map.h> #include <linux/mtd/partitions.h> #include <linux/mtd/concat.h> +#include <linux/mtd/cfi_endian.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_platform.h>
@@ -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,"big-endian" )) + info->list[i].map.swap =CFI_BIG_ENDIAN ; +else if (of_property_read_bool (dp,"little-endian" )) + info->list[i].map.swap =CFI_LITTLE_ENDIAN ; +else + info->list[i].map.swap =CFI_HOST_ENDIAN ; + err =of_flash_probe_gemini (dev, dp, &info->list[i].map);if (err) goto err_out;
Signature · 1 line
2.14.1
PATCH RESEND v4 3/4 ARM: dts: Add NOR connection type with IFC
In reply to Prabhakar KushwahaConnection between IFC and NOR flash is of big-endian type.
So add big-endian property in flash node to reflect the same.
---
Changes for v2: None
Changes for v3: None
Changes for v4: Updated device tree as per new binding
Resending as all patches of patchset never reaches to patchwork.
arch/arm/boot/dts/ls1021a-qds.dts | 1 + arch/arm/boot/dts/ls1021a-twr.dts | 1 + 2 files changed, 2 insertions(+)
arch/arm/boot/dts/ls1021a-qds.dts +1 -0
@@ -237,6 +237,7 @@ reg = <0x0 0x0 0x8000000>; bank-width = <2>; device-width = <1>; + big-endian; }; fpga: board-control at 3,0 {
arch/arm/boot/dts/ls1021a-twr.dts +1 -0
@@ -205,6 +205,7 @@ reg = <0x0 0x0 0x8000000>; bank-width = <2>; device-width = <1>; + big-endian; }; };
Signature · 1 line
2.14.1
PATCH RESEND v4 4/4 ARM64: dts: Add NOR connection type with IFC
In reply to Prabhakar KushwahaConnection between IFC and NOR flash is of big-endian type.
So add big-endian property in flash node to reflect the same.
---
Changes for v2: None
Changes for v3: None
Changes for v4: Updated device tree as per new binding
Resending as all patches of patchset never reaches to patchwork.
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 1 + 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +1 -0
@@ -89,6 +89,7 @@ reg = <0x0 0x0 0x8000000>; bank-width = <2>; device-width = <1>; + big-endian; }; nand at 1,0 {
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +1 -0
@@ -104,6 +104,7 @@ reg = <0x0 0x0 0x8000000>; bank-width = <2>; device-width = <1>; + big-endian; }; nand at 1,0 {
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts +1 -0
@@ -180,6 +180,7 @@ reg = <0x0 0x0 0x8000000>; bank-width = <2>; device-width = <1>; + big-endian; }; nand at 1,0 {
Signature · 1 line
2.14.1
PATCH RESEND v2 1/2 ARM: dts: Add big-endian for IFC on LS1021A
In reply to Prabhakar KushwahaFor the patch to update struct map_info's swap field based on device characteristics defined in device tree, big-endian parameter is added for LS1021A.
---
Due to patch series http://patchwork.ozlabs.org/project/linux-mtd/list/?series=28735
this patch is now independent of flash propoerty. So resending.
Resending as all patches of patchset never reaches to patchwork.
arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/ls1021a.dtsi +1 -0
@@ -145,6 +145,7 @@ ifc: ifc at 1530000 { compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x1530000 0x0 0x10000>; + big-endian; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; };
Signature · 1 line
2.14.1
PATCH RESEND v2 1/2 ARM: dts: Add big-endian for IFC on LS1021A
Quoted 4 lines · On Thu, 22 Feb 2018 15:45:10 +0530 Prabhakar Kushwaha…
For the patch to update struct map_info's swap field based on device characteristics defined in device tree, big-endian parameter is added for LS1021A.
Quoted 8 lines
Signed-off-by Alison Wang <[email protected]>Signed-off-by Jagdish Gediya <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Due to patch series http://patchwork.ozlabs.org/project/linux-mtd/list/?series=28735
this patch is now independent of flash propoerty. So resending.Resending as all patches of patchset never reaches to patchwork.
Again, that's not the case, I just marked them as "Not applicable" (see my previous reply).
Also, according to the cover letter this patch should not be part of "dt-bindings: mtd-physmap: Add endianness supports", so why are you sending it here?
Quoted 16 lines
arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/ls1021a.dtsi +1
-0@@ -145,6 +145,7 @@ ifc: ifc at 1530000 { compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x1530000 0x0 0x10000>; + big-endian; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; };
Signature · 3 lines
Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH RESEND v2 2/2 ARM: dts: ls1021aqds: Add nand node for ifc controller
In reply to Prabhakar KushwahaLS1021AQDS support NAND flash on IFC chip-select 2.
So add NAND node in device tree for IFC controller.
---
Due to patch series http://patchwork.ozlabs.org/project/linux-mtd/list/?series=28735
this patch is now independent of flash propoerty. So resending.
Resending as all patches of patchset never reaches to patchwork.
arch/arm/boot/dts/ls1021a-qds.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/ls1021a-qds.dts +5 -0
@@ -240,6 +240,11 @@ big-endian; }; + nand at 2,0 { + compatible = "fsl,ifc-nand"; + reg = <0x2 0x0 0x10000>; + }; + fpga: board-control at 3,0 { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.14.1
v4 cover dt-bindings: mtd-physmap: Add endianness supports
In reply to Prabhakar KushwahaHi Prabhakar,
Quoted 11 lines · On Thu, 22 Feb 2018 15:45:05 +0530 Prabhakar Kushwaha…
Connection between flash and controller is not necessary to be always of same type. It may varies from platform to platform.
Adding endianness (optional) property to provide connection type information. This endianness property is checked in
physmap_of_core.cto decide swap type.This patch also set "big-endian" property for ls1021a, ls1043a and ls1046a device tree. here connection between IFC controller and NOR flash is big-endian.
Quoted 5 lines
Prabhakar Kushwaha (4):
dt-bindings: mtd-physmap: Add endianness supports
driver: mtd: update struct map_info's swap as per map requirement
ARM: dts: Add NOR connection type with IFC
ARM64: dts: Add NOR connection type with IFC
First of all, can you stop sending dts changes until we've agreed on the dt-bindings/driver changes.
Quoted 2 lines
Resending as all patches of patchset never reaches to patchwork.
Hm, I think they reached patchwork, it's just that dts changes won't be applied to the MTD tree, so I mark them as 'Not applicable'.
Regards,
Boris
Quoted 10 lines
Documentation/devicetree/bindings/mtd/mtd-physmap.txt | 5 +++++ arch/arm/boot/dts/ls1021a-qds.dts | 1 + arch/arm/boot/dts/ls1021a-twr.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 1 + drivers/mtd/maps/physmap_of_core.c | 8 ++++++++ 7 files changed, 18 insertions(+)
Signature · 3 lines
Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
v4 cover dt-bindings: mtd-physmap: Add endianness supports
Quoted 16 lines · Boris Brezillon
Hi Prabhakar,
Quoted 11 lines · On Thu, 22 Feb 2018 15:45:05 +0530 Prabhakar Kushwaha…
Connection between flash and controller is not necessary to be always of same type. It may varies from platform to platform.
Adding endianness (optional) property to provide connection type information. This endianness property is checked in
physmap_of_core.cto decide swap type.This patch also set "big-endian" property for ls1021a, ls1043a and ls1046a device tree. here connection between IFC controller and NOR flash is big-endian.
Quoted 8 lines
Quoted 5 lines
Prabhakar Kushwaha (4):
dt-bindings: mtd-physmap: Add endianness supports
driver: mtd: update struct map_info's swap as per map requirement
ARM: dts: Add NOR connection type with IFC
ARM64: dts: Add NOR connection type with IFCFirst of all, can you stop sending dts changes until we've agreed on the dt-bindings/driver changes.
+1
Shawn