coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i2c.c File Reference
#include <device/pci_ops.h>
#include <console/console.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <drivers/i2c/designware/dw_i2c.h>
#include <intelblocks/cfg.h>
#include <intelblocks/lpss.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
Include dependency graph for i2c.c:

Go to the source code of this file.

Functions

int dw_i2c_soc_dev_to_bus (const struct device *dev)
 
const struct dw_i2c_bus_configdw_i2c_get_soc_cfg (unsigned int bus)
 
uintptr_t dw_i2c_get_soc_early_base (unsigned int bus)
 
static int lpss_i2c_early_init_bus (unsigned int bus)
 
uintptr_t dw_i2c_base_address (unsigned int bus)
 

Function Documentation

◆ dw_i2c_base_address()

uintptr_t dw_i2c_base_address ( unsigned int  bus)

Definition at line 83 of file i2c.c.

References ALIGN_DOWN, soc_i2c_ctrlr_info::bar, base, BIOS_ERR, dw_i2c_soc_bus_to_devfn(), lpss_i2c_early_init_bus(), NULL, PCI_BASE_ADDRESS_0, PCI_DEV, PCI_FUNC, pci_read_config32(), PCI_SLOT, printk, and soc_get_i2c_ctrlr_info().

Referenced by dw_i2c_acpi_fill_ssdt().

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

◆ dw_i2c_get_soc_cfg()

const struct dw_i2c_bus_config* dw_i2c_get_soc_cfg ( unsigned int  bus)

Definition at line 23 of file i2c.c.

References BIOS_ERR, chip_get_common_soc_structure(), soc_intel_common_config::i2c, NULL, printk, and soc_get_i2c_bus_config().

Referenced by dw_i2c_acpi_fill_ssdt(), and dw_i2c_dev_init().

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

◆ dw_i2c_get_soc_early_base()

uintptr_t dw_i2c_get_soc_early_base ( unsigned int  bus)

Definition at line 32 of file i2c.c.

References EARLY_I2C_BASE.

Referenced by lpss_i2c_early_init_bus().

Here is the caller graph for this function:

◆ dw_i2c_soc_dev_to_bus()

int dw_i2c_soc_dev_to_bus ( const struct device dev)

Definition at line 16 of file i2c.c.

References mmio_path::addr, soc_i2c_ctrlr_info::bar, BIOS_ERR, pci_path::devfn, die(), dw_i2c_soc_devfn_to_bus(), device_path::mmio, device::path, device_path::pci, printk, and soc_get_i2c_ctrlr_info().

Referenced by dw_i2c_acpi_fill_ssdt(), and dw_i2c_dev_init().

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

◆ lpss_i2c_early_init_bus()

static int lpss_i2c_early_init_bus ( unsigned int  bus)
static