summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/ehci.c
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2012-11-12 16:20:32 +0100
committerRonald G. Minnich <rminnich@gmail.com>2012-11-14 17:45:16 +0100
commit6e711c6a97a9d4122615018121d0d2a37b642ed1 (patch)
tree745114ff1c6b485f4194818203edea3714cf56ce /payloads/libpayload/drivers/usb/ehci.c
parentaaa212d17d0070850f1dd2195129788acc978a9f (diff)
libpayload: Add init() function to hci_t and rework uhci_reset()
uhci_reset() differs in semantics compared to the other HCI's reset() implementations. uhci_reset() does some initialization work after a controller reset. So move the initialization part to a new function, uhci_reinit(), which get's exported through a new entry in hci_t: hci_t.init(). Warning: This breaks code that relies on the current, special, counterintuitive behaviour of uhci_reset(). If one wants a working host controller after calling hci_t.reset(), he should call hci_t.init() afterwards. Change-Id: Ia7ce80865d12d11157645ce251f77f349f8e3c34 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/1851 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload/drivers/usb/ehci.c')
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 4fcd5ea952..5f65c5353d 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -68,6 +68,10 @@ static void ehci_reset (hci_t *controller)
usb_debug("ehci_reset(): reset failed!\n");
}
+static void ehci_reinit (hci_t *controller)
+{
+}
+
static int ehci_set_periodic_schedule(ehci_t *ehcic, int enable)
{
/* Set periodic schedule status. */
@@ -657,6 +661,7 @@ ehci_init (pcidev_t addr)
controller->start = ehci_start;
controller->stop = ehci_stop;
controller->reset = ehci_reset;
+ controller->init = ehci_reinit;
controller->shutdown = ehci_shutdown;
controller->bulk = ehci_bulk;
controller->control = ehci_control;