summaryrefslogtreecommitdiffstats
path: root/src/device/device_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 9beb2ce8e2e8..c5e03f20795f 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -135,6 +135,9 @@ u32 dev_path_encode(const struct device *dev)
case DEVICE_PATH_GPIO:
ret |= dev->path.gpio.id;
break;
+ case DEVICE_PATH_MDIO:
+ ret |= dev->path.mdio.addr;
+ break;
case DEVICE_PATH_NONE:
case DEVICE_PATH_MMIO: /* don't care */
default:
@@ -223,6 +226,9 @@ const char *dev_path(const struct device *dev)
case DEVICE_PATH_GPIO:
snprintf(buffer, sizeof(buffer), "GPIO: %d", dev->path.gpio.id);
break;
+ case DEVICE_PATH_MDIO:
+ snprintf(buffer, sizeof(buffer), "MDIO: %02x", dev->path.mdio.addr);
+ break;
default:
printk(BIOS_ERR, "Unknown device path type: %d\n",
dev->path.type);