summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-05-19 10:57:04 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2018-05-21 14:02:20 +0000
commit1cbe19f2d8f394ff866a2536162a7b1900ba49c7 (patch)
tree7996ed636146c20d4db90c7bdfb41143dd813593 /src
parent8349cb58de2fb4e23d3054491a9398c9c66b5a62 (diff)
downloadcoreboot-1cbe19f2d8f394ff866a2536162a7b1900ba49c7.tar.xz
sb/nvidia/ck804: Get rid of device_t
Use of device_t has been abandoned in ramstage. Change-Id: I59078ff96428d134f108ff2551556c8a7d2d3b37 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/26401 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src')
-rw-r--r--src/southbridge/nvidia/ck804/ck804.c11
-rw-r--r--src/southbridge/nvidia/ck804/ht.c2
-rw-r--r--src/southbridge/nvidia/ck804/lpc.c20
-rw-r--r--src/southbridge/nvidia/ck804/pci.c2
-rw-r--r--src/southbridge/nvidia/ck804/smbus.c8
5 files changed, 22 insertions, 21 deletions
diff --git a/src/southbridge/nvidia/ck804/ck804.c b/src/southbridge/nvidia/ck804/ck804.c
index 38988f5673..5fd9084a47 100644
--- a/src/southbridge/nvidia/ck804/ck804.c
+++ b/src/southbridge/nvidia/ck804/ck804.c
@@ -24,9 +24,9 @@
static u32 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);
if (!lpc_dev)
@@ -53,9 +53,9 @@ static device_t find_lpc_dev(device_t dev, unsigned devfn)
return lpc_dev;
}
-static void ck804_enable(device_t dev)
+static void ck804_enable(struct device *dev)
{
- device_t lpc_dev;
+ struct device *lpc_dev;
unsigned index = 0, index2 = 0, deviceid, vendorid, devfn;
u32 reg_old, reg;
u8 byte;
@@ -184,7 +184,8 @@ static void ck804_enable(device_t dev)
}
}
-static void ck804_set_subsystem(device_t dev, unsigned vendor, unsigned device)
+static void ck804_set_subsystem(struct device *dev, unsigned vendor,
+ unsigned device)
{
pci_write_config32(dev, 0x40,
((device & 0xffff) << 16) | (vendor & 0xffff));
diff --git a/src/southbridge/nvidia/ck804/ht.c b/src/southbridge/nvidia/ck804/ht.c
index 5f8b213396..48b18cb636 100644
--- a/src/southbridge/nvidia/ck804/ht.c
+++ b/src/southbridge/nvidia/ck804/ht.c
@@ -26,7 +26,7 @@
unsigned long acpi_fill_mcfg(unsigned long current)
{
- device_t dev;
+ struct device *dev;
unsigned long mcfg_base;
dev = dev_find_slot(0x0, PCI_DEVFN(0x0,0));
diff --git a/src/southbridge/nvidia/ck804/lpc.c b/src/southbridge/nvidia/ck804/lpc.c
index 2b0bdd536b..2c7519b150 100644
--- a/src/southbridge/nvidia/ck804/lpc.c
+++ b/src/southbridge/nvidia/ck804/lpc.c
@@ -51,7 +51,7 @@
#define CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL MAINBOARD_POWER_ON
#endif
-static void lpc_common_init(device_t dev)
+static void lpc_common_init(struct device *dev)
{
u32 dword;
struct resource *res;
@@ -68,12 +68,12 @@ static void lpc_common_init(device_t dev)
#endif
}
-static void lpc_slave_init(device_t dev)
+static void lpc_slave_init(struct device *dev)
{
lpc_common_init(dev);
}
-static void rom_dummy_write(device_t dev)
+static void rom_dummy_write(struct device *dev)
{
u8 old, new;
u8 *p;
@@ -103,7 +103,7 @@ static void rom_dummy_write(device_t dev)
unsigned pm_base = 0;
-static void lpc_init(device_t dev)
+static void lpc_init(struct device *dev)
{
u8 byte, byte_old;
int on, nmi_option;
@@ -158,7 +158,7 @@ static void lpc_init(device_t dev)
rom_dummy_write(dev);
}
-static void ck804_lpc_read_resources(device_t dev)
+static void ck804_lpc_read_resources(struct device *dev)
{
struct resource *res;
unsigned long index;
@@ -203,7 +203,7 @@ static void ck804_lpc_read_resources(device_t dev)
}
}
-static void ck804_lpc_set_resources(device_t dev)
+static void ck804_lpc_set_resources(struct device *dev)
{
u8 byte;
struct resource *res;
@@ -239,7 +239,7 @@ static void ck804_lpc_set_resources(device_t dev)
* This function is called by the global enable_resources() indirectly via the
* device_operation::enable_resources() method of devices.
*/
-static void ck804_lpc_enable_childrens_resources(device_t dev)
+static void ck804_lpc_enable_childrens_resources(struct device *dev)
{
struct bus *link;
u32 reg, reg_var[4];
@@ -248,7 +248,7 @@ static void ck804_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;
@@ -295,7 +295,7 @@ static void ck804_lpc_enable_childrens_resources(device_t dev)
pci_write_config32(dev, 0xa8 + i * 4, reg_var[i]);
}
-static void ck804_lpc_enable_resources(device_t dev)
+static void ck804_lpc_enable_resources(struct device *dev)
{
pci_dev_enable_resources(dev);
ck804_lpc_enable_childrens_resources(dev);
@@ -303,7 +303,7 @@ static void ck804_lpc_enable_resources(device_t dev)
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
-static void southbridge_acpi_fill_ssdt_generator(device_t device)
+static void southbridge_acpi_fill_ssdt_generator(struct device *device)
{
amd_generate_powernow(0, 0, 0);
}
diff --git a/src/southbridge/nvidia/ck804/pci.c b/src/southbridge/nvidia/ck804/pci.c
index a9f0f5b225..d4b074d14b 100644
--- a/src/southbridge/nvidia/ck804/pci.c
+++ b/src/southbridge/nvidia/ck804/pci.c
@@ -25,7 +25,7 @@
static void pci_init(struct device *dev)
{
u32 dword;
- device_t pci_domain_dev;
+ struct device *pci_domain_dev;
struct resource *mem, *pref;
dword = pci_read_config32(dev, 0x04);
diff --git a/src/southbridge/nvidia/ck804/smbus.c b/src/southbridge/nvidia/ck804/smbus.c
index e3b38dd98b..4a4ac2f6e5 100644
--- a/src/southbridge/nvidia/ck804/smbus.c
+++ b/src/southbridge/nvidia/ck804/smbus.c
@@ -24,7 +24,7 @@
#include "chip.h"
#include "smbus.h"
-static int lsmbus_recv_byte(device_t dev)
+static int lsmbus_recv_byte(struct device *dev)
{
unsigned device;
struct resource *res;
@@ -38,7 +38,7 @@ static int lsmbus_recv_byte(device_t dev)
return do_smbus_recv_byte(res->base, device);
}
-static int lsmbus_send_byte(device_t dev, u8 val)
+static int lsmbus_send_byte(struct device *dev, u8 val)
{
unsigned device;
struct resource *res;
@@ -52,7 +52,7 @@ static int lsmbus_send_byte(device_t dev, u8 val)
return do_smbus_send_byte(res->base, device, val);
}
-static int lsmbus_read_byte(device_t dev, u8 address)
+static int lsmbus_read_byte(struct device *dev, u8 address)
{
unsigned device;
struct resource *res;
@@ -66,7 +66,7 @@ static int lsmbus_read_byte(device_t dev, u8 address)
return do_smbus_read_byte(res->base, device, address);
}
-static int lsmbus_write_byte(device_t dev, u8 address, u8 val)
+static int lsmbus_write_byte(struct device *dev, u8 address, u8 val)
{
unsigned device;
struct resource *res;