coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
conn.c File Reference
#include <acpi/acpigen.h>
#include <boot/coreboot_tables.h>
#include <cbmem.h>
#include <console/console.h>
#include <intelblocks/acpi.h>
#include "chip.h"
Include dependency graph for conn.c:

Go to the source code of this file.

Functions

static void conn_init (struct device *dev)
 
static unsigned int get_usb_port_number (const struct device *usb_port)
 
static struct type_c_infoconn_get_cbmem_buffer (void)
 
static void conn_write_cbmem_entry (struct device *dev)
 
static const char * conn_acpi_name (const struct device *dev)
 
static const char * orientation_to_str (enum type_c_orientation ori)
 
static void conn_fill_ssdt (const struct device *dev)
 
static void conn_enable (struct device *dev)
 
bool intel_pmc_mux_conn_get_ports (const struct device *conn, unsigned int *usb2_port, unsigned int *usb3_port)
 

Variables

static size_t total_conn_count
 
static struct device_operations conn_dev_ops
 
struct chip_operations drivers_intel_pmc_mux_conn_ops
 

Function Documentation

◆ conn_acpi_name()

static const char* conn_acpi_name ( const struct device dev)
static

Definition at line 77 of file conn.c.

References device_path::generic, generic_path::id, name, device::path, and snprintf().

Here is the call graph for this function:

◆ conn_enable()

static void conn_enable ( struct device dev)
static

Definition at line 150 of file conn.c.

References conn_dev_ops, and device::ops.

◆ conn_fill_ssdt()

static void conn_fill_ssdt ( const struct device dev)
static

Definition at line 97 of file conn.c.

◆ conn_get_cbmem_buffer()

static struct type_c_info* conn_get_cbmem_buffer ( void  )
static

Definition at line 24 of file conn.c.

References cbmem_add(), cbmem_find(), CBMEM_ID_TYPE_C_INFO, info, memset(), NULL, and total_conn_count.

Referenced by conn_write_cbmem_entry().

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

◆ conn_init()

static void conn_init ( struct device dev)
static

Definition at line 14 of file conn.c.

References total_conn_count.

◆ conn_write_cbmem_entry()

◆ get_usb_port_number()

static unsigned int get_usb_port_number ( const struct device usb_port)
static

Definition at line 19 of file conn.c.

Referenced by conn_write_cbmem_entry(), and intel_pmc_mux_conn_get_ports().

Here is the caller graph for this function:

◆ intel_pmc_mux_conn_get_ports()

bool intel_pmc_mux_conn_get_ports ( const struct device conn,
unsigned int *  usb2_port,
unsigned int *  usb3_port 
)

Definition at line 160 of file conn.c.

References device::chip_info, device::chip_ops, drivers_intel_pmc_mux_conn_ops, get_usb_port_number(), drivers_intel_pmc_mux_conn_config::usb2_port, and drivers_intel_pmc_mux_conn_config::usb3_port.

Referenced by tcss_get_port_info().

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

◆ orientation_to_str()

static const char* orientation_to_str ( enum type_c_orientation  ori)
static

Variable Documentation

◆ conn_dev_ops

struct device_operations conn_dev_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = conn_acpi_name,
.acpi_fill_ssdt = conn_fill_ssdt,
.init = conn_init,
}
static void conn_write_cbmem_entry(struct device *dev)
Definition: conn.c:43
static void conn_init(struct device *dev)
Definition: conn.c:14
static const char * conn_acpi_name(const struct device *dev)
Definition: conn.c:77
static void conn_fill_ssdt(const struct device *dev)
Definition: conn.c:97
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74

Definition at line 97 of file conn.c.

Referenced by conn_enable().

◆ drivers_intel_pmc_mux_conn_ops

struct chip_operations drivers_intel_pmc_mux_conn_ops
Initial value:
= {
.enable_dev = conn_enable,
}
static void conn_enable(struct device *dev)
Definition: conn.c:150

Definition at line 150 of file conn.c.

Referenced by intel_pmc_mux_conn_get_ports().

◆ total_conn_count

size_t total_conn_count
static

Definition at line 12 of file conn.c.

Referenced by conn_get_cbmem_buffer(), conn_init(), and conn_write_cbmem_entry().