summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-05-19 10:29:50 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2018-05-21 20:26:01 +0000
commitbcb124e0098156b0d7f03589cf631aa3738a0dae (patch)
tree2eb0311de04242b7a272067072cb9e738de5bfa1 /src
parentec41dae245df3fd938de0dfce3459f2a85a92753 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/southbridge/via/vt8237r/ctrl.c11
-rw-r--r--src/southbridge/via/vt8237r/fadt.c2
-rw-r--r--src/southbridge/via/vt8237r/ide.c2
-rw-r--r--src/southbridge/via/vt8237r/lpc.c9
-rw-r--r--src/southbridge/via/vt8237r/pirq.c2
-rw-r--r--src/southbridge/via/vt8237r/sata.c3
-rw-r--r--src/southbridge/via/vt8237r/usb.c3
-rw-r--r--src/southbridge/via/vt8237r/vt8237r.c2
-rw-r--r--src/southbridge/via/vt8237r/vt8237r.h6
9 files changed, 22 insertions, 18 deletions
diff --git a/src/southbridge/via/vt8237r/ctrl.c b/src/southbridge/via/vt8237r/ctrl.c
index 7b1518c53b..27761e6444 100644
--- a/src/southbridge/via/vt8237r/ctrl.c
+++ b/src/southbridge/via/vt8237r/ctrl.c
@@ -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);
}
diff --git a/src/southbridge/via/vt8237r/fadt.c b/src/southbridge/via/vt8237r/fadt.c
index afebd7d59b..c5cd1d6ccb 100644
--- a/src/southbridge/via/vt8237r/fadt.c
+++ b/src/southbridge/via/vt8237r/fadt.c
@@ -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 */
diff --git a/src/southbridge/via/vt8237r/ide.c b/src/southbridge/via/vt8237r/ide.c
index e500c2cbdf..ac9a5e781c 100644
--- a/src/southbridge/via/vt8237r/ide.c
+++ b/src/southbridge/via/vt8237r/ide.c
@@ -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,
diff --git a/src/southbridge/via/vt8237r/lpc.c b/src/southbridge/via/vt8237r/lpc.c
index 70ac5d9cc6..46b1e237fd 100644
--- a/src/southbridge/via/vt8237r/lpc.c
+++ b/src/southbridge/via/vt8237r/lpc.c
@@ -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);
diff --git a/src/southbridge/via/vt8237r/pirq.c b/src/southbridge/via/vt8237r/pirq.c
index fd55b1fc9d..e7eacdc882 100644
--- a/src/southbridge/via/vt8237r/pirq.c
+++ b/src/southbridge/via/vt8237r/pirq.c
@@ -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);
diff --git a/src/southbridge/via/vt8237r/sata.c b/src/southbridge/via/vt8237r/sata.c
index 42e3e850e5..f09e19072e 100644
--- a/src/southbridge/via/vt8237r/sata.c
+++ b/src/southbridge/via/vt8237r/sata.c
@@ -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);
diff --git a/src/southbridge/via/vt8237r/usb.c b/src/southbridge/via/vt8237r/usb.c
index 057a07ddae..42a0afe4a5 100644
--- a/src/southbridge/via/vt8237r/usb.c
+++ b/src/southbridge/via/vt8237r/usb.c
@@ -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);
diff --git a/src/southbridge/via/vt8237r/vt8237r.c b/src/southbridge/via/vt8237r/vt8237r.c
index e1a0e35a86..b88affee84 100644
--- a/src/southbridge/via/vt8237r/vt8237r.c
+++ b/src/southbridge/via/vt8237r/vt8237r.c
@@ -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;
diff --git a/src/southbridge/via/vt8237r/vt8237r.h b/src/southbridge/via/vt8237r/vt8237r.h
index d4cc771536..f383736504 100644
--- a/src/southbridge/via/vt8237r/vt8237r.h
+++ b/src/southbridge/via/vt8237r/vt8237r.h
@@ -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