]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARC: [axs101] support early 8250 uart
authorVineet Gupta <vgupta@synopsys.com>
Mon, 2 Feb 2015 13:53:21 +0000 (19:23 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 19 Jun 2015 12:39:30 +0000 (18:09 +0530)
Earlycon calculates UART clock as "BASE_BAUD * 16". In case of ARC
"BASE_BAUD" is calculated dynamically in runtime, basically it is an
alias to arc_early_base_baud(), which in turn just does
"arc_base_baud/16".

8250 UART on AXS/SDP board uses 33.3MHz clock source which is set in
"arc_base_baud" with this change.

Additional compatibility string "snps,arc-sdp" is introduced as well
because there're different flavours of AXS boards but they all share the
same motherboard and so it's possible to re-use the same code for
motherbord even if CPU daughterboard changes.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Documentation/devicetree/bindings/arc/axs101.txt
arch/arc/boot/dts/axs101.dts
arch/arc/kernel/devtree.c

index 568aa5f74de27e74df258e67969df0adc0affe96..48290d5178b549aa0bc92bdfb2d3df90e7cee028 100644 (file)
@@ -4,4 +4,4 @@ Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings
 SDP Main Board with an AXC001 CPU Card hoisting ARC700 core in silicon
 
 Required root node properties:
-    - compatible = "snps,axs101";
+    - compatible = "snps,axs101", "snps,arc-sdp";
index 6c3391da0e3bc221aebf6be76e8d0ce61c0ad569..3f9b0582e73403cc1d40071af6aa2eeb1ddf44c2 100644 (file)
@@ -13,9 +13,9 @@
 /include/ "axs10x_mb.dtsi"
 
 / {
-       compatible = "snps,axs101";
+       compatible = "snps,axs101", "snps,arc-sdp";
 
        chosen {
-               bootargs = "console=tty0 console=ttyS3,115200n8 consoleblank=0";
+               bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=tty0 console=ttyS3,115200n8 consoleblank=0";
        };
 };
index e32b54abff51fdc6b16894ce466fd16d2063bd7f..f801d46dc087f27fa016b11d590387d173f3bfc7 100644 (file)
@@ -32,6 +32,8 @@ static void __init arc_set_early_base_baud(unsigned long dt_root)
 
        if (of_flat_dt_is_compatible(dt_root, "abilis,arc-tb10x"))
                arc_base_baud = core_clk/3;
+       else if (of_flat_dt_is_compatible(dt_root, "snps,arc-sdp"))
+               arc_base_baud = 33333333;       /* Fixed 33MHz clk */
        else
                arc_base_baud = core_clk;
 }