diff options
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/device_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 1a0a60fdb3..e31ade56c0 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -250,6 +250,9 @@ u32 dev_path_encode(device_t dev) case DEVICE_PATH_GENERIC: ret |= dev->path.generic.subid << 8 | dev->path.generic.id; break; + case DEVICE_PATH_SPI: + ret |= dev->path.spi.cs; + break; case DEVICE_PATH_NONE: default: break; @@ -319,6 +322,10 @@ const char *dev_path(device_t dev) "GENERIC: %d.%d", dev->path.generic.id, dev->path.generic.subid); break; + case DEVICE_PATH_SPI: + snprintf(buffer, sizeof (buffer), "SPI: %02x", + dev->path.spi.cs); + break; default: printk(BIOS_ERR, "Unknown device path type: %d\n", dev->path.type); @@ -390,6 +397,9 @@ int path_eq(struct device_path *path1, struct device_path *path2) equal = (path1->generic.id == path2->generic.id) && (path1->generic.subid == path2->generic.subid); break; + case DEVICE_PATH_SPI: + equal = (path1->spi.cs == path2->spi.cs); + break; default: printk(BIOS_ERR, "Unknown device type: %d\n", path1->type); break; |