Skip to content

Commit 5d13c73

Browse files
malaterreLey Foon Tan
authored andcommitted
nios2: 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 4c9847b ("dt-bindings: Remove leading 0x from bindings notation") Reported-by: David Daney <[email protected]> Suggested-by: Rob Herring <[email protected]> Signed-off-by: Mathieu Malaterre <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
1 parent d8a5b80 commit 5d13c73

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/nios2/boot/dts/3c120_devboard.dts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#address-cells = <1>;
3030
#size-cells = <0>;
3131

32-
cpu: cpu@0x0 {
32+
cpu: cpu@0 {
3333
device_type = "cpu";
3434
compatible = "altr,nios2-1.0";
3535
reg = <0x00000000>;
@@ -69,7 +69,7 @@
6969
compatible = "altr,avalon", "simple-bus";
7070
bus-frequency = <125000000>;
7171

72-
pb_cpu_to_io: bridge@0x8000000 {
72+
pb_cpu_to_io: bridge@8000000 {
7373
compatible = "simple-bus";
7474
reg = <0x08000000 0x00800000>;
7575
#address-cells = <1>;
@@ -83,30 +83,30 @@
8383
<0x00008000 0x08008000 0x00000020>,
8484
<0x00400000 0x08400000 0x00000020>;
8585

86-
timer_1ms: timer@0x400000 {
86+
timer_1ms: timer@400000 {
8787
compatible = "altr,timer-1.0";
8888
reg = <0x00400000 0x00000020>;
8989
interrupt-parent = <&cpu>;
9090
interrupts = <11>;
9191
clock-frequency = <125000000>;
9292
};
9393

94-
timer_0: timer@0x8000 {
94+
timer_0: timer@8000 {
9595
compatible = "altr,timer-1.0";
9696
reg = < 0x00008000 0x00000020 >;
9797
interrupt-parent = < &cpu >;
9898
interrupts = < 5 >;
9999
clock-frequency = < 125000000 >;
100100
};
101101

102-
jtag_uart: serial@0x4d50 {
102+
jtag_uart: serial@4d50 {
103103
compatible = "altr,juart-1.0";
104104
reg = <0x00004d50 0x00000008>;
105105
interrupt-parent = <&cpu>;
106106
interrupts = <1>;
107107
};
108108

109-
tse_mac: ethernet@0x4000 {
109+
tse_mac: ethernet@4000 {
110110
compatible = "altr,tse-1.0";
111111
reg = <0x00004000 0x00000400>,
112112
<0x00004400 0x00000040>,
@@ -133,7 +133,7 @@
133133
};
134134
};
135135

136-
uart: serial@0x4c80 {
136+
uart: serial@4c80 {
137137
compatible = "altr,uart-1.0";
138138
reg = <0x00004c80 0x00000020>;
139139
interrupt-parent = <&cpu>;
@@ -143,7 +143,7 @@
143143
};
144144
};
145145

146-
cfi_flash_64m: flash@0x0 {
146+
cfi_flash_64m: flash@0 {
147147
compatible = "cfi-flash";
148148
reg = <0x00000000 0x04000000>;
149149
bank-width = <2>;

0 commit comments

Comments
 (0)