Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 600ecc19 authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by Michael Ellerman
Browse files

powerpc/boot/dts: Remove leading 0x and 0s from bindings notation

Improve the DTS files by removing all the leading "0x" and zeros to
fix the following dtc warnings:

  Warning (unit_address_format): Node /XXX unit name should not have leading "0x"

and:

  Warning (unit_address_format): Node /XXX unit name should not have leading 0s

Converted using the following command:

  find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" {} +

For simplicity, two sed expressions were used to solve each warnings
separately.

To make the regex expression more robust a few other issues were
resolved, namely setting unit-address to lower case, and adding a
whitespace before the the opening curly brace:

  https://elinux.org/Device_Tree_Linux#Linux_conventions



This is a follow up to commit 4c9847b7 ("dt-bindings: Remove
leading 0x from bindings notation")

Reported-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
Suggested-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 00f7b29f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -105,24 +105,24 @@
			reg = <0 0x0 0x02000000>;
			compatible = "cfi-flash";
			bank-width = <2>;
			partition@0x0 {
			partition@0 {
				label = "u-boot";
				reg = <0x00000000 0x00040000>;
				read-only;
			};
			partition@0x00040000 {
			partition@40000 {
				label = "env";
				reg = <0x00040000 0x00020000>;
			};
			partition@0x00060000 {
			partition@60000 {
				label = "dtb";
				reg = <0x00060000 0x00020000>;
			};
			partition@0x00080000 {
			partition@80000 {
				label = "kernel";
				reg = <0x00080000 0x00500000>;
			};
			partition@0x00580000 {
			partition@580000 {
				label = "root";
				reg = <0x00580000 0x00A80000>;
			};
+2 −2
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@
				interrupts = <39 2>;
			};

			IIC0: i2c@00000000 {
			IIC0: i2c@0 {
				compatible = "ibm,iic-476gtr", "ibm,iic";
				reg = <0x0 0x00000020>;
				interrupt-parent = <&MPIC>;
@@ -229,7 +229,7 @@
				};
			};

			IIC1: i2c@00000100 {
			IIC1: i2c@100 {
				compatible = "ibm,iic-476gtr", "ibm,iic";
				reg = <0x100 0x00000020>;
				interrupt-parent = <&MPIC>;
+3 −3
Original line number Diff line number Diff line
@@ -276,14 +276,14 @@
			>;
		};

		cpu-error@0070 {
		cpu-error@70 {
			compatible = "marvell,mv64360-cpu-error";
			reg = <0x0070 0x10 0x0128 0x28>;
			interrupts = <3>;
			interrupt-parent = <&PIC>;
		};

		sram-ctrl@0380 {
		sram-ctrl@380 {
			compatible = "marvell,mv64360-sram-ctrl";
			reg = <0x0380 0x80>;
			interrupts = <13>;
@@ -311,7 +311,7 @@
			interrupt-parent = <&PIC>;
		};
		/* Devices attached to the device controller */
		devicebus@045c {
		devicebus@45c {
			#address-cells = <2>;
			#size-cells = <1>;
			compatible = "marvell,mv64306-devctrl";
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@
				reg = <0x50000000 0x4>;
			};

			IIC0: i2c@00000000 {
			IIC0: i2c@0 {
				compatible = "ibm,iic-currituck", "ibm,iic";
				reg = <0x0 0x00000014>;
				interrupt-parent = <&MPIC>;
+6 −6
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@
		par_io@e0100 {
			num-ports = <7>;

			pio1: ucc_pin@01 {
			pio1: ucc_pin@1 {
				pio-map = <
			/* port  pin  dir  open_drain  assignment  has_irq */
					0x4  0xa  0x1  0x0  0x2  0x0 	/* TxD0 */
@@ -154,7 +154,7 @@
					0x1  0x1f  0x2  0x0  0x3  0x0>;	/* GTX125 */
			};

			pio2: ucc_pin@02 {
			pio2: ucc_pin@2 {
				pio-map = <
			/* port  pin  dir  open_drain  assignment  has_irq */
					0x5  0xa 0x1  0x0  0x2  0x0   /* TxD0 */
@@ -228,22 +228,22 @@

			/* These are the same PHYs as on
			 * gianfar's MDIO bus */
			qe_phy0: ethernet-phy@07 {
			qe_phy0: ethernet-phy@7 {
				interrupt-parent = <&mpic>;
				interrupts = <1 1 0 0>;
				reg = <0x7>;
			};
			qe_phy1: ethernet-phy@01 {
			qe_phy1: ethernet-phy@1 {
				interrupt-parent = <&mpic>;
				interrupts = <2 1 0 0>;
				reg = <0x1>;
			};
			qe_phy2: ethernet-phy@02 {
			qe_phy2: ethernet-phy@2 {
				interrupt-parent = <&mpic>;
				interrupts = <1 1 0 0>;
				reg = <0x2>;
			};
			qe_phy3: ethernet-phy@03 {
			qe_phy3: ethernet-phy@3 {
				interrupt-parent = <&mpic>;
				interrupts = <2 1 0 0>;
				reg = <0x3>;
Loading