]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/ns16550.c
mtd: nand: omap: fix error-codes returned from omap-elm driver
[karo-tx-uboot.git] / drivers / serial / ns16550.c
index 181c81815ac4cccad78c5e54ea3224fdf37bebb0..f26979dbe15e4ecf510b746dc4c92e58447ee2d5 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))
+#undef UART_MCRVAL
+#ifdef CONFIG_SERIAL_HW_FLOW_CONTROL
+#define UART_MCRVAL             (UART_MCR_RTS | UART_MCR_AFE)
+#else
+#define UART_MCRVAL             (UART_MCR_RTS)
+#endif
+#endif
+
 #ifndef CONFIG_SYS_NS16550_IER
 #define CONFIG_SYS_NS16550_IER  0x00
 #endif /* CONFIG_SYS_NS16550_IER */
@@ -56,9 +67,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_TI81XX) || \
-                       defined(CONFIG_AM43XX)
+#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);
@@ -78,6 +88,9 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
        /* /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