[coreboot-gerrit] New patch to review for coreboot: 572aaa1 devicetree: Drop dummy root_dev ops

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Feb 27 17:32:40 CET 2015


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8532

-gerrit

commit 572aaa100f7d1de2c8cb918c18c7f8d9eefc544a
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Fri Feb 6 09:15:52 2015 +0200

    devicetree: Drop dummy root_dev ops
    
    This is just dead code.
    
    Should we decide that we want some of these calls made, they would
    be implemented in the mainboard context.
    
    Change-Id: I1f097c8da722f3afab9aa1c80b96590c7ca457d5
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/device/root_device.c    | 40 ++++------------------------------------
 src/include/device/device.h |  2 --
 2 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/src/device/root_device.c b/src/device/root_device.c
index 49fa711..d0a3664 100644
--- a/src/device/root_device.c
+++ b/src/device/root_device.c
@@ -30,30 +30,6 @@
 const char mainboard_name[] = CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_NUMBER;
 
 /**
- * Read the resources for the root device, that encompass the resources for
- * the entire system.
- *
- * @param root Pointer to the device structure for the system root device.
- */
-static void root_dev_read_resources(device_t root)
-{
-	printk(BIOS_ERR, "%s should never be called.\n", __func__);
-}
-
-/**
- * Write the resources for every device.
- *
- * Write the resources for the root device, and every device under it which
- * are all of the devices.
- *
- * @param root Pointer to the device structure for the system root device.
- */
-static void root_dev_set_resources(device_t root)
-{
-	printk(BIOS_ERR, "%s should never be called.\n", __func__);
-}
-
-/**
  * Scan devices on static buses.
  *
  * The enumeration of certain buses is purely static. The existence of
@@ -121,10 +97,6 @@ unsigned int scan_static_bus(device_t bus, unsigned int max)
 	return max;
 }
 
-static void root_dev_enable_resources(device_t dev)
-{
-}
-
 /**
  * Scan root bus for generic systems.
  *
@@ -139,10 +111,6 @@ static unsigned int root_dev_scan_bus(device_t root, unsigned int max)
 	return scan_static_bus(root, max);
 }
 
-static void root_dev_init(device_t root)
-{
-}
-
 static void root_dev_reset(struct bus *bus)
 {
 	printk(BIOS_INFO, "Resetting board...\n");
@@ -157,10 +125,10 @@ static void root_dev_reset(struct bus *bus)
  * of a motherboard can override this if you want non-default behavior.
  */
 struct device_operations default_dev_ops_root = {
-	.read_resources   = root_dev_read_resources,
-	.set_resources    = root_dev_set_resources,
-	.enable_resources = root_dev_enable_resources,
-	.init             = root_dev_init,
+	.read_resources   = DEVICE_NOOP,
+	.set_resources    = DEVICE_NOOP,
+	.enable_resources = DEVICE_NOOP,
+	.init             = DEVICE_NOOP,
 	.scan_bus         = root_dev_scan_bus,
 	.reset_bus        = root_dev_reset,
 };
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 30226bf..c1c9fdb 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -173,8 +173,6 @@ void dev_finalize_chips(void);
 int reset_bus(struct bus *bus);
 unsigned int scan_bus(struct device *bus, unsigned int _max);
 void assign_resources(struct bus *bus);
-void enumerate_static_device(void);
-void enumerate_static_devices(void);
 const char *dev_name(device_t dev);
 const char *dev_path(device_t dev);
 u32 dev_path_encode(device_t dev);



More information about the coreboot-gerrit mailing list