9
0
Fork 0

debug_ll: Let architectures define PUTC_LL directly

putc already is a regular barebox function. To avoid conflicts and
confusions just let architectures define PUTC_LL directly instead
of going through this addiotional redirection.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-11-23 09:48:32 +01:00
parent 0a6da02621
commit 9fe8679d3b
7 changed files with 6 additions and 7 deletions

View File

@ -25,7 +25,7 @@
*
* This does not append a newline
*/
static void putc(int c)
static inline void PUTC_LL(char c)
{
while (!(__raw_readl(UART_BASE + ATMEL_US_CSR) & ATMEL_US_TXRDY))
barrier();

View File

@ -39,7 +39,7 @@
#define LSR (5 << 2)
#define THR (0 << 2)
static inline void putc(char c)
static inline void PUTC_LL(char c)
{
/* Wait until there is space in the FIFO */
while ((readb(UART_BASE + LSR) & LSR_THRE) == 0);

View File

@ -31,7 +31,7 @@
#define lsr (5 << DEBUG_LL_UART_RSHFT)
#define LSR_THRE 0x20 /* Xmit holding register empty */
static inline void putc(char ch)
static inline void PUTC_LL(char ch)
{
while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE))
;

View File

@ -19,7 +19,7 @@
#include <linux/amba/serial.h>
#include <io.h>
static inline void putc(char c)
static inline void PUTC_LL(char c)
{
/* Wait until there is space in the FIFO */
while (readl(0x101F1000 + UART01x_FR) & UART01x_FR_TXFF);

View File

@ -28,7 +28,7 @@
#define LSR_THRE 0x20 /* Xmit holding register empty */
static __inline__ void putc(char ch)
static __inline__ void PUTC_LL(char ch)
{
while (!(__raw_readb((u8 *)DEBUG_LL_UART_ADDR + lsr) & LSR_THRE));
__raw_writeb(ch, (u8 *)DEBUG_LL_UART_ADDR + rbr);

View File

@ -28,7 +28,7 @@
#define lsr 5
#define LSR_THRE 0x20 /* Xmit holding register empty */
static __inline__ void putc(char ch)
static __inline__ void PUTC_LL(char ch)
{
while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE));
__raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);

View File

@ -22,7 +22,6 @@
#if defined (CONFIG_DEBUG_LL)
# include <mach/debug_ll.h>
#define PUTC_LL(x) putc(x)
# define PUTHEX_LL(value) ({ unsigned long v = (unsigned long) (value); \
int i; unsigned char ch; \
for (i = 8; i--; ) {\