]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/ns16550.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / drivers / serial / ns16550.c
index d77c25fa9b3c0afd2f38a62f780ffc3d5668162e..8a1345494336d56d6c0700f79e5851043b8fbf83 100644 (file)
 #define serial_in(y)           readb(y)
 #endif
 
+#if defined(CONFIG_K2HK_EVM)
+#define UART_REG_VAL_PWREMU_MGMT_UART_DISABLE   0
+#define UART_REG_VAL_PWREMU_MGMT_UART_ENABLE ((1 << 14) | (1 << 13) | (1 << 0))
+#endif
+
 #ifndef CONFIG_SYS_NS16550_IER
 #define CONFIG_SYS_NS16550_IER  0x00
 #endif /* CONFIG_SYS_NS16550_IER */
@@ -56,8 +61,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
                ;
 
        serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
-#if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
-                       defined(CONFIG_AM33XX) || defined(CONFIG_TI814X)
+#if defined(CONFIG_OMAP) || defined(CONFIG_AM33XX) || \
+                       defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
        serial_out(0x7, &com_port->mdr1);       /* mode select reset TL16C750*/
 #endif
        serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
@@ -72,11 +77,14 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
        serial_out(UART_LCRVAL, &com_port->lcr);
 #if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
        defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX) || \
-       defined(CONFIG_TI814X)
+       defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
 
        /* /16 is proper to hit 115200 with 48MHz */
        serial_out(0, &com_port->mdr1);
 #endif /* CONFIG_OMAP */
+#if defined(CONFIG_K2HK_EVM)
+       serial_out(UART_REG_VAL_PWREMU_MGMT_UART_ENABLE, &com_port->regC);
+#endif
 }
 
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS