summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/device_const.c6
-rw-r--r--src/device/device_util.c8
-rw-r--r--src/include/device/path.h14
3 files changed, 28 insertions, 0 deletions
diff --git a/src/device/device_const.c b/src/device/device_const.c
index 65ec15729a..3ad00f8838 100644
--- a/src/device/device_const.c
+++ b/src/device/device_const.c
@@ -156,6 +156,12 @@ static int path_eq(const struct device_path *path1,
case DEVICE_PATH_MMIO:
equal = (path1->mmio.addr == path2->mmio.addr);
break;
+ case DEVICE_PATH_ESPI:
+ equal = (path1->espi.addr == path2->espi.addr);
+ break;
+ case DEVICE_PATH_LPC:
+ equal = (path1->lpc.addr == path2->lpc.addr);
+ break;
default:
printk(BIOS_ERR, "Unknown device type: %d\n", path1->type);
break;
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 5aa53c1daf..88608597f2 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -215,6 +215,14 @@ const char *dev_path(const struct device *dev)
snprintf(buffer, sizeof(buffer), "MMIO: %08lx",
dev->path.mmio.addr);
break;
+ case DEVICE_PATH_ESPI:
+ snprintf(buffer, sizeof(buffer), "ESPI: %08lx",
+ dev->path.espi.addr);
+ break;
+ case DEVICE_PATH_LPC:
+ snprintf(buffer, sizeof(buffer), "LPC: %08lx",
+ dev->path.lpc.addr);
+ break;
default:
printk(BIOS_ERR, "Unknown device path type: %d\n",
dev->path.type);
diff --git a/src/include/device/path.h b/src/include/device/path.h
index 6736bede69..964b4725fc 100644
--- a/src/include/device/path.h
+++ b/src/include/device/path.h
@@ -19,6 +19,8 @@ enum device_path_type {
DEVICE_PATH_SPI,
DEVICE_PATH_USB,
DEVICE_PATH_MMIO,
+ DEVICE_PATH_ESPI,
+ DEVICE_PATH_LPC,
/*
* When adding path types to this table, please also update the
@@ -42,6 +44,8 @@ enum device_path_type {
"DEVICE_PATH_SPI", \
"DEVICE_PATH_USB", \
"DEVICE_PATH_MMIO", \
+ "DEVICE_PATH_ESPI", \
+ "DEVICE_PATH_LPC", \
}
struct domain_path {
@@ -104,6 +108,14 @@ struct mmio_path {
uintptr_t addr;
};
+struct espi_path {
+ uintptr_t addr;
+};
+
+struct lpc_path {
+ uintptr_t addr;
+};
+
struct device_path {
enum device_path_type type;
union {
@@ -120,6 +132,8 @@ struct device_path {
struct spi_path spi;
struct usb_path usb;
struct mmio_path mmio;
+ struct espi_path espi;
+ struct lpc_path lpc;
};
};