mb/msi: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: I7f29fe3b85bc56ff3f2d225822c415513e961459
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
This commit is contained in:
Elyes HAOUAS
2018-05-04 22:07:08 +02:00
committed by Jonathan A. Kollasch
parent 29c3f3b8e9
commit 9740bcb0cf
14 changed files with 15 additions and 15 deletions

View File

@@ -16,7 +16,7 @@
/* APIC */ /* APIC */
unsigned long acpi_fill_madt(unsigned long current) unsigned long acpi_fill_madt(unsigned long current)
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
/* create all subtables for processors */ /* create all subtables for processors */

View File

@@ -49,7 +49,7 @@ void get_bus_conf(void)
{ {
unsigned apicid_base; unsigned apicid_base;
device_t dev; struct device *dev;
unsigned sbdn; unsigned sbdn;
int i; int i;

View File

@@ -46,7 +46,7 @@ static void *smp_write_config_table(void *v)
/* I/O APICs: APIC ID Version State Address*/ /* I/O APICs: APIC ID Version State Address*/
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
u32 dword; u32 dword;

View File

@@ -63,7 +63,7 @@ static unsigned get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
unsigned int apicid_base, sbdn; unsigned int apicid_base, sbdn;
device_t dev; struct device *dev;
int i; int i;
if (get_bus_conf_done == 1) if (get_bus_conf_done == 1)

View File

@@ -44,7 +44,7 @@ static void *smp_write_config_table(void *v)
/* I/O APICs: APIC ID Version State Address */ /* I/O APICs: APIC ID Version State Address */
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
uint32_t dword; uint32_t dword;

View File

@@ -20,7 +20,7 @@
/************************************************* /*************************************************
* enable the dedicated function in thatcher board. * enable the dedicated function in thatcher board.
*************************************************/ *************************************************/
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
msr_t msr; msr_t msr;

View File

@@ -144,7 +144,7 @@ static void *smp_write_config_table(void *v)
/* on board NIC & Slot PCIE. */ /* on board NIC & Slot PCIE. */
/* PCI slots */ /* PCI slots */
device_t dev = dev_find_slot(0, PCI_DEVFN(0x14, 4)); struct device *dev = dev_find_slot(0, PCI_DEVFN(0x14, 4));
if (dev && dev->enabled) { if (dev && dev->enabled) {
u8 bus_pci = dev->link_list->secondary; u8 bus_pci = dev->link_list->secondary;
/* PCI_SLOT 0. */ /* PCI_SLOT 0. */

View File

@@ -62,7 +62,7 @@ void get_bus_conf(void)
unsigned apicid_base; unsigned apicid_base;
device_t dev; struct device *dev;
int i; int i;
struct mb_sysconf_t *m; struct mb_sysconf_t *m;

View File

@@ -52,7 +52,7 @@ static void *smp_write_config_table(void *v)
/*I/O APICs: APIC ID Version State Address*/ /*I/O APICs: APIC ID Version State Address*/
{ {
device_t dev = 0; struct device *dev = NULL;
struct resource *res; struct resource *res;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
dev = dev_find_device(0x1166, 0x0235, dev); dev = dev_find_device(0x1166, 0x0235, dev);
@@ -91,7 +91,7 @@ static void *smp_write_config_table(void *v)
/* enable int */ /* enable int */
/* why here? must get the BAR and PCI command bit 1 set before enable it ....*/ /* why here? must get the BAR and PCI command bit 1 set before enable it ....*/
{ {
device_t dev; struct device *dev;
dev = dev_find_device(0x1166, 0x0205, 0); dev = dev_find_device(0x1166, 0x0205, 0);
if (dev) { if (dev) {
uint32_t dword; uint32_t dword;

View File

@@ -64,7 +64,7 @@ void get_bus_conf(void)
unsigned apicid_base; unsigned apicid_base;
struct mb_sysconf_t *m; struct mb_sysconf_t *m;
device_t dev; struct device *dev;
int i; int i;
if (get_bus_conf_done == 1) if (get_bus_conf_done == 1)

View File

@@ -48,7 +48,7 @@ static void *smp_write_config_table(void *v)
/*I/O APICs: APIC ID Version State Address*/ /*I/O APICs: APIC ID Version State Address*/
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
uint32_t dword; uint32_t dword;

View File

@@ -39,7 +39,7 @@ unsigned long acpi_fill_madt(unsigned long current)
unsigned sbdn; unsigned sbdn;
struct resource *res; struct resource *res;
device_t dev; struct device *dev;
get_bus_conf(); get_bus_conf();
sbdn = sysconf.sbdn; sbdn = sysconf.sbdn;

View File

@@ -65,7 +65,7 @@ void get_bus_conf(void)
unsigned apicid_base; unsigned apicid_base;
struct mb_sysconf_t *m; struct mb_sysconf_t *m;
device_t dev; struct device *dev;
int i; int i;
printk(BIOS_SPEW, "get_bus_conf()\n"); printk(BIOS_SPEW, "get_bus_conf()\n");

View File

@@ -45,7 +45,7 @@ static void *smp_write_config_table(void *v)
/*I/O APICs: APIC ID Version State Address*/ /*I/O APICs: APIC ID Version State Address*/
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
uint32_t dword; uint32_t dword;