[coreboot-gerrit] Change in coreboot[master]: mb/gigabyte: Get rid of device_t

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Fri May 4 20:19:42 CEST 2018


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


Change subject: mb/gigabyte: Get rid of device_t
......................................................................

mb/gigabyte: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: I37ba054022241c93c03e6c804e46f4e8a1c1143e
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/mainboard/gigabyte/ga-b75m-d3h/mainboard.c
M src/mainboard/gigabyte/ga-b75m-d3v/mainboard.c
M src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c
M src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
M src/mainboard/gigabyte/ga_2761gxdk/mptable.c
M src/mainboard/gigabyte/m57sli/acpi_tables.c
M src/mainboard/gigabyte/m57sli/get_bus_conf.c
M src/mainboard/gigabyte/m57sli/mptable.c
M src/mainboard/gigabyte/ma785gm/get_bus_conf.c
M src/mainboard/gigabyte/ma785gm/mainboard.c
M src/mainboard/gigabyte/ma785gm/mptable.c
M src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
M src/mainboard/gigabyte/ma785gmt/mainboard.c
M src/mainboard/gigabyte/ma785gmt/mptable.c
M src/mainboard/gigabyte/ma78gm/get_bus_conf.c
M src/mainboard/gigabyte/ma78gm/mainboard.c
M src/mainboard/gigabyte/ma78gm/mptable.c
17 files changed, 29 insertions(+), 29 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/26084/1

diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/mainboard.c b/src/mainboard/gigabyte/ga-b75m-d3h/mainboard.c
index 590e25f..7bc353c 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/mainboard.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/mainboard.c
@@ -33,7 +33,7 @@
 #include <device/pci.h>
 #include <cbfs.h>
 
