Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/Kconfig | 1 + arch/arm/mach-mxs/include/mach/debug_ll.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 arch/arm/mach-mxs/include/mach/debug_ll.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e7d8cdd..8b95696 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -90,6 +90,7 @@ config ARCH_MXS 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 <io.h> +#include <mach/imx-regs.h> + +#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__ */ -- 1.8.3.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox