diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2018-05-19 10:48:00 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2018-05-21 20:27:20 +0000 |
commit | 1c56f2fe77ea9fb30f277e08a40245b0751471bd (patch) | |
tree | 35086b509f8d34132ea02d4bae252427263d0b17 /src/southbridge | |
parent | 1df39c3aca25bd6822bbd1c3146a4880f9fe2620 (diff) |
sb/sis/sis966: Get rid of device_t
Use of device_t has been abandoned in ramstage.
Change-Id: I6002949fa90a46a2dd0e3519acbf2606bb679322
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/southbridge')
-rw-r--r-- | src/southbridge/sis/sis966/aza.c | 3 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/early_setup_car.c | 2 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/ide.c | 3 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/lpc.c | 19 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/nic.c | 3 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/sata.c | 3 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/sis761.c | 4 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/sis966.c | 10 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/sis966.h | 2 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/usb.c | 3 | ||||
-rw-r--r-- | src/southbridge/sis/sis966/usb2.c | 3 |
11 files changed, 31 insertions, 24 deletions
diff --git a/src/southbridge/sis/sis966/aza.c b/src/southbridge/sis/sis966/aza.c index f1a46b518c..39bc675f6b 100644 --- a/src/southbridge/sis/sis966/aza.c +++ b/src/southbridge/sis/sis966/aza.c @@ -295,7 +295,8 @@ static void aza_init(struct device *dev) printk(BIOS_DEBUG, "AZALIA_INIT:<----------\n"); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/early_setup_car.c b/src/southbridge/sis/sis966/early_setup_car.c index ba6d8a3124..624a68f577 100644 --- a/src/southbridge/sis/sis966/early_setup_car.c +++ b/src/southbridge/sis/sis966/early_setup_car.c @@ -23,7 +23,7 @@ void sis966_early_pcie_setup(unsigned busnx, unsigned devnx, unsigned anactrl_io uint32_t pll_ctrl; uint32_t dword; int i; - device_t dev; + pci_devfn_t dev; dev = PCI_DEV(busnx, devnx+1, 1); dword = pci_read_config32(dev, 0xe4); dword |= 0x3f0; // disable it at first diff --git a/src/southbridge/sis/sis966/ide.c b/src/southbridge/sis/sis966/ide.c index 6c7c7fe568..716193c168 100644 --- a/src/southbridge/sis/sis966/ide.c +++ b/src/southbridge/sis/sis966/ide.c @@ -158,7 +158,8 @@ printk(BIOS_DEBUG, "IDE_INIT:---------->\n"); printk(BIOS_DEBUG, "IDE_INIT:<----------\n"); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/lpc.c b/src/southbridge/sis/sis966/lpc.c index 82b850b361..51ee233a7f 100644 --- a/src/southbridge/sis/sis966/lpc.c +++ b/src/southbridge/sis/sis966/lpc.c @@ -52,7 +52,7 @@ #undef SLAVE_INIT -static void lpc_common_init(device_t dev) +static void lpc_common_init(struct device *dev) { uint8_t byte; void *ioapic_base; @@ -67,13 +67,13 @@ static void lpc_common_init(device_t dev) } #ifdef SLAVE_INIT -static void lpc_slave_init(device_t dev) +static void lpc_slave_init(struct device *dev) { lpc_common_init(dev); } #endif -static void lpc_usb_legacy_init(device_t dev) +static void lpc_usb_legacy_init(struct device *dev) { uint16_t acpi_base; @@ -83,7 +83,7 @@ static void lpc_usb_legacy_init(device_t dev) outb(inb(acpi_base + 0xba) |0x80, acpi_base + 0xba); } -static void lpc_init(device_t dev) +static void lpc_init(struct device *dev) { uint8_t byte; uint8_t byte_old; @@ -152,7 +152,7 @@ static void lpc_init(device_t dev) printk(BIOS_DEBUG, "LPC_INIT <--------\n"); } -static void sis966_lpc_read_resources(device_t dev) +static void sis966_lpc_read_resources(struct device *dev) { struct resource *res; @@ -183,7 +183,7 @@ static void sis966_lpc_read_resources(device_t dev) * * @param dev The device whose children's resources are to be enabled. */ -static void sis966_lpc_enable_childrens_resources(device_t dev) +static void sis966_lpc_enable_childrens_resources(struct device *dev) { struct bus *link; uint32_t reg, reg_var[4]; @@ -193,7 +193,7 @@ static void sis966_lpc_enable_childrens_resources(device_t dev) reg = pci_read_config32(dev, 0xa0); for (link = dev->link_list; link; link = link->next) { - device_t child; + struct device *child; for (child = link->children; child; child = child->sibling) { if (child->enabled && (child->path.type == DEVICE_PATH_PNP)) { struct resource *res; @@ -234,13 +234,14 @@ static void sis966_lpc_enable_childrens_resources(device_t dev) } -static void sis966_lpc_enable_resources(device_t dev) +static void sis966_lpc_enable_resources(struct device *dev) { pci_dev_enable_resources(dev); sis966_lpc_enable_childrens_resources(dev); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/nic.c b/src/southbridge/sis/sis966/nic.c index fee2988299..6c6a08a538 100644 --- a/src/southbridge/sis/sis966/nic.c +++ b/src/southbridge/sis/sis966/nic.c @@ -311,7 +311,8 @@ return; } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/sata.c b/src/southbridge/sis/sis966/sata.c index b9e843229d..68994d4ff7 100644 --- a/src/southbridge/sis/sis966/sata.c +++ b/src/southbridge/sis/sis966/sata.c @@ -145,7 +145,8 @@ static void sata_init(struct device *dev) printk(BIOS_DEBUG, "SATA_INIT:<----------\n"); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/sis761.c b/src/southbridge/sis/sis966/sis761.c index 174cda3d95..93f8142b4f 100644 --- a/src/southbridge/sis/sis966/sis761.c +++ b/src/southbridge/sis/sis966/sis761.c @@ -64,7 +64,7 @@ static inline msr_t rdmsr(unsigned index) * * @param dev TODO */ -static void sis761_read_resources(device_t dev) +static void sis761_read_resources(struct device *dev) { /* Read the generic PCI resources */ printk(BIOS_DEBUG, "sis761_read_resources ------->\n"); @@ -81,7 +81,7 @@ static void sis761_read_resources(device_t dev) } -static void sis761_set_resources(device_t dev) +static void sis761_set_resources(struct device *dev) { printk(BIOS_DEBUG, "sis761_set_resources ------->\n"); diff --git a/src/southbridge/sis/sis966/sis966.c b/src/southbridge/sis/sis966/sis966.c index cba4898925..3b1b564816 100644 --- a/src/southbridge/sis/sis966/sis966.c +++ b/src/southbridge/sis/sis966/sis966.c @@ -31,10 +31,10 @@ static uint32_t final_reg; -static device_t find_lpc_dev( device_t dev, unsigned devfn) +static struct device *find_lpc_dev( struct device *dev, unsigned devfn) { - device_t lpc_dev; + struct device *lpc_dev; lpc_dev = dev_find_slot(dev->bus->secondary, devfn); @@ -54,10 +54,10 @@ if ((lpc_dev->vendor != PCI_VENDOR_ID_SIS) || ( return lpc_dev; } -void sis966_enable(device_t dev) +void sis966_enable(struct device *dev) { - device_t lpc_dev = 0; - device_t sm_dev = 0; + struct device *lpc_dev = NULL; + struct device *sm_dev = NULL; uint16_t index = 0; uint16_t index2 = 0; uint32_t reg_old, reg; diff --git a/src/southbridge/sis/sis966/sis966.h b/src/southbridge/sis/sis966/sis966.h index 61bf0eebdd..bc59546aa3 100644 --- a/src/southbridge/sis/sis966/sis966.h +++ b/src/southbridge/sis/sis966/sis966.h @@ -32,7 +32,7 @@ #define DEBUG_USB2 0 #ifndef __SIMPLE_DEVICE__ -void sis966_enable(device_t dev); +void sis966_enable(struct device *dev); #endif #endif /* SIS966_H */ diff --git a/src/southbridge/sis/sis966/usb.c b/src/southbridge/sis/sis966/usb.c index 3f4f98d3e3..fce6002198 100644 --- a/src/southbridge/sis/sis966/usb.c +++ b/src/southbridge/sis/sis966/usb.c @@ -86,7 +86,8 @@ static void usb_init(struct device *dev) printk(BIOS_DEBUG, "USB 1.1 INIT:<----------\n"); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); diff --git a/src/southbridge/sis/sis966/usb2.c b/src/southbridge/sis/sis966/usb2.c index 79e7d09232..d99b694d4f 100644 --- a/src/southbridge/sis/sis966/usb2.c +++ b/src/southbridge/sis/sis966/usb2.c @@ -103,7 +103,8 @@ static void usb2_init(struct device *dev) printk(BIOS_DEBUG, "USB 2.0 INIT:<----------\n"); } -static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void lpci_set_subsystem(struct device *dev, unsigned vendor, + unsigned device) { pci_write_config32(dev, 0x40, ((device & 0xffff) << 16) | (vendor & 0xffff)); |