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

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Fri May 4 21:59:34 CEST 2018


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


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

mb/siemens: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: If67ea25a9e1363dde8aefe62b92ee7a61f0458b0
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/mainboard/siemens/mc_apl1/mainboard.c
M src/mainboard/siemens/mc_bdx1/mainboard.c
M src/mainboard/siemens/mc_tcu3/mainboard.c
M src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
M src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c
M src/mainboard/siemens/sitemp_g1p1/mainboard.c
M src/mainboard/siemens/sitemp_g1p1/mainboard.h
M src/mainboard/siemens/sitemp_g1p1/mptable.c
8 files changed, 20 insertions(+), 20 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/26097/1

diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c
index 09667cc..b81da5f 100644
--- a/src/mainboard/siemens/mc_apl1/mainboard.c
+++ b/src/mainboard/siemens/mc_apl1/mainboard.c
@@ -196,7 +196,7 @@
 static void mainboard_final(void *chip_info)
 {
 	uint16_t cmd = 0;
-	device_t dev = NULL;
+	struct device *dev = NULL;
 
 	/* Do board specific things */
 	variant_mainboard_final();
diff --git a/src/mainboard/siemens/mc_bdx1/mainboard.c b/src/mainboard/siemens/mc_bdx1/mainboard.c
index 66edcb7..73290d5 100644
--- a/src/mainboard/siemens/mc_bdx1/mainboard.c
+++ b/src/mainboard/siemens/mc_bdx1/mainboard.c
@@ -96,7 +96,7 @@
  * mainboard_enable is executed as first thing after enumerate_buses().
  * This is the earliest point to add customization.
  */
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 
 }
