From 6e711c6a97a9d4122615018121d0d2a37b642ed1 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Mon, 12 Nov 2012 16:20:32 +0100 Subject: 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 Reviewed-on: http://review.coreboot.org/1851 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- payloads/libpayload/drivers/usb/xhci.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'payloads/libpayload/drivers/usb/xhci.c') diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c index d5ee134041..2a8bcb448e 100644 --- a/payloads/libpayload/drivers/usb/xhci.c +++ b/payloads/libpayload/drivers/usb/xhci.c @@ -49,6 +49,11 @@ xhci_reset (hci_t *controller) { } +static void +xhci_reinit (hci_t *controller) +{ +} + hci_t * xhci_init (pcidev_t addr) { @@ -68,6 +73,7 @@ xhci_init (pcidev_t addr) controller->start = xhci_start; controller->stop = xhci_stop; controller->reset = xhci_reset; + controller->init = xhci_reinit; controller->shutdown = xhci_shutdown; controller->bulk = xhci_bulk; controller->control = xhci_control; -- cgit v1.2.3