diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-11-18 22:38:08 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-11-18 22:38:08 +0000 |
commit | a9e632c2ac29c60872e7e4f9314263b34ce5031d (patch) | |
tree | 2a76647833896d68306553c548a65743c87b417e /src/devices/device_util.c | |
parent | bec8acedf18b4d35f95b4a4c254eb925bd4d53bd (diff) |
- First stab at getting the ppc ports building and working.
- The sandpointx3+altimus has been consolidated into one directory for now.
- Added support for having different versions of the pci access functions
on a per bus basis if needed.
Hopefully I have not broken something inadvertently.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1786 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/device_util.c')
-rw-r--r-- | src/devices/device_util.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/devices/device_util.c b/src/devices/device_util.c index fd8fdcf9b8..6af2d3786f 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -114,9 +114,6 @@ const char *dev_path(device_t dev) case DEVICE_PATH_ROOT: memcpy(buffer, "Root Device", 12); break; - case DEVICE_PATH_DEFAULT_CPU: - memcpy(buffer, "Default CPU", 12); - break; case DEVICE_PATH_PCI: sprintf(buffer, "PCI: %02x:%02x.%01x", dev->bus->secondary, @@ -142,6 +139,12 @@ const char *dev_path(device_t dev) sprintf(buffer, "APIC_CLUSTER: %01x", dev->path.u.apic_cluster.cluster); break; + case DEVICE_PATH_CPU: + sprintf(buffer, "CPU: %02x", dev->path.u.cpu.id); + break; + case DEVICE_PATH_CPU_BUS: + sprintf(buffer, "CPU_BUS: %02x", dev->path.u.cpu_bus.id); + break; default: printk_err("Unknown device path type: %d\n", dev->path.type); break; @@ -160,9 +163,6 @@ int path_eq(struct device_path *path1, struct device_path *path2) case DEVICE_PATH_ROOT: equal = 1; break; - case DEVICE_PATH_DEFAULT_CPU: - equal = 1; - break; case DEVICE_PATH_PCI: equal = (path1->u.pci.devfn == path2->u.pci.devfn); break; @@ -182,6 +182,12 @@ int path_eq(struct device_path *path1, struct device_path *path2) case DEVICE_PATH_APIC_CLUSTER: equal = (path1->u.apic_cluster.cluster == path2->u.apic_cluster.cluster); break; + case DEVICE_PATH_CPU: + equal = (path1->u.cpu.id == path2->u.cpu.id); + break; + case DEVICE_PATH_CPU_BUS: + equal = (path1->u.cpu_bus.id == path2->u.cpu_bus.id); + break; default: printk_err("Uknown device type: %d\n", path1->type); break; |