coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
uart.c File Reference
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <acpi/acpi_gnvs.h>
#include <console/uart.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <intelblocks/irq.h>
#include <intelblocks/lpss.h>
#include <intelblocks/uart.h>
#include <soc/pci_devs.h>
#include <soc/iomap.h>
#include <soc/nvs.h>
#include "chip.h"
Include dependency graph for uart.c:

Go to the source code of this file.

Macros

#define UART_PCI_ENABLE   (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER)
 

Functions

static void uart_lpss_init (pci_devfn_t dev, uintptr_t baseaddr)
 
static pci_devfn_t uart_console_get_pci_bdf (void)
 
const struct deviceuart_get_device (void)
 
bool uart_is_controller_initialized (void)
 
void uart_bootblock_init (void)
 

Variables

const unsigned int uart_devices []
 
const int uart_devices_size
 

Macro Definition Documentation

◆ UART_PCI_ENABLE

#define UART_PCI_ENABLE   (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER)

Definition at line 20 of file uart.c.

Function Documentation

◆ uart_bootblock_init()

void uart_bootblock_init ( void  )

Definition at line 97 of file uart.c.

◆ uart_console_get_pci_bdf()

static pci_devfn_t uart_console_get_pci_bdf ( void  )
static

Definition at line 47 of file uart.c.

References CONFIG, PCI_DEV, PCI_DEV_INVALID, PCI_DEVFN_INVALID, PCI_FUNC, PCI_SLOT, uart_devices, and uart_devices_size.

Referenced by uart_bootblock_init(), uart_get_device(), and uart_is_controller_initialized().

Here is the caller graph for this function:

◆ uart_get_device()

const struct device* uart_get_device ( void  )

Definition at line 69 of file uart.c.

References NULL, PCI_DEV2DEVFN, PCI_DEV_INVALID, pcidev_path_on_root(), and uart_console_get_pci_bdf().

Referenced by southbridge_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uart_is_controller_initialized()

bool uart_is_controller_initialized ( void  )

Definition at line 78 of file uart.c.

References base, lpss_is_controller_in_reset(), PCI_BASE_ADDRESS_0, PCI_COMMAND, PCI_DEV_INVALID, pci_s_read_config16(), pci_s_read_config32(), uart_console_get_pci_bdf(), and UART_PCI_ENABLE.

Referenced by smihandler_southbridge_sleep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uart_lpss_init()

static void uart_lpss_init ( pci_devfn_t  dev,
uintptr_t  baseaddr 
)
static

Definition at line 25 of file uart.c.

References lpss_clk_update(), lpss_reset_release(), lpss_set_power_state(), and STATE_D0.

Referenced by uart_bootblock_init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ uart_devices

const unsigned int uart_devices[]
extern

Definition at line 12 of file uart.c.

Referenced by uart_console_get_pci_bdf().

◆ uart_devices_size

const int uart_devices_size
extern

Definition at line 18 of file uart.c.

Referenced by uart_console_get_pci_bdf().