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 );
struct arbelprm_rc_send_wqe rc
#define le32_to_cpu(value)
static struct uart spcr_uart
SPCR-defined UART.
#define NS16550_LEN
Length of register region.
#define SPCR_TYPE_16550
16550-compatible
void * base
Register base address.
struct uart * fixed_serial_console(void)
Get fixed serial console UART.
uint16_t pci_device_id
PCI device ID.
uint16_t pci_vendor_id
PCI vendor ID.
static struct ns16550_uart spcr_ns16550
SPCR-defined 16550 UART.
static const uint8_t spcr_baud_divisor[SPCR_BAUD_MAX]
SPCR baud rate divisors.
const struct acpi_header * acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
#define offsetof(type, field)
Get offset of a field within a structure.
A Serial Port Console Redirection table.
struct uart * default_serial_console(void)
Get serial console UART.
PROVIDE_SERIAL(spcr, default_serial_console, spcr_console)
#define SPCR_TYPE_16550_GAS
16550-compatible
#define NS16550_CLK_DEFAULT
Default input clock rate (1.8432 MHz)
uint32_t precise
Precise baud rate.
#define SPCR_BAUD_BASE
Base baud rate for SPCR divisors.
uint8_t pci_segment
PCI segment.
unsigned int baud
Baud rate (if specified)
static struct uart * spcr_console(void)
Identify default serial console.
#define container_of(ptr, type, field)
Get containing structure.
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
#define SPCR_SIGNATURE
Serial Port Console Redirection table signature.
unsigned int clock
Input clock frequency.
#define PCI_FMT
PCI device debug message format.
void * priv
Driver-private data.
uint32_t clock
Clock frequency.
#define ENODEV
No such device.
uint8_t type
Interface type.
struct acpi_header acpi
ACPI header.
struct uart_operations ns16550_operations
16550 UART operations
struct acpi_address base
Base address.
uint8_t pci_func
PCI function number.
#define le16_to_cpu(value)
static int spcr_16550(struct spcr_table *spcr, struct uart *uart)
Configure 16550-based serial console.
uint8_t pci_bus
PCI bus number.
uint8_t type
Address space type.
uint8_t pci_dev
PCI device number.
void * acpi_ioremap(struct acpi_address *address, size_t len)
Map an ACPI generic address.
struct uart_operations * op
UART operations.
#define cpu_to_le16(value)
#define REF_INIT(free_fn)
Initialise a static reference counter.
#define SPCR_TYPE_16450
16450-compatible
typeof(acpi_finder=acpi_find)
ACPI table finder.
struct refcnt refcnt
Reference count.
#define le64_to_cpu(value)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void ref_no_free(struct refcnt *refcnt __unused)
Do not free reference-counted object.
ACPI Serial Port Console Redirection (SPCR)
#define PCI_ANY_ID
Match-anything ID.