diff --git a/arch/arm/include/asm/debug_ll_pl011.h b/arch/arm/include/asm/debug_ll_pl011.h deleted file mode 100644 index db015a3..0000000 --- a/arch/arm/include/asm/debug_ll_pl011.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ -#define __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ - -#ifndef DEBUG_LL_UART_ADDR -#error DEBUG_LL_UART_ADDR is undefined! -#endif - -#include -#include - -static inline void PUTC_LL(char c) -{ - /* Wait until there is space in the FIFO */ - while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF) - ; - - /* Send the character */ - writel(c, DEBUG_LL_UART_ADDR + UART01x_DR); - - /* Wait to make sure it hits the line, in case we die too soon. */ - while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF) - ; -} - -#endif /* __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ */ diff --git a/arch/arm/mach-bcm283x/include/mach/debug_ll.h b/arch/arm/mach-bcm283x/include/mach/debug_ll.h index a625a8b..2e95bf8 100644 --- a/arch/arm/mach-bcm283x/include/mach/debug_ll.h +++ b/arch/arm/mach-bcm283x/include/mach/debug_ll.h @@ -26,6 +26,6 @@ #define DEBUG_LL_UART_ADDR CONFIG_MACH_RPI_DEBUG_UART_BASE -#include +#include #endif /* __MACH_BCM2835_DEBUG_LL_H__ */ diff --git a/arch/arm/mach-highbank/include/mach/debug_ll.h b/arch/arm/mach-highbank/include/mach/debug_ll.h index 1820eb1..5d0fae8 100644 --- a/arch/arm/mach-highbank/include/mach/debug_ll.h +++ b/arch/arm/mach-highbank/include/mach/debug_ll.h @@ -9,6 +9,6 @@ #define DEBUG_LL_UART_ADDR 0xfff36000 -#include +#include #endif diff --git a/arch/arm/mach-qemu/include/mach/debug_ll.h b/arch/arm/mach-qemu/include/mach/debug_ll.h index 89b0692..d59f68e 100644 --- a/arch/arm/mach-qemu/include/mach/debug_ll.h +++ b/arch/arm/mach-qemu/include/mach/debug_ll.h @@ -19,6 +19,6 @@ #define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1 #endif -#include +#include #endif diff --git a/arch/arm/mach-versatile/include/mach/debug_ll.h b/arch/arm/mach-versatile/include/mach/debug_ll.h index e6ee877..073402c 100644 --- a/arch/arm/mach-versatile/include/mach/debug_ll.h +++ b/arch/arm/mach-versatile/include/mach/debug_ll.h @@ -18,6 +18,6 @@ #define DEBUG_LL_UART_ADDR 0x101F1000 -#include +#include #endif diff --git a/arch/arm/mach-vexpress/include/mach/debug_ll.h b/arch/arm/mach-vexpress/include/mach/debug_ll.h index 89b0692..d59f68e 100644 --- a/arch/arm/mach-vexpress/include/mach/debug_ll.h +++ b/arch/arm/mach-vexpress/include/mach/debug_ll.h @@ -19,6 +19,6 @@ #define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1 #endif -#include +#include #endif diff --git a/include/debug_ll/pl011.h b/include/debug_ll/pl011.h new file mode 100644 index 0000000..db015a3 --- /dev/null +++ b/include/debug_ll/pl011.h @@ -0,0 +1,25 @@ +#ifndef __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ +#define __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ + +#ifndef DEBUG_LL_UART_ADDR +#error DEBUG_LL_UART_ADDR is undefined! +#endif + +#include +#include + +static inline void PUTC_LL(char c) +{ + /* Wait until there is space in the FIFO */ + while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF) + ; + + /* Send the character */ + writel(c, DEBUG_LL_UART_ADDR + UART01x_DR); + + /* Wait to make sure it hits the line, in case we die too soon. */ + while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF) + ; +} + +#endif /* __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ */