device/device.h: Rename busses for clarity
This renames bus to upstream and link_list to downstream. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I80a81b6b8606e450ff180add9439481ec28c2420 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78330 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
3138faa7cf
commit
7fcd4d58ec
104 changed files with 343 additions and 348 deletions
|
|
@ -172,8 +172,8 @@ static void ptn3460_early_init(void *unused)
|
|||
return;
|
||||
}
|
||||
/* Initialize the I2C controller before it is used. */
|
||||
if (ptn_dev->bus && ptn_dev->bus->dev->ops && ptn_dev->bus->dev->ops->init)
|
||||
ptn_dev->bus->dev->ops->init(ptn_dev->bus->dev);
|
||||
if (ptn_dev->upstream && ptn_dev->upstream->dev->ops && ptn_dev->upstream->dev->ops->init)
|
||||
ptn_dev->upstream->dev->ops->init(ptn_dev->upstream->dev);
|
||||
ptn3460_init(ptn_dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ static void write_device_definitions(const struct device *dev)
|
|||
enum dptf_participant p;
|
||||
|
||||
/* The CPU device gets an _ADR that matches the ACPI PCI address for 00:04.00 */
|
||||
parent = dev && dev->bus ? dev->bus->dev : NULL;
|
||||
parent = dev && dev->upstream ? dev->upstream->dev : NULL;
|
||||
if (!parent || parent->path.type != DEVICE_PATH_PCI) {
|
||||
printk(BIOS_ERR, "%s: DPTF objects must live under 00:04.0 PCI device\n",
|
||||
__func__);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
static void ish_fill_ssdt_generator(const struct device *dev)
|
||||
{
|
||||
struct drivers_intel_ish_config *config = dev->chip_info;
|
||||
struct device *root = dev->bus->dev;
|
||||
struct device *root = dev->upstream->dev;
|
||||
struct acpi_dp *dsd;
|
||||
|
||||
if (!config)
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ static void camera_generate_pld(const struct device *dev)
|
|||
static uint32_t address_for_dev_type(const struct device *dev, uint8_t dev_type)
|
||||
{
|
||||
struct drivers_intel_mipi_camera_config *config = dev->chip_info;
|
||||
uint16_t i2c_bus = dev->bus ? dev->bus->secondary : 0xFFFF;
|
||||
uint16_t i2c_bus = dev->upstream ? dev->upstream->secondary : 0xFFFF;
|
||||
uint16_t i2c_addr;
|
||||
|
||||
switch (dev_type) {
|
||||
|
|
@ -416,7 +416,7 @@ static void camera_fill_sensor(const struct device *dev)
|
|||
.type = DEVICE_PATH_I2C,
|
||||
.i2c.device = config->vcm_address,
|
||||
};
|
||||
struct device *vcm_dev = find_dev_path(dev->bus, &path);
|
||||
struct device *vcm_dev = find_dev_path(dev->upstream, &path);
|
||||
struct drivers_intel_mipi_camera_config *vcm_config;
|
||||
vcm_config = vcm_dev ? vcm_dev->chip_info : NULL;
|
||||
|
||||
|
|
@ -927,7 +927,7 @@ static void camera_fill_ssdt(const struct device *dev)
|
|||
const struct device *pdev;
|
||||
|
||||
if (config->has_power_resource) {
|
||||
pdev = dev->bus->dev;
|
||||
pdev = dev->upstream->dev;
|
||||
if (!pdev || !pdev->enabled)
|
||||
return;
|
||||
|
||||
|
|
@ -951,7 +951,7 @@ static void camera_fill_ssdt(const struct device *dev)
|
|||
write_i2c_camera_device(dev, scope);
|
||||
break;
|
||||
case DEVICE_PATH_GENERIC:
|
||||
pdev = dev->bus->dev;
|
||||
pdev = dev->upstream->dev;
|
||||
scope = acpi_device_scope(pdev);
|
||||
if (!scope)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static bool link_enabled(const struct device *dev, unsigned int link)
|
|||
{
|
||||
struct device *child;
|
||||
|
||||
for (child = dev->link_list->children; child; child = child->sibling) {
|
||||
for (child = dev->downstream->children; child; child = child->sibling) {
|
||||
if (child->enabled && child->path.type == DEVICE_PATH_GENERIC &&
|
||||
child->path.generic.id == link)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ static void m88e1512_init(struct device *dev)
|
|||
if (config->downshift_cnt) {
|
||||
if (config->downshift_cnt > DOWNSHIFT_CNT_MAX) {
|
||||
printk(BIOS_INFO, "%s: Downshift counter for %s is too large.\n",
|
||||
dev_path(dev->bus->dev), dev->chip_ops->name);
|
||||
dev_path(dev->upstream->dev), dev->chip_ops->name);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "%s: Enable downshift after %d attempts for %s.\n",
|
||||
dev_path(dev->bus->dev), config->downshift_cnt,
|
||||
dev_path(dev->upstream->dev), config->downshift_cnt,
|
||||
dev->chip_ops->name);
|
||||
|
||||
reg = mdio_read(dev, COPPER_SPEC_CTRL_REG_1);
|
||||
|
|
@ -42,7 +42,7 @@ static void m88e1512_init(struct device *dev)
|
|||
/* Configure LEDs if requested. */
|
||||
if (config->configure_leds) {
|
||||
printk(BIOS_DEBUG, "%s: Set a customized LED mode for %s.\n",
|
||||
dev_path(dev->bus->dev), dev->chip_ops->name);
|
||||
dev_path(dev->upstream->dev), dev->chip_ops->name);
|
||||
|
||||
/* Select page 3 to access LED function control register. */
|
||||
switch_page(dev, 3);
|
||||
|
|
@ -57,7 +57,7 @@ static void m88e1512_init(struct device *dev)
|
|||
/* INTn can be routed to LED[2] pin. */
|
||||
if (config->enable_int) {
|
||||
printk(BIOS_DEBUG, "%s: INTn is routed to LED[2] pin %s.\n",
|
||||
dev_path(dev->bus->dev), dev->chip_ops->name);
|
||||
dev_path(dev->upstream->dev), dev->chip_ops->name);
|
||||
|
||||
/* Select page 3 to access LED function control register. */
|
||||
switch_page(dev, 3);
|
||||
|
|
@ -70,7 +70,7 @@ static void m88e1512_init(struct device *dev)
|
|||
/* Set RGMII output impedance manually. */
|
||||
if (config->force_mos) {
|
||||
printk(BIOS_DEBUG, "%s: Set RGMII driver strength manually for %s.\n",
|
||||
dev_path(dev->bus->dev), dev->chip_ops->name);
|
||||
dev_path(dev->upstream->dev), dev->chip_ops->name);
|
||||
|
||||
/* Select page 2 to access RGMII output impedance calibration override
|
||||
register. */
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ static void r8168_init(struct device *dev)
|
|||
static void r8168_net_fill_ssdt(const struct device *dev)
|
||||
{
|
||||
struct drivers_net_config *config = dev->chip_info;
|
||||
const char *path = acpi_device_path(dev->bus->dev);
|
||||
const char *path = acpi_device_path(dev->upstream->dev);
|
||||
u32 address;
|
||||
|
||||
if (!path || !config)
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ static int spi_acpi_get_bus(const struct device *dev)
|
|||
struct device *spi_dev;
|
||||
struct device_operations *ops;
|
||||
|
||||
if (!dev->bus || !dev->bus->dev)
|
||||
if (!dev->upstream || !dev->upstream->dev)
|
||||
return -1;
|
||||
|
||||
spi_dev = dev->bus->dev;
|
||||
spi_dev = dev->upstream->dev;
|
||||
ops = spi_dev->ops;
|
||||
|
||||
if (ops && ops->ops_spi_bus && ops->ops_spi_bus->dev_to_bus)
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ static void pcie_generic_fill_ssdt(const struct device *dev)
|
|||
pci_rom_ssdt(dev);
|
||||
|
||||
config = dev->chip_info;
|
||||
if (!config || !dev->bus || !dev->bus->dev)
|
||||
if (!config || !dev->upstream || !dev->upstream->dev)
|
||||
return;
|
||||
|
||||
const char *scope;
|
||||
const char *name;
|
||||
|
||||
scope = acpi_device_path(dev->bus->dev);
|
||||
scope = acpi_device_path(dev->upstream->dev);
|
||||
name = acpi_device_name(dev);
|
||||
|
||||
acpigen_write_scope(scope);
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ static int spi_acpi_get_bus(const struct device *dev)
|
|||
struct device *spi_dev;
|
||||
struct device_operations *ops;
|
||||
|
||||
if (!dev->bus || !dev->bus->dev)
|
||||
if (!dev->upstream || !dev->upstream->dev)
|
||||
return -1;
|
||||
|
||||
spi_dev = dev->bus->dev;
|
||||
spi_dev = dev->upstream->dev;
|
||||
ops = spi_dev->ops;
|
||||
|
||||
if (ops && ops->ops_spi_bus &&
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ static void usb_hub_add_ports(const struct device *dev)
|
|||
struct device *port = NULL;
|
||||
unsigned int child_count = 0;
|
||||
|
||||
while ((port = dev_bus_each_child(dev->link_list, port)) != NULL) {
|
||||
while ((port = dev_bus_each_child(dev->downstream, port)) != NULL) {
|
||||
if (child_count++ >= config->port_count) {
|
||||
printk(BIOS_WARNING, "%s cannot be added. Port Count limit reached.\n",
|
||||
dev_name(port));
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static const struct device *get_xhci_dev(const struct device *dev)
|
|||
if (is_root_device(dev))
|
||||
return NULL;
|
||||
|
||||
dev = dev->bus->dev;
|
||||
dev = dev->upstream->dev;
|
||||
}
|
||||
|
||||
return dev;
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ void wifi_cnvi_fill_ssdt(const struct device *dev)
|
|||
if (!dev)
|
||||
return;
|
||||
|
||||
path = acpi_device_path(dev->bus->dev);
|
||||
path = acpi_device_path(dev->upstream->dev);
|
||||
if (!path)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ int smbios_write_wifi_pcie(struct device *dev, int *handle, unsigned long *curre
|
|||
|
||||
int smbios_write_wifi_cnvi(struct device *dev, int *handle, unsigned long *current)
|
||||
{
|
||||
return smbios_write_wifi_pcie(dev->bus->dev, handle, current);
|
||||
return smbios_write_wifi_pcie(dev->upstream->dev, handle, current);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ static void wwan_fm350gl_acpi_gpio_events(const struct device *dev)
|
|||
static void wwan_fm350gl_acpi_fill_ssdt(const struct device *dev)
|
||||
{
|
||||
const struct drivers_wwan_fm_config *config = config_of(dev);
|
||||
const struct device *parent = dev->bus->dev;
|
||||
const struct device *parent = dev->upstream->dev;
|
||||
const char *scope = acpi_device_path(parent);
|
||||
const struct soc_intel_common_block_pcie_rtd3_config *rtd3_config;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue