blob: 15d6e8523973a8c40dd6f83a222a5d486f8d3643 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Copyright 2013 Jean-Christophe PLAGNIOL-VILLARD <plagniol@jcrosoft.com>
*
* GPLv2 only
*/
#ifndef __MACH_DEBUG_LL_H__
#define __MACH_DEBUG_LL_H__
#include <linux/amba/serial.h>
#include <io.h>
#define DEBUG_LL_PHYS_BASE 0x10000000
#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
#ifdef MP
#define UART_BASE DEBUG_LL_PHYS_BASE
#else
#define UART_BASE DEBUG_LL_PHYS_BASE_RS1
#endif
static inline void PUTC_LL(char c)
{
/* Wait until there is space in the FIFO */
while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
/* Send the character */
writel(c, UART_BASE + UART01x_DR);
/* Wait to make sure it hits the line, in case we die too soon. */
while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
}
#endif
|