mb/hp: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: Ib9c0d0a85a9e38cdb1bdbcfa055e597f19cf3d5c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26087
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Elyes HAOUAS 2018-05-04 20:41:40 +02:00 committed by Patrick Rudolph
parent 5bb159a6cf
commit 56f172d9c0
17 changed files with 23 additions and 23 deletions

View File

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,

View File

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,

View File

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,

View File

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,

View File

@ -92,7 +92,7 @@ static void pirq_setup(void)
/********************************************** /**********************************************
* Enable the dedicated functions of the board. * Enable the dedicated functions of the board.
**********************************************/ **********************************************/
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");

View File

@ -178,7 +178,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

@ -40,7 +40,7 @@ unsigned long acpi_fill_madt(unsigned long current)
/* Write all 8131 IOAPICs */ /* Write all 8131 IOAPICs */
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN((sysconf.hcdn[0]&0xff), 1)); dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN((sysconf.hcdn[0]&0xff), 1));
if (dev) { if (dev) {

View File

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

View File

@ -31,7 +31,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*/
smp_write_ioapic(mc, m->apicid_8111, 0x20, VIO_APIC_VADDR); smp_write_ioapic(mc, m->apicid_8111, 0x20, VIO_APIC_VADDR);
{ {
device_t dev; struct device *dev;
struct resource *res; struct resource *res;
dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN(m->sbdn3,1)); dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN(m->sbdn3,1));
if (dev) { if (dev) {

View File

@ -64,7 +64,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

@ -54,7 +54,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;
int i; int i;
struct resource *res; struct resource *res;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
@ -87,7 +87,7 @@ static void *smp_write_config_table(void *v)
outb(0x0e, 0x4d1); outb(0x0e, 0x4d1);
{ {
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;
@ -103,7 +103,7 @@ static void *smp_write_config_table(void *v)
// hide XIOAPIC PCI configuration space // hide XIOAPIC PCI configuration space
{ {
device_t dev; struct device *dev;
dev = dev_find_device(0x1166, 0x205, 0); dev = dev_find_device(0x1166, 0x205, 0);
if (dev) { if (dev) {
uint32_t dword; uint32_t dword;
@ -148,7 +148,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

@ -65,7 +65,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

@ -55,7 +55,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;
int i; int i;
struct resource *res; struct resource *res;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
@ -84,7 +84,7 @@ static void *smp_write_config_table(void *v)
outb(0x0e, 0x4d1); outb(0x0e, 0x4d1);
{ {
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;
@ -100,7 +100,7 @@ static void *smp_write_config_table(void *v)
// hide XIOAPIC PCI configuration space // hide XIOAPIC PCI configuration space
{ {
device_t dev; struct device *dev;
dev = dev_find_device(0x1166, 0x205, 0); dev = dev_find_device(0x1166, 0x205, 0);
if (dev) { if (dev) {
uint32_t dword; uint32_t dword;
@ -127,7 +127,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

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,

View File

@ -30,7 +30,7 @@ static void pavilion_cold_boot_init(void)
pavilion_m6_1035dx_ec_init(); pavilion_m6_1035dx_ec_init();
} }
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");

View File

@ -145,7 +145,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

@ -16,7 +16,7 @@
#include <device/device.h> #include <device/device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
static void mainboard_enable(device_t dev) static void mainboard_enable(struct device *dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT,