Skip to contentSkip to conversation

axs10x: Introduce UART clk device

PATCH New Vlad Zakharov 1 participant 1 message Oct 27, 2016 Synopsys ARC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 axs10x: Introduce UART clk device

This commit introduces UART clock device for AXS10x boards. It provides a fixed clock rate of 33,333333 MHz.

It is used as an input clock by uart0 driver, so we add corresponding reference to uart0 node in device tree.

Also we removing legacy clock specifications via CONFIG_SYS_NS16550_CLK which we finally may get rid of.

---
 arch/arc/dts/axs10x.dts  | 8 ++++++++
 include/configs/axs10x.h | 1 -
 2 files changed, 8 insertions(+), 1 deletion(-)
arch/arc/dts/axs10x.dts +8 -0
index 391d067..0b0e2bb 100644
@@ -23,9 +23,17 @@
 		};
 	};
 
+	uartclk: uartclk {
+		compatible = "fixed-clock";
+		clock-frequency = <33333333>;
+		#clock-cells = <0>;
+		u-boot,dm-pre-reloc;
+	};
+
 	uart0: serial0 at e0022000 {
 		compatible = "snps,dw-apb-uart";
 		reg = <0xe0022000 0x1000>;
+		clocks = <&uartclk>;
 		reg-shift = <2>;
 		reg-io-width = <4>;
 	};
include/configs/axs10x.h +0 -1
index b99248e..3546c8d 100644
@@ -52,7 +52,6 @@
  */
 #define CONFIG_DW_SERIAL
 #define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_CLK		33333333
 #define CONFIG_SYS_NS16550_MEM32
 #define CONFIG_BAUDRATE			115200
 
Signature · 1 line
2.7.4