summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device/device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/device/device.c b/src/device/device.c
index e0c8bf0523..a971270eba 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -43,6 +43,7 @@
#if CONFIG_ARCH_X86
#include <arch/ebda.h>
#endif
+#include <timer.h>
/** Linked list of ALL devices */
struct device *all_devices = &dev_root;
@@ -1103,6 +1104,12 @@ static void init_dev(struct device *dev)
return;
if (!dev->initialized && dev->ops && dev->ops->init) {
+#if CONFIG_HAVE_MONOTONIC_TIMER
+ struct mono_time start_time;
+ struct rela_time dev_init_time;
+
+ timer_monotonic_get(&start_time);
+#endif
if (dev->path.type == DEVICE_PATH_I2C) {
printk(BIOS_DEBUG, "smbus: %s[%d]->",
dev_path(dev->bus->dev), dev->bus->link_num);
@@ -1111,6 +1118,11 @@ static void init_dev(struct device *dev)
printk(BIOS_DEBUG, "%s init\n", dev_path(dev));
dev->initialized = 1;
dev->ops->init(dev);
+#if CONFIG_HAVE_MONOTONIC_TIMER
+ dev_init_time = current_time_from(&start_time);
+ printk(BIOS_DEBUG, "%s init %ld usecs\n", dev_path(dev),
+ rela_time_in_microseconds(&dev_init_time));
+#endif
}
}