[coreboot-gerrit] Change in coreboot[master]: northbridge/via/vx900: transition away from device_t

Patrick Georgi (Code Review) gerrit at coreboot.org
Thu Mar 23 18:52:02 CET 2017


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/17317 )

Change subject: northbridge/via/vx900: transition away from device_t
......................................................................


northbridge/via/vx900: transition away from device_t

Replace the use of the old device_t definition inside
northbridge/via/vx900.

Change-Id: I04292a6b698a42a5c582eddcef7cf5a235e1a464
Signed-off-by: Antonello Dettori <dev at dettori.io>
Reviewed-on: https://review.coreboot.org/17317
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi at google.com>
---
M src/northbridge/via/vx900/early_smbus.c
M src/northbridge/via/vx900/raminit_ddr3.c
M src/northbridge/via/vx900/vx900.h
3 files changed, 13 insertions(+), 2 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Patrick Georgi: Looks good to me, approved



diff --git a/src/northbridge/via/vx900/early_smbus.c b/src/northbridge/via/vx900/early_smbus.c
index 93a9254..0cf7427 100644
--- a/src/northbridge/via/vx900/early_smbus.c
+++ b/src/northbridge/via/vx900/early_smbus.c
@@ -76,7 +76,7 @@
 
 void enable_smbus(void)
 {
-	device_t dev;
+	pci_devfn_t dev;
 	u8 reg8;
 	u32 smbus_dev = (u32) SMBUS_IO_BASE;
 
diff --git a/src/northbridge/via/vx900/raminit_ddr3.c b/src/northbridge/via/vx900/raminit_ddr3.c
index 2de7734..56ec5fd 100644
--- a/src/northbridge/via/vx900/raminit_ddr3.c
+++ b/src/northbridge/via/vx900/raminit_ddr3.c
@@ -1627,7 +1627,7 @@
 	dimm_info dimm_prop;
 	ramctr_timing ctrl_prop;
 	rank_layout ranks;
-	device_t mcu;
+	pci_devfn_t mcu;
 
 	if (!ram_check_noprint_nodie(1 << 20, 1 << 20)) {
 		printram("RAM is already initialized. Skipping init\n");
diff --git a/src/northbridge/via/vx900/vx900.h b/src/northbridge/via/vx900/vx900.h
index 2590ab2..12e5733 100644
--- a/src/northbridge/via/vx900/vx900.h
+++ b/src/northbridge/via/vx900/vx900.h
@@ -41,6 +41,16 @@
 
 /* We use these throughout the code. They really belong in a generic part of
  * coreboot, but until bureaucracy gets them there, we still need them  */
+
+#ifdef __SIMPLE_DEVICE__
+void dump_pci_device(pci_devfn_t dev);
+void pci_mod_config8(pci_devfn_t dev, unsigned int where,
+		     uint8_t clr_mask, uint8_t set_mask);
+void pci_mod_config16(pci_devfn_t dev, unsigned int where,
+		      uint16_t clr_mask, uint16_t set_mask);
+void pci_mod_config32(pci_devfn_t dev, unsigned int where,
+		      uint32_t clr_mask, uint32_t set_mask);
+#else
 void dump_pci_device(device_t dev);
 void pci_mod_config8(device_t dev, unsigned int where,
 		     uint8_t clr_mask, uint8_t set_mask);
@@ -48,5 +58,6 @@
 		      uint16_t clr_mask, uint16_t set_mask);
 void pci_mod_config32(device_t dev, unsigned int where,
 		      uint32_t clr_mask, uint32_t set_mask);
+#endif
 
 #endif				/* __VX900_H */

-- 
To view, visit https://review.coreboot.org/17317
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I04292a6b698a42a5c582eddcef7cf5a235e1a464
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Antonello Dettori <dev at dettori.io>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list