driver will be available until the real driver model serial is
running.
+config DEBUG_ARC_SERIAL
+ bool "ARC UART"
+ depends on ARC_SERIAL
+ help
+ Select this to enable a debug UART using the ARC UART driver.
+ You will need to provide parameters to make this work. The
+ driver will be available until the real driver model serial is
+ running.
+
config DEBUG_UART_ATMEL
bool "Atmel USART"
help
.ops = &arc_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
};
+
+#ifdef CONFIG_DEBUG_ARC_SERIAL
+#include <debug_uart.h>
+
+static inline void _debug_uart_init(void)
+{
+ struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
+ int arc_console_baud = CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE * 4) - 1;
+
+ writeb(arc_console_baud & 0xff, ®s->baudl);
+ writeb((arc_console_baud & 0xff00) >> 8, ®s->baudh);
+}
+
+static inline void _debug_uart_putc(int c)
+{
+ struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
+
+ while (!(readb(®s->status) & UART_TXEMPTY))
+ ;
+
+ writeb(c, ®s->data);
+}
+
+DEBUG_UART_FUNCS
+
+#endif