42 #if ! ( defined ( CONSOLE_SERIAL ) && CONSOLE_EXPLICIT ( CONSOLE_SERIAL ) ) 44 #define CONSOLE_SERIAL ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) 49 #define CONSOLE_PORT COMCONSOLE 51 #define CONSOLE_PORT 0 56 #define CONSOLE_BAUD 0 58 #define CONSOLE_BAUD COMSPEED 65 #define CONSOLE_LCR UART_LCR_WPS ( COMDATA, COMPARITY, COMSTOP ) 146 DBG (
"Could not select UART %d: %s\n",
154 DBG (
"Could not initialise UART %d baud %d LCR %#02x: %s\n",
struct uart serial_console
Serial console UART.
static void serial_init(void)
Initialise serial console.
struct arbelprm_rc_send_wqe rc
void uart_flush(struct uart *uart)
Flush data.
static int uart_data_ready(struct uart *uart)
Check if received data is ready.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void uart_transmit(struct uart *uart, uint8_t data)
Transmit data.
#define STARTUP_EARLY
Early startup.
void * base
I/O port base address.
int uart_init(struct uart *uart, unsigned int baud, uint8_t lcr)
Initialise UART.
static uint8_t uart_receive(struct uart *uart)
Receive data.
A startup/shutdown function.
#define __unused
Declare a variable or data structure as unused.
An initialisation function.
void(* putchar)(int character)
Write a character to the console.
struct console_driver serial_console_driver __console_driver
Serial console.
struct startup_fn serial_startup_fn __startup_fn(STARTUP_EARLY)
Serial console startup function.
static int serial_iskey(void)
Check for character ready to read from serial console.
char * strerror(int errno)
Retrieve string representation of error number.
Serial port configuration.
struct init_fn serial_console_init_fn __init_fn(INIT_CONSOLE)
Serial console initialisation function.
static void serial_shutdown(int flags __unused)
Shut down serial console.
static int serial_getchar(void)
Get character from serial console.
#define INIT_CONSOLE
Console initialisation.
uint8_t data[48]
Additional event data.
#define DBG(...)
Print a debugging message.
static void serial_putchar(int character)
Print a character to serial console.
int uart_select(struct uart *uart, unsigned int port)
Select UART port.