diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2012-10-09 12:52:05 +0200 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-14 17:39:03 +0100 |
commit | 45b94bc15fe14685c42d3175cdf364e49606ce54 (patch) | |
tree | 326869dbaf38ca4bf19966bbe4b83da3111aeb05 | |
parent | f6659cac3b764e8a2f4ced7b7058240f06734a20 (diff) | |
download | coreboot-45b94bc15fe14685c42d3175cdf364e49606ce54.tar.xz |
libpayload: Export device count in storage interface
FILO can use this as offset to enumerate AHCI and its own IDE
devices together.
Change-Id: I57380e7bd1df6db5c882427e9a34d068f4348fb2
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1846
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r-- | payloads/libpayload/drivers/storage/storage.c | 5 | ||||
-rw-r--r-- | payloads/libpayload/include/storage/storage.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/storage/storage.c b/payloads/libpayload/drivers/storage/storage.c index 3e9c375201..f623077733 100644 --- a/payloads/libpayload/drivers/storage/storage.c +++ b/payloads/libpayload/drivers/storage/storage.c @@ -57,6 +57,11 @@ int storage_attach_device(storage_dev_t *const dev) return 0; } +int storage_device_count(void) +{ + return dev_count; +} + /** * Probe for drive with given number * diff --git a/payloads/libpayload/include/storage/storage.h b/payloads/libpayload/include/storage/storage.h index 3958c4b3c6..ef61cd287d 100644 --- a/payloads/libpayload/include/storage/storage.h +++ b/payloads/libpayload/include/storage/storage.h @@ -68,6 +68,7 @@ typedef struct storage_dev { void (*detach_device)(struct storage_dev *); } storage_dev_t; +int storage_device_count(void); int storage_attach_device(storage_dev_t *dev); |