[coreboot-gerrit] Change in coreboot[master]: nb/via/cn700: Get rid of device_t

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Sun May 20 10:54:07 CEST 2018


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


Change subject: nb/via/cn700: Get rid of device_t
......................................................................

nb/via/cn700: Get rid of device_t

Use of device_t has been abandoned in ramstage.

Change-Id: Ic58bb58b88ffc309472ee9ffc8a9c8619659811b
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/northbridge/via/cn700/agp.c
M src/northbridge/via/cn700/northbridge.c
M src/northbridge/via/cn700/northbridge.h
M src/northbridge/via/cn700/vga.c
4 files changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/26423/1

diff --git a/src/northbridge/via/cn700/agp.c b/src/northbridge/via/cn700/agp.c
index 55e5fe3..d035573 100644
--- a/src/northbridge/via/cn700/agp.c
+++ b/src/northbridge/via/cn700/agp.c
@@ -24,7 +24,7 @@
 #include "cn700.h"
 
 /* This is the main AGP device, and only one used when configured for AGP 2.0 */
-static void agp_init(device_t dev)
+static void agp_init(struct device *dev)
 {
 	u32 reg32;
 
@@ -117,7 +117,7 @@
  * This is the AGP 3.0 "bridge" @Bus 0 Device 1 Func 0. When using AGP 3.0, the
  * config in this device takes presidence. We configure both just to be safe.
  */
-static void agp_bridge_init(device_t dev)
+static void agp_bridge_init(struct device *dev)
 {
 	printk(BIOS_DEBUG, "Setting up AGP bridge device\n");
 
@@ -152,7 +152,7 @@
 	pci_write_config8(dev, 0x45, 0x72);
 }
 
-static void agp_bridge_read_resources(device_t dev)
+static void agp_bridge_read_resources(struct device *dev)
 {
 	struct resource *resource;
 
diff --git a/src/northbridge/via/cn700/northbridge.c b/src/northbridge/via/cn700/northbridge.c
index f745a0e..78bb6f9 100644
--- a/src/northbridge/via/cn700/northbridge.c
+++ b/src/northbridge/via/cn700/northbridge.c
@@ -30,9 +30,9 @@
 #include "northbridge.h"
 #include "cn700.h"
 
-static void memctrl_init(device_t dev)
+static void memctrl_init(struct device *dev)
 {
-	device_t vlink_dev;
+	struct device *vlink_dev;
 	u16 reg16;
 	u8 ranks, pagec, paged, pagee, pagef, shadowreg;
 
@@ -93,11 +93,11 @@
 	.device = PCI_DEVICE_ID_VIA_CN700_MEMCTRL,
 };
 
-static void pci_domain_set_resources(device_t dev)
+static void pci_domain_set_resources(struct device *dev)
 {
 	/* The order is important to find the correct RAM size. */
 	static const u8 ramregs[] = { 0x43, 0x42, 0x41, 0x40 };
-	device_t mc_dev;
+	struct device *mc_dev;
 	u32 pci_tolm;
 
 	printk(BIOS_SPEW, "Entering cn700 pci_domain_set_resources.\n");
@@ -151,7 +151,7 @@
 	.scan_bus         = pci_domain_scan_bus,
 };
 
-static void cpu_bus_init(device_t dev)
+static void cpu_bus_init(struct device *dev)
 {
 	initialize_cpus(dev->link_list);
 }
diff --git a/src/northbridge/via/cn700/northbridge.h b/src/northbridge/via/cn700/northbridge.h
index 5aaada9..1780b4d 100644
--- a/src/northbridge/via/cn700/northbridge.h
+++ b/src/northbridge/via/cn700/northbridge.h
@@ -17,6 +17,6 @@
 #ifndef NORTHBRIDGE_VIA_CN700_H
 #define NORTHBRIDGE_VIA_CN700_H
 
-extern unsigned int cn700_scan_root_bus(device_t root, unsigned int max);
+extern unsigned int cn700_scan_root_bus(struct device *root, unsigned int max);
 
 #endif /* NORTHBRIDGE_VIA_CN700_H */
diff --git a/src/northbridge/via/cn700/vga.c b/src/northbridge/via/cn700/vga.c
index 4925f2b..493159a 100644
--- a/src/northbridge/via/cn700/vga.c
+++ b/src/northbridge/via/cn700/vga.c
@@ -72,7 +72,7 @@
 	return res;
 }
 
-static void vga_init(device_t dev)
+static void vga_init(struct device *dev)
 {
 	u8 reg8;
 

-- 
To view, visit https://review.coreboot.org/26423
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: Ic58bb58b88ffc309472ee9ffc8a9c8619659811b
Gerrit-Change-Number: 26423
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/20180520/fa888481/attachment.html>


More information about the coreboot-gerrit mailing list