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>
This commit is contained in:
Elyes HAOUAS 2018-05-19 10:48:00 +02:00 committed by Kyösti Mälkki
parent 1df39c3aca
commit 1c56f2fe77
11 changed files with 31 additions and 24 deletions

View File

@ -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));

View File

@ -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

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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");

View File

@ -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;

View File

@ -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 */

View File

@ -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));

View File

@ -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));