39#define SERIAL_PREFIX_spcr
41#define SERIAL_PREFIX_spcr __spcr_
56#define SPCR_BAUD_BASE 115200
81 if ( ! ns16550->
base ) {
82 DBGC (
uart,
"SPCR could not map registers\n" );
112 DBGC (
uart,
"SPCR found no table\n" );
117 DBGC (
uart,
"SPCR is type %d at %02x:%08llx\n",
143 switch ( spcr->
type ) {
151 DBGC (
uart,
"SPCR unsupported type %d\n", spcr->
type );
const struct acpi_header * acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
typeof(acpi_finder=acpi_find)
ACPI table finder.
void * acpi_ioremap(struct acpi_address *address, size_t len)
Map an ACPI generic address.
struct arbelprm_rc_send_wqe rc
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENODEV
No such device.
#define le16_to_cpu(value)
#define le64_to_cpu(value)
#define le32_to_cpu(value)
#define cpu_to_le16(value)
#define NS16550_CLK_DEFAULT
Default input clock rate (1.8432 MHz)
#define NS16550_LEN
Length of register region.
struct uart * default_serial_console(void)
Get serial console UART.
#define PROVIDE_SERIAL(_subsys, _api_func, _func)
Provide a serial API implementation.
struct uart_operations ns16550_operations
16550 UART operations
#define PCI_ANY_ID
Match-anything ID.
#define PCI_FMT
PCI device debug message format.
void ref_no_free(struct refcnt *refcnt __unused)
Do not free reference-counted object.
#define REF_INIT(free_fn)
Initialise a static reference counter.
struct uart * fixed_serial_console(void)
Get fixed serial console UART.
static int spcr_16550(struct spcr_table *spcr, struct uart *uart)
Configure 16550-based serial console.
#define SPCR_BAUD_BASE
Base baud rate for SPCR divisors.
static struct ns16550_uart spcr_ns16550
SPCR-defined 16550 UART.
static const uint8_t spcr_baud_divisor[SPCR_BAUD_MAX]
SPCR baud rate divisors.
static struct uart * spcr_console(void)
Identify default serial console.
static struct uart spcr_uart
SPCR-defined UART.
ACPI Serial Port Console Redirection (SPCR)
#define SPCR_TYPE_16550
16550-compatible
#define SPCR_TYPE_16450
16450-compatible
#define SPCR_SIGNATURE
Serial Port Console Redirection table signature.
#define SPCR_TYPE_16550_GAS
16550-compatible
#define offsetof(type, field)
Get offset of a field within a structure.
#define container_of(ptr, type, field)
Get containing structure.
uint8_t type
Address space type.
unsigned int clock
Input clock frequency.
void * base
Register base address.
A Serial Port Console Redirection table.
uint8_t pci_segment
PCI segment.
struct acpi_header acpi
ACPI header.
uint32_t clock
Clock frequency.
uint8_t pci_func
PCI function number.
uint8_t pci_dev
PCI device number.
uint8_t type
Interface type.
uint32_t precise
Precise baud rate.
uint16_t pci_device_id
PCI device ID.
uint8_t pci_bus
PCI bus number.
struct acpi_address base
Base address.
uint16_t pci_vendor_id
PCI vendor ID.
unsigned int baud
Baud rate (if specified)
struct uart_operations * op
UART operations.
void * priv
Driver-private data.