@@ -104,7 +104,7 @@
 static void mainboard_init(void *chip_info)
 {
 	uint8_t actl = 0;
-	device_t dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
+	struct device *dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
 
 	/* Route SCI to IRQ 10 to free IRQ 9 slot. */
 	actl = pci_read_config8(dev, ACPI_CNTL_OFFSET);
@@ -121,7 +121,7 @@
 {
 	void *spi_base = NULL;
 	uint32_t rcba = 0;
-	device_t dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
+	struct device *dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
 
 	/* Get address of SPI controller. */
 	rcba = (pci_read_config32(dev, 0xf0) & 0xffffc000);
diff --git a/src/mainboard/siemens/mc_tcu3/mainboard.c b/src/mainboard/siemens/mc_tcu3/mainboard.c
index df08471..1f67319 100644
--- a/src/mainboard/siemens/mc_tcu3/mainboard.c
+++ b/src/mainboard/siemens/mc_tcu3/mainboard.c
@@ -75,7 +75,7 @@
  * mainboard_enable is executed as first thing after enumerate_buses().
  * This is the earliest point to add customization.
  */
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 	setup_lcd_panel();
 }
diff --git a/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c b/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
index 0787d7a..0ced54b 100644
--- a/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
+++ b/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
@@ -44,7 +44,7 @@
 
 static void acpi_write_gvars(global_vars_t *gvars)
 {
-	device_t dev;
+	struct device *dev;
 	struct resource *res;
 
 	memset((void *)gvars, 0, GLOBAL_VARS_SIZE);
@@ -86,7 +86,7 @@
 	return current;
 }
 
-void mainboard_inject_dsdt(device_t device)
+void mainboard_inject_dsdt(struct device *device)
 {
 	global_vars_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, GLOBAL_VARS_SIZE);
 
diff --git a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c b/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c
index dc6833a..b1b7270 100644
--- a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c
+++ b/src/mainboard/siemens/sitemp_g1p1/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/siemens/sitemp_g1p1/mainboard.c b/src/mainboard/siemens/sitemp_g1p1/mainboard.c
index bc2c75b..3da34003 100644
--- a/src/mainboard/siemens/sitemp_g1p1/mainboard.c
+++ b/src/mainboard/siemens/sitemp_g1p1/mainboard.c
@@ -378,7 +378,7 @@
 {
 	u16 word;
 	u8 byte;
-	device_t sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
+	struct device *sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
 
 	/* set SB600 GPIO 64 to GPIO with pull-up */
 	byte = pm2_ioread(0x42);
@@ -420,7 +420,7 @@
 {
 	u8 byte, byte2;
 	u8 cpu_pwm_conf, case_pwm_conf;
-	device_t sm_dev;
+	struct device *sm_dev;
 	struct fan_control cpu_fan_control, case_fan_control;
 	const char *name = NULL;
 
@@ -596,8 +596,8 @@
 	resource_t rbase, rend;
 	u32 base, limit;
 	struct resource *resource;
-	device_t dev;
-	device_t k8_f1 = dev_find_slot(0, PCI_DEVFN(0x18,1));
+	struct device *dev;
+	struct device *k8_f1 = dev_find_slot(0, PCI_DEVFN(0x18,1));
 
 	printk(BIOS_DEBUG,"%s ...\n", __func__);
 
@@ -644,7 +644,7 @@
 
 unsigned int plx_present = 0;
 
-static void update_subsystemid( device_t dev )
+static void update_subsystemid( struct device *dev )
 {
 	int i;
 
@@ -656,7 +656,7 @@
 	}
 	printk(BIOS_INFO, "%s [%x/%x]\n", dev_name(dev), dev->subsystem_vendor, dev->subsystem_device );
 	for( i = 0; slot[i].bus < 255; i++) {
-		device_t d;
+		struct device *d;
 		d = dev_find_slot(slot[i].bus,slot[i].devfn);
 		if( d ) {
 			printk(BIOS_DEBUG,"%s subsystem <- %x/%x\n", dev_path(d), dev->subsystem_vendor, dev->subsystem_device);
@@ -665,10 +665,10 @@
 	}
 }
 
-static void detect_hw_variant( device_t dev )
+static void detect_hw_variant( struct device *dev )
 {
 
-	device_t nb_dev =0, dev2 = 0;
+	struct device *nb_dev =0, dev2 = 0;
 	struct southbridge_amd_rs690_config *cfg;
 	u32 lc_state, id = 0;
 
@@ -777,7 +777,7 @@
  * @param dev - the root device
  */
 
-static void mainboard_init(device_t dev)
+static void mainboard_init(struct device *dev)
 {
 #if IS_ENABLED(CONFIG_PCI_OPTION_ROM_RUN_REALMODE)
 	INT15_function_extensions int15_func;
@@ -803,7 +803,7 @@
 * enable the dedicated function in sina board.
 * This function called early than rs690_enable.
 *************************************************/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
 {
 
 	printk(BIOS_INFO, "%s %s[%x/%x] %s\n",
diff --git a/src/mainboard/siemens/sitemp_g1p1/mainboard.h b/src/mainboard/siemens/sitemp_g1p1/mainboard.h
index 33d0a5e..7e15992 100644
--- a/src/mainboard/siemens/sitemp_g1p1/mainboard.h
+++ b/src/mainboard/siemens/sitemp_g1p1/mainboard.h
@@ -1 +1 @@
-void mainboard_inject_dsdt(device_t device);
+void mainboard_inject_dsdt(struct device *device);
diff --git a/src/mainboard/siemens/sitemp_g1p1/mptable.c b/src/mainboard/siemens/sitemp_g1p1/mptable.c
index 832a79e..3515d30 100644
--- a/src/mainboard/siemens/sitemp_g1p1/mptable.c
+++ b/src/mainboard/siemens/sitemp_g1p1/mptable.c
@@ -45,7 +45,7 @@
 	mptable_write_buses(mc, NULL, &isa_bus);
 	/* I/O APICs:   APIC ID Version State   Address */
 	{
-		device_t dev;
+		struct device *dev;
 
 		dev = dev_find_slot(bus_sb600[0], PCI_DEVFN(sbdn_sb600 + 0x14, 0));
 		if (dev) {

-- 
To view, visit https://review.coreboot.org/26097
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: If67ea25a9e1363dde8aefe62b92ee7a61f0458b0
Gerrit-Change-Number: 26097
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/c7ceb8fe/attachment-0001.html>


More information about the coreboot-gerrit mailing list