diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-09 16:13:30 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-15 10:09:07 +0200 |
commit | dc5ea760b2fb93e557566dda671fe6fc69690797 (patch) | |
tree | 7454f5d8fc10d8bbfaa1a7dc18c793d7fec3805e /arch/arm/mach-mxs/include | |
parent | 798e976bf23ad6ad80192893c2c7dd922d01e4ca (diff) | |
download | barebox-dc5ea760b2fb93e557566dda671fe6fc69690797.tar.gz barebox-dc5ea760b2fb93e557566dda671fe6fc69690797.tar.xz |
ARM: mxs: implement debug_ll support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mxs/include')
-rw-r--r-- | arch/arm/mach-mxs/include/mach/debug_ll.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 0000000000..9e3ce1c1cd --- /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__ */ |