]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
keystone: init: enable UART1 to be able use it from kernel
authorMurali Karicheri <m-karicheri2@ti.com>
Thu, 29 May 2014 15:57:12 +0000 (18:57 +0300)
committerTom Rini <trini@ti.com>
Fri, 6 Jun 2014 21:46:14 +0000 (17:46 -0400)
Currently PWREMU_MGMT is not configured in the Linux generic UART
driver as this register seems to be specific TI UART IP. So this
needs to be enabled in u-boot to use UART1 from kernel space.

Acked-By: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
arch/arm/cpu/armv7/keystone/init.c
arch/arm/include/asm/arch-keystone/hardware-k2hk.h
arch/arm/include/asm/arch-keystone/hardware.h
include/configs/k2hk_evm.h

index 044015aed6445958e1e5b4a7bec7b93115465f59..4df5ae1cae97f75cc0b5609888b982a66b396c22 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
+#include <ns16550.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
@@ -30,6 +31,14 @@ int arch_cpu_init(void)
        share_all_segments(11); /* PCIE */
 #endif
 
        share_all_segments(11); /* PCIE */
 #endif
 
+       /*
+        * just initialise the COM2 port so that TI specific
+        * UART register PWREMU_MGMT is initialized. Linux UART
+        * driver doesn't handle this.
+        */
+       NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM2),
+                    CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
+
        return 0;
 }
 
        return 0;
 }
 
index 50ff13a3b2054eaa8643ce0f181cb8b3c78fa86d..7ac2662f1fb258fca83e873ef336d64d9e10a47b 100644 (file)
 #define K2HK_LPSC_ARM_SREFLEX          51
 #define K2HK_LPSC_TETRIS               52
 
 #define K2HK_LPSC_ARM_SREFLEX          51
 #define K2HK_LPSC_TETRIS               52
 
-#define K2HK_UART0_BASE                0x02530c00
-
 /* DDR3A definitions */
 #define K2HK_DDR3A_EMIF_CTRL_BASE      0x21010000
 #define K2HK_DDR3A_EMIF_DATA_BASE      0x80000000
 /* DDR3A definitions */
 #define K2HK_DDR3A_EMIF_CTRL_BASE      0x21010000
 #define K2HK_DDR3A_EMIF_DATA_BASE      0x80000000
index a305a0cc098b678ded90c61515be4a08b3a93500..6c532ca8700bfffad852e90ea1eaf7064ffb1165 100644 (file)
@@ -142,6 +142,9 @@ struct ddr3_emif_config {
 #define KS2_DDR3_PMCTL_OFFSET           0x38
 #define KS2_DDR3_ZQCFG_OFFSET           0xC8
 
 #define KS2_DDR3_PMCTL_OFFSET           0x38
 #define KS2_DDR3_ZQCFG_OFFSET           0xC8
 
+#define KS2_UART0_BASE                 0x02530c00
+#define KS2_UART1_BASE                 0x02531000
+
 #ifdef CONFIG_SOC_K2HK
 #include <asm/arch/hardware-k2hk.h>
 #endif
 #ifdef CONFIG_SOC_K2HK
 #include <asm/arch/hardware-k2hk.h>
 #endif
index dde73298fc4ba9a569a789ffabc6d85b136f16c1..998390e321f166aec7c461c656c96c73f2f9e135 100644 (file)
@@ -71,7 +71,8 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_MEM32
 #define CONFIG_SYS_NS16550_REG_SIZE     -4
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_MEM32
 #define CONFIG_SYS_NS16550_REG_SIZE     -4
-#define CONFIG_SYS_NS16550_COM1         K2HK_UART0_BASE
+#define CONFIG_SYS_NS16550_COM1         KS2_UART0_BASE
+#define CONFIG_SYS_NS16550_COM2         KS2_UART1_BASE
 #define CONFIG_SYS_NS16550_CLK          clk_get_rate(K2HK_CLK1_6)
 #define CONFIG_CONS_INDEX               1
 #define CONFIG_BAUDRATE                 115200
 #define CONFIG_SYS_NS16550_CLK          clk_get_rate(K2HK_CLK1_6)
 #define CONFIG_CONS_INDEX               1
 #define CONFIG_BAUDRATE                 115200