-static void mainboard_init(device_t dev)
+static void mainboard_init(struct device *dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
@@ -72,7 +72,7 @@
 // mainboard_enable is executed as first thing after
 // enumerate_buses().
 
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	dev->ops->init = mainboard_init;
 
diff --git a/src/mainboard/gigabyte/ga-b75m-d3v/mainboard.c b/src/mainboard/gigabyte/ga-b75m-d3v/mainboard.c
index 590e25f..7bc353c 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3v/mainboard.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3v/mainboard.c
@@ -33,7 +33,7 @@
 #include <device/pci.h>
 #include <cbfs.h>
 
-static void mainboard_init(device_t dev)
+static void mainboard_init(struct device *dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
@@ -72,7 +72,7 @@
 // mainboard_enable is executed as first thing after
 // enumerate_buses().
 
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	dev->ops->init = mainboard_init;
 
diff --git a/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c b/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c
index 53171c2..75f6b9f 100644
--- a/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c
@@ -63,7 +63,7 @@
 	unsigned apicid_base;
 	unsigned sbdn;
 
-	device_t dev;
+	struct device *dev;
 	int i;
 
 	if (get_bus_conf_done == 1)
diff --git a/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c b/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
index d1168a7..d2bc182 100644
--- a/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
+++ b/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
@@ -109,7 +109,7 @@
 	printk(BIOS_INFO, "done.\n");
 
 	{
-		device_t dev;
+		struct device *dev;
 		dev = dev_find_slot(0, PCI_DEVFN(2, 0));
 		if (dev) {
 			/* initialize PCI interupts - these assignments depend
diff --git a/src/mainboard/gigabyte/ga_2761gxdk/mptable.c b/src/mainboard/gigabyte/ga_2761gxdk/mptable.c
index 991f24e..ae59264 100644
--- a/src/mainboard/gigabyte/ga_2761gxdk/mptable.c
+++ b/src/mainboard/gigabyte/ga_2761gxdk/mptable.c
@@ -47,7 +47,7 @@
 
 /*I/O APICs:	APIC ID	Version	State		Address*/
 	{
-		device_t dev;
+		struct device *dev;
 		struct resource *res;
 		uint32_t dword;
 
diff --git a/src/mainboard/gigabyte/m57sli/acpi_tables.c b/src/mainboard/gigabyte/m57sli/acpi_tables.c
index 3188af3..72b82f5 100644
--- a/src/mainboard/gigabyte/m57sli/acpi_tables.c
+++ b/src/mainboard/gigabyte/m57sli/acpi_tables.c
@@ -38,7 +38,7 @@
 
 	unsigned sbdn;
 	struct resource *res;
-	device_t dev;
+	struct device *dev;
 
 	get_bus_conf();
 	sbdn = sysconf.sbdn;
diff --git a/src/mainboard/gigabyte/m57sli/get_bus_conf.c b/src/mainboard/gigabyte/m57sli/get_bus_conf.c
index 9d13b0c..5ef7962 100644
--- a/src/mainboard/gigabyte/m57sli/get_bus_conf.c
+++ b/src/mainboard/gigabyte/m57sli/get_bus_conf.c
@@ -61,7 +61,7 @@
 	unsigned apicid_base;
 	unsigned sbdn;
 
-	device_t dev;
+	struct device *dev;
 	int i;
 
 	if (get_bus_conf_done == 1)
diff --git a/src/mainboard/gigabyte/m57sli/mptable.c b/src/mainboard/gigabyte/m57sli/mptable.c
index 019a7f5..e9ffe52 100644
--- a/src/mainboard/gigabyte/m57sli/mptable.c
+++ b/src/mainboard/gigabyte/m57sli/mptable.c
@@ -46,7 +46,7 @@
 
 /*I/O APICs:	APIC ID	Version	State		Address*/
 	{
-		device_t dev;
+		struct device *dev;
 		struct resource *res;
 
 		dev = dev_find_slot(bus_mcp55[0], PCI_DEVFN(sbdn+ 0x1,0));
diff --git a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
index 8931d95..18cf0a8 100644
--- a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
@@ -57,7 +57,7 @@
 void get_bus_conf(void)
 {
 	u32 apicid_base;
-	device_t dev;
+	struct device *dev;
 	int i;
 
 	if (get_bus_conf_done == 1)
diff --git a/src/mainboard/gigabyte/ma785gm/mainboard.c b/src/mainboard/gigabyte/ma785gm/mainboard.c
index ac53c43..a95686c 100644
--- a/src/mainboard/gigabyte/ma785gm/mainboard.c
+++ b/src/mainboard/gigabyte/ma785gm/mainboard.c
@@ -31,7 +31,7 @@
 {
 	u8 byte;
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* set 0 to bit1 :disable GPM9 as SLP_S2 output */
 	/* set 0 to bit2 :disable GPM8 as AZ_RST output */
 	byte = pm_ioread(0x8d);
@@ -56,7 +56,7 @@
 {
 	u8 byte;
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 
 	/* set 0 to bit1 :disable GPM9 as SLP_S2 output */
 	/* set 0 to bit2 :disable GPM8 as AZ_RST output */
@@ -94,7 +94,7 @@
 	u8 byte;
 //	u16 word;
 	u32 dword;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* disable the GPIO40 as CLKREQ2# function */
 	byte = pm_ioread(0xd3);
 	byte &= ~(1 << 7);
@@ -130,7 +130,7 @@
 * enable the dedicated function in ma785gm board.
 * This function called early than rs780_enable.
 *************************************************/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	printk(BIOS_INFO, "Mainboard MA785GM-US2H Enable. dev=0x%p\n", dev);
 
diff --git a/src/mainboard/gigabyte/ma785gm/mptable.c b/src/mainboard/gigabyte/ma785gm/mptable.c
index 3f9d7c7..379f04a 100644
--- a/src/mainboard/gigabyte/ma785gm/mptable.c
+++ b/src/mainboard/gigabyte/ma785gm/mptable.c
@@ -46,7 +46,7 @@
 
 	/* I/O APICs:   APIC ID Version State   Address */
 	{
-		device_t dev;
+		struct device *dev;
 		u32 dword;
 		u8 byte;
 
diff --git a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
index 8931d95..18cf0a8 100644
--- a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
@@ -57,7 +57,7 @@
 void get_bus_conf(void)
 {
 	u32 apicid_base;
-	device_t dev;
+	struct device *dev;
 	int i;
 
 	if (get_bus_conf_done == 1)
diff --git a/src/mainboard/gigabyte/ma785gmt/mainboard.c b/src/mainboard/gigabyte/ma785gmt/mainboard.c
index 187c30e..acc88fd 100644
--- a/src/mainboard/gigabyte/ma785gmt/mainboard.c
+++ b/src/mainboard/gigabyte/ma785gmt/mainboard.c
@@ -41,7 +41,7 @@
 {
 	u8 byte;
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* set 0 to bit1 :disable GPM9 as SLP_S2 output */
 	/* set 0 to bit2 :disable GPM8 as AZ_RST output */
 	byte = pm_ioread(0x8d);
@@ -66,7 +66,7 @@
 {
 	u8 byte;
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 
 	/* set 0 to bit1 :disable GPM9 as SLP_S2 output */
 	/* set 0 to bit2 :disable GPM8 as AZ_RST output */
@@ -94,7 +94,7 @@
 int is_dev3_present(void)
 {
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 
 	/* access the smbus extended register */
 	sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
@@ -124,7 +124,7 @@
 	u8 byte;
 //	u16 word;
 	u32 dword;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* disable the GPIO40 as CLKREQ2# function */
 	byte = pm_ioread(0xd3);
 	byte &= ~(1 << 7);
@@ -179,7 +179,7 @@
 {
 	u8 byte;
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 
 	/* set ADT 7461 */
 	ADT7461_write_byte(0x0B, 0x50);	/* Local Temperature Hight limit */
@@ -240,7 +240,7 @@
 * enable the dedicated function in ma785gmt board.
 * This function called early than rs780_enable.
 *************************************************/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	printk(BIOS_INFO, "Mainboard MA785GMT-UD2H Enable. dev=0x%p\n", dev);
 
diff --git a/src/mainboard/gigabyte/ma785gmt/mptable.c b/src/mainboard/gigabyte/ma785gmt/mptable.c
index 3f9d7c7..379f04a 100644
--- a/src/mainboard/gigabyte/ma785gmt/mptable.c
+++ b/src/mainboard/gigabyte/ma785gmt/mptable.c
@@ -46,7 +46,7 @@
 
 	/* I/O APICs:   APIC ID Version State   Address */
 	{
-		device_t dev;
+		struct device *dev;
 		u32 dword;
 		u8 byte;
 
diff --git a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
index 8931d95..18cf0a8 100644
--- a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
@@ -57,7 +57,7 @@
 void get_bus_conf(void)
 {
 	u32 apicid_base;
-	device_t dev;
+	struct device *dev;
 	int i;
 
 	if (get_bus_conf_done == 1)
diff --git a/src/mainboard/gigabyte/ma78gm/mainboard.c b/src/mainboard/gigabyte/ma78gm/mainboard.c
index 505ba3e..cdfefbb 100644
--- a/src/mainboard/gigabyte/ma78gm/mainboard.c
+++ b/src/mainboard/gigabyte/ma78gm/mainboard.c
@@ -34,7 +34,7 @@
 void set_pcie_dereset()
 {
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* GPIO 6 reset PCIe slot, GPIO 4 reset GFX PCIe */
 	sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
 
@@ -47,7 +47,7 @@
 void set_pcie_reset()
 {
 	u16 word;
-	device_t sm_dev;
+	struct device *sm_dev;
 	/* GPIO 6 reset PCIe slot, GPIO 4 reset GFX PCIe */
 	sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
 
@@ -67,7 +67,7 @@
 * enable the dedicated function in board.
 * This function called early than rs780_enable.
 *************************************************/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	printk(BIOS_INFO, "Mainboard MA78GM-US2H Enable. dev=0x%p\n", dev);
 
diff --git a/src/mainboard/gigabyte/ma78gm/mptable.c b/src/mainboard/gigabyte/ma78gm/mptable.c
index 3f9d7c7..379f04a 100644
--- a/src/mainboard/gigabyte/ma78gm/mptable.c
+++ b/src/mainboard/gigabyte/ma78gm/mptable.c
@@ -46,7 +46,7 @@
 
 	/* I/O APICs:   APIC ID Version State   Address */
 	{
-		device_t dev;
+		struct device *dev;
 		u32 dword;
 		u8 byte;
 

-- 
To view, visit https://review.coreboot.org/26084
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: I37ba054022241c93c03e6c804e46f4e8a1c1143e
Gerrit-Change-Number: 26084
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/20180504/631c4abf/attachment-0001.html>


More information about the coreboot-gerrit mailing list