sb/via/vt8237r: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: Ic4137bc4008d08e0e0d002e52c353fc29355ccb1
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26395
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:29:50 +02:00 committed by Kyösti Mälkki
parent ec41dae245
commit bcb124e009
9 changed files with 22 additions and 18 deletions

View File

@ -26,7 +26,7 @@
static void vt8237_cfg(struct device *dev)
{
u8 regm;
device_t devfun3;
struct device *devfun3;
devfun3 = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_K8T800_DRAM, 0);
@ -107,7 +107,7 @@ static void vt8237_cfg(struct device *dev)
static void vt8237s_vlink_init(struct device *dev)
{
u8 reg;
device_t devfun7;
struct device *devfun7;
devfun7 = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_K8T800_NB_SB_CTR, 0);
@ -182,7 +182,7 @@ static void vt8237s_vlink_init(struct device *dev)
static void vt8237a_vlink_init(struct device *dev)
{
u8 reg;
device_t devfun7;
struct device *devfun7;
devfun7 = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_K8T800_NB_SB_CTR, 0);
@ -276,8 +276,9 @@ static void ctrl_init(struct device *dev)
* VT8237R specific configuration. Other SB are done in their own
* directories. TODO: Add A version.
*/
device_t devsb = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_VT8237S_LPC, 0);
struct device *devsb = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_VT8237S_LPC,
0);
if (devsb) {
vt8237s_vlink_init(dev);
}

View File

@ -28,7 +28,7 @@
void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
{
acpi_header_t *header = &(fadt->header);
device_t dev;
struct device *dev;
int is_vt8237s = 0;
/* Power management controller */

View File

@ -103,7 +103,7 @@ static void ide_init(struct device *dev)
pci_write_config32(dev, IDE_UDMA, cablesel);
#if IS_ENABLED(CONFIG_EPIA_VT8237R_INIT)
device_t lpc_dev;
struct device *lpc_dev;
/* Set PATA Output Drive Strength */
lpc_dev = dev_find_device(PCI_VENDOR_ID_VIA,

View File

@ -62,7 +62,7 @@ static unsigned char *pin_to_irq(const unsigned char *pin)
static void pci_routing_fixup(struct device *dev)
{
#if IS_ENABLED(CONFIG_EPIA_VT8237R_INIT)
device_t pdev;
struct device *pdev;
#endif
/* PCI PNP Interrupt Routing INTE/F - disable */
@ -144,7 +144,7 @@ static void pci_routing_fixup(struct device *dev)
* This avoids having to handle any System Management Interrupts (SMIs).
*/
static void setup_pm(device_t dev)
static void setup_pm(struct device *dev)
{
u16 tmp;
struct southbridge_via_vt8237r_config *cfg;
@ -567,7 +567,7 @@ static void vt8237_common_init(struct device *dev)
cmos_init(0);
}
static void vt8237r_read_resources(device_t dev)
static void vt8237r_read_resources(struct device *dev)
{
struct resource *res;
@ -639,7 +639,8 @@ static void southbridge_init_common(struct device *dev)
}
static void vt8237_set_subsystem(device_t dev, unsigned vendor, unsigned device)
static void vt8237_set_subsystem(struct device *dev, unsigned vendor,
unsigned device)
{
pci_write_config16(dev, 0x70, vendor);
pci_write_config16(dev, 0x72, device);

View File

@ -24,7 +24,7 @@
#if IS_ENABLED(CONFIG_PIRQ_ROUTE) && IS_ENABLED(CONFIG_GENERATE_PIRQ_TABLE)
void pirq_assign_irqs(const unsigned char route[4])
{
device_t pdev;
struct device *pdev;
pdev = dev_find_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_VT8237R_LPC, 0);

View File

@ -92,7 +92,8 @@ static void sata_ii_init(struct device *dev)
}
static void vt8237_set_subsystem(device_t dev, unsigned vendor, unsigned device)
static void vt8237_set_subsystem(struct device *dev, unsigned vendor,
unsigned device)
{
pci_write_config16(dev, 0xd4, vendor);
pci_write_config16(dev, 0xd6, device);

View File

@ -154,7 +154,8 @@ static void vt8237_usb_ii_read_resources(struct device *dev)
return;
}
static void vt8237_set_subsystem(device_t dev, unsigned vendor, unsigned device)
static void vt8237_set_subsystem(struct device *dev, unsigned vendor,
unsigned device)
{
pci_write_config32(dev, 0x42, pci_read_config32(dev, 0x42) | 0x10);
pci_write_config16(dev, 0x2c, vendor);

View File

@ -44,7 +44,7 @@ void writeback(struct device *dev, u16 where, u8 what)
}
#endif
void dump_south(device_t dev)
void dump_south(struct device *dev)
{
int i, j;

View File

@ -144,9 +144,9 @@ void enable_rom_decode(void);
void vt8237_early_spi_init(void);
int vt8237_early_network_init(struct vt8237_network_rom *rom);
#else
void writeback(device_t dev, u16 where, u8 what);
void dump_south(device_t dev);
u32 vt8237_ide_80pin_detect(device_t dev);
void writeback(struct device *dev, u16 where, u8 what);
void dump_south(struct device *dev);
u32 vt8237_ide_80pin_detect(struct device *dev);
#endif
#endif