[coreboot-gerrit] Change in coreboot[master]: sb/intel/i82801ax: Get rid of device_t

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Sun May 13 13:29:15 CEST 2018


Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/26252


Change subject: sb/intel/i82801ax: Get rid of device_t
......................................................................

sb/intel/i82801ax: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: I5c18fdc24bd0432f6b7a1131af68c792d377c3ac
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/southbridge/intel/i82801ax/i82801ax.c
M src/southbridge/intel/i82801ax/i82801ax.h
M src/southbridge/intel/i82801ax/lpc.c
M src/southbridge/intel/i82801ax/smbus.c
M src/southbridge/intel/i82801ax/watchdog.c
5 files changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/26252/1

diff --git a/src/southbridge/intel/i82801ax/i82801ax.c b/src/southbridge/intel/i82801ax/i82801ax.c
index 7ef22e2..37c264e 100644
--- a/src/southbridge/intel/i82801ax/i82801ax.c
+++ b/src/southbridge/intel/i82801ax/i82801ax.c
@@ -21,10 +21,10 @@
 #include <device/pci.h>
 #include "i82801ax.h"
 
-void i82801ax_enable(device_t dev)
+void i82801ax_enable(struct device *dev)
 {
 	u16 reg16, index;
-	device_t lpc_dev;
+	struct device *lpc_dev;
 
 	/* Search for the 82801AA/AB LPC device (D31:F0) on PCI bus 0. */
 	lpc_dev = dev_find_slot(0, PCI_DEVFN(0x1f, 0));
diff --git a/src/southbridge/intel/i82801ax/i82801ax.h b/src/southbridge/intel/i82801ax/i82801ax.h
index 879c25a..a23da35 100644
--- a/src/southbridge/intel/i82801ax/i82801ax.h
+++ b/src/southbridge/intel/i82801ax/i82801ax.h
@@ -19,7 +19,7 @@
 
 #if !defined(__PRE_RAM__)
 #include "chip.h"
-void i82801ax_enable(device_t dev);
+void i82801ax_enable(struct device *dev);
 #else
 void enable_smbus(void);
 int smbus_read_byte(u8 device, u8 address);
diff --git a/src/southbridge/intel/i82801ax/lpc.c b/src/southbridge/intel/i82801ax/lpc.c
index 29ed036..44ea03b 100644
--- a/src/southbridge/intel/i82801ax/lpc.c
+++ b/src/southbridge/intel/i82801ax/lpc.c
@@ -118,7 +118,7 @@
 	/* TODO: Explain/#define the real meaning of these magic numbers. */
 }
 
-static void i82801ax_pirq_init(device_t dev)
+static void i82801ax_pirq_init(struct device *dev)
 {
 	u8 reg8;
 	config_t *config = dev->chip_info;
@@ -136,7 +136,7 @@
 	pci_write_config8(dev, PIRQD_ROUT, reg8);
 }
 
-static void i82801ax_power_options(device_t dev)
+static void i82801ax_power_options(struct device *dev)
 {
 	uint8_t byte;
 	int pwr_on = -1;
@@ -166,7 +166,7 @@
 	}
 }
 
-static void gpio_init(device_t dev)
+static void gpio_init(struct device *dev)
 {
 	pci_write_config32(dev, GPIO_BASE, (GPIO_BASE_ADDR | 1));
 	pci_write_config8(dev, GPIO_CNTL, GPIO_EN);
@@ -207,7 +207,7 @@
 	pci_write_config16(dev, PCI_DMA_CFG, reg16);
 }
 
-static void i82801ax_lpc_decode_en(device_t dev)
+static void i82801ax_lpc_decode_en(struct device *dev)
 {
 	/* Decode 0x3F8-0x3FF (COM1) for COMA port, 0x2F8-0x2FF (COM2) for COMB.
 	 * LPT decode defaults to 0x378-0x37F and 0x778-0x77F.
@@ -251,7 +251,7 @@
 	i82801ax_lpc_decode_en(dev);
 }
 
-static void i82801ax_lpc_read_resources(device_t dev)
+static void i82801ax_lpc_read_resources(struct device *dev)
 {
 	struct resource *res;
 
diff --git a/src/southbridge/intel/i82801ax/smbus.c b/src/southbridge/intel/i82801ax/smbus.c
index 1e71a98..d76ab92 100644
--- a/src/southbridge/intel/i82801ax/smbus.c
+++ b/src/southbridge/intel/i82801ax/smbus.c
@@ -22,7 +22,7 @@
 #include <southbridge/intel/common/smbus.h>
 #include "i82801ax.h"
 
-static int lsmbus_read_byte(device_t dev, u8 address)
+static int lsmbus_read_byte(struct device *dev, u8 address)
 {
 	u16 device;
 	struct resource *res;
diff --git a/src/southbridge/intel/i82801ax/watchdog.c b/src/southbridge/intel/i82801ax/watchdog.c
index 60a7b57..d0af76c 100644
--- a/src/southbridge/intel/i82801ax/watchdog.c
+++ b/src/southbridge/intel/i82801ax/watchdog.c
@@ -24,7 +24,7 @@
 
 void watchdog_off(void)
 {
-	device_t dev;
+	struct device *dev;
 	unsigned long value, base;
 
 	/* Turn off the ICH5 watchdog. */

-- 
To view, visit https://review.coreboot.org/26252
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c18fdc24bd0432f6b7a1131af68c792d377c3ac
Gerrit-Change-Number: 26252
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas at noos.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180513/e462d019/attachment-0001.html>


More information about the coreboot-gerrit mailing list