summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device_util.c12
-rw-r--r--src/device/root_device.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index b538212a83..56afefdc87 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -222,6 +222,9 @@ u32 dev_path_encode(device_t dev)
case DEVICE_PATH_IOAPIC:
ret |= dev->path.ioapic.ioapic_id;
break;
+ case DEVICE_PATH_GENERIC:
+ ret |= dev->path.generic.subid << 8 | dev->path.generic.id;
+ break;
case DEVICE_PATH_NONE:
default:
break;
@@ -286,6 +289,11 @@ const char *dev_path(device_t dev)
snprintf(buffer, sizeof (buffer),
"CPU_BUS: %02x", dev->path.cpu_bus.id);
break;
+ case DEVICE_PATH_GENERIC:
+ snprintf(buffer, sizeof (buffer),
+ "GENERIC: %d.%d", dev->path.generic.id,
+ dev->path.generic.subid);
+ break;
default:
printk(BIOS_ERR, "Unknown device path type: %d\n",
dev->path.type);
@@ -353,6 +361,10 @@ int path_eq(struct device_path *path1, struct device_path *path2)
case DEVICE_PATH_CPU_BUS:
equal = (path1->cpu_bus.id == path2->cpu_bus.id);
break;
+ case DEVICE_PATH_GENERIC:
+ equal = (path1->generic.id == path2->generic.id) &&
+ (path1->generic.subid == path2->generic.subid);
+ break;
default:
printk(BIOS_ERR, "Unknown device type: %d\n", path1->type);
break;
diff --git a/src/device/root_device.c b/src/device/root_device.c
index 6b961005f9..7ff10ae844 100644
--- a/src/device/root_device.c
+++ b/src/device/root_device.c
@@ -43,7 +43,7 @@ const char mainboard_name[] = CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_
* @param bus Pointer to the device to which the static buses are attached to.
*/
-static void scan_static_bus(device_t bus)
+void scan_static_bus(device_t bus)
{
device_t child;
struct bus *link;