Commit 4c8a8149 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Maureen Helm
Browse files

dts: add reg-shift property to all ns16550 devices



The ns16550 flags reg-shift property as optional. In case it is not
supplied, the ns16550 driver relies on a value defined in <soc.h>, or,
by default it takes 4 (shift by 2).

This patch adds the property to all ns16550 nodes, with the following
values:

- 2 if SoC did not have any custom value defined by
  UART_REG_ADDR_INTERVAL (corresponds to 1 << 2 = 4)
- If SoC defined DEFAULT_REG_INTERVAL (snps_arc_iot/it8xxx2), use such
  value (4=2, 2=1, 1=0).

These changes will allow simplifying the ns16550 driver.

Signed-off-by: default avatarGerard Marull-Paretas <gerard.marull@nordicsemi.no>
parent 57742288
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
		label = "UART_0";
		interrupt-parent = <&intc>;
		interrupts = <24 1>;
		reg-shift = <2>;
	};

	chosen {
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
		label = "UART_0";
		interrupt-parent = <&intc>;
		interrupts = <24 1>;
		reg-shift = <2>;
	};

	uart@f0002000 {
@@ -53,6 +54,7 @@
		label = "UART_1";
		interrupt-parent = <&intc>;
		interrupts = <25 1>;
		reg-shift = <2>;
	};

	chosen {
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
			interrupts = <4 IRQ_TYPE_LOWEST_EDGE_RISING 3>;
			interrupt-parent = <&intc>;
			current-speed = <115200>;

			reg-shift = <2>;
			status = "okay";
		};

+4 −3
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@
			reg = <0xf0005000 0x1000>;
			label = "UART_0";
			interrupts = <30 1>;
			reg-shift = <2>;
		};

		uart1: uart@f0026000{
@@ -80,7 +81,7 @@
			reg = <0xf0026000 0x1000>;
			label = "UART_1";
			interrupts = <46 1>;

			reg-shift = <2>;
			status = "disabled";
		};

@@ -90,7 +91,7 @@
			reg = <0xf0027000 0x1000>;
			label = "UART_2";
			interrupts = <47 1>;

			reg-shift = <2>;
			status = "disabled";
		};

@@ -100,7 +101,7 @@
			reg = <0xf0028000 0x1000>;
			label = "UART_3";
			interrupts = <48 1>;

			reg-shift = <2>;
			status = "disabled";
		};

+4 −3
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@
			interrupts = <86 0>;
			interrupt-parent = <&intc>;
			dlf = <0x01>;
			reg-shift = <2>;
		};

		uart1: uart@80014100 {
@@ -78,7 +79,7 @@
			label = "UART_1";
			interrupts = <87 0>;
			interrupt-parent = <&intc>;

			reg-shift = <2>;
			status = "disabled";
		};

@@ -89,7 +90,7 @@
			label = "UART_2";
			interrupts = <88 0>;
			interrupt-parent = <&intc>;

			reg-shift = <2>;
			status = "disabled";
		};

@@ -100,7 +101,7 @@
			label = "UART_3";
			interrupts = <89 0>;
			interrupt-parent = <&intc>;

			reg-shift = <2>;
			status = "disabled";
		};

Loading