diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd10591..2871c66 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -91,6 +91,7 @@ select GENERIC_GPIO select COMMON_CLK select CLKDEV_LOOKUP + select HAS_DEBUG_LL config ARCH_NETX bool "Hilscher NetX based" diff --git a/arch/arm/mach-mxs/include/mach/debug_ll.h b/arch/arm/mach-mxs/include/mach/debug_ll.h new file mode 100644 index 0000000..9e3ce1c --- /dev/null +++ b/arch/arm/mach-mxs/include/mach/debug_ll.h @@ -0,0 +1,22 @@ +#ifndef __MACH_DEBUG_LL_H__ +#define __MACH_DEBUG_LL_H__ + +#include +#include + +#define UARTDBGDR 0x00 +#define UARTDBGFR 0x18 +# define TXFE (1 << 7) +# define TXFF (1 << 5) + +static inline void PUTC_LL(int c) +{ + void __iomem *base = (void *)IMX_DBGUART_BASE; + + /* Wait for room in TX FIFO */ + while (!(readl(base + UARTDBGFR) & TXFE)); + + writel(c, base + UARTDBGDR); +} + +#endif /* __MACH_DEBUG_LL_H__ */