the following patch was just integrated into master:
commit c0805779c25bb3819eb9d244fdfd7d7ca894516f
Author: Patrick Georgi <patrick.georgi(a)secunet.com>
Date: Fri Nov 4 12:06:06 2011 +0100
libpayload: Implement usb_exit
So far it was empty and never published. It now exists and shuts down
all controllers (esp. EHCI which resets the port routers).
Change-Id: I81e355e8a05778d6397675417b085a094a6f48ee
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
Build-Tested: build bot (Jenkins) at Fri Nov 4 22:01:20 2011, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Nov 4 22:14:17 2011, giving +2
See http://review.coreboot.org/397 for details.
-gerrit
the following patch was just integrated into master:
commit 1e8fe33efe3939a79b8f9236b260a02e3505abee
Author: Patrick Georgi <patrick.georgi(a)secunet.com>
Date: Fri Nov 4 11:57:46 2011 +0100
libpayload: Tell EHCI to re-enable USB1 controllers
EHCI can take over all ports (and then reroute devices to
companion controllers if needs be). We do that, and then never
reset it.
Consequence:
Systems with only USB1 HC drivers (OHCI/UHCI) never see any devices.
Change-Id: If1d91e9142a6618289b0b3f6b56587ec857158e3
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
Build-Tested: build bot (Jenkins) at Fri Nov 4 22:12:18 2011, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Nov 4 21:45:54 2011, giving +2
See http://review.coreboot.org/396 for details.
-gerrit
the following patch was just integrated into master:
commit 7abb7c9925a2daab92538796aaf64e84e5a47114
Author: Patrick Georgi <patrick.georgi(a)secunet.com>
Date: Fri Nov 4 11:50:03 2011 +0100
libpayload: Drop usb_fatal()
We have fatal(), which is just as good.
Coccinelle script:
@@
expression E;
@@
-usb_fatal(E)
+fatal(E)
Change-Id: Iabecbcc7d068cc0f82687bf51d89c2626642cd86
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
Build-Tested: build bot (Jenkins) at Fri Nov 4 21:50:59 2011, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Nov 4 21:45:26 2011, giving +2
See http://review.coreboot.org/395 for details.
-gerrit
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/396
-gerrit
commit 1e8fe33efe3939a79b8f9236b260a02e3505abee
Author: Patrick Georgi <patrick.georgi(a)secunet.com>
Date: Fri Nov 4 11:57:46 2011 +0100
libpayload: Tell EHCI to re-enable USB1 controllers
EHCI can take over all ports (and then reroute devices to
companion controllers if needs be). We do that, and then never
reset it.
Consequence:
Systems with only USB1 HC drivers (OHCI/UHCI) never see any devices.
Change-Id: If1d91e9142a6618289b0b3f6b56587ec857158e3
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
---
payloads/libpayload/drivers/usb/ehci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index b1ccb0b..71fbd7a 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -56,7 +56,7 @@ static void ehci_reset (hci_t *controller)
static void ehci_shutdown (hci_t *controller)
{
-
+ EHCI_INST(controller)->operation->configflag = 0;
}
enum { EHCI_OUT=0, EHCI_IN=1, EHCI_SETUP=2 };
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/397
-gerrit
commit c0805779c25bb3819eb9d244fdfd7d7ca894516f
Author: Patrick Georgi <patrick.georgi(a)secunet.com>
Date: Fri Nov 4 12:06:06 2011 +0100
libpayload: Implement usb_exit
So far it was empty and never published. It now exists and shuts down
all controllers (esp. EHCI which resets the port routers).
Change-Id: I81e355e8a05778d6397675417b085a094a6f48ee
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
---
payloads/libpayload/drivers/usb/usb.c | 16 ++++++++++++++++
payloads/libpayload/drivers/usb/usbinit.c | 5 -----
payloads/libpayload/include/libpayload.h | 1 +
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index 4f42332..995b4c2 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -68,6 +68,22 @@ detach_controller (hci_t *controller)
}
/**
+ * Shut down all controllers
+ */
+int
+usb_exit (void)
+{
+ if (usb_hcs == 0)
+ return 0;
+ hci_t *controller = usb_hcs;
+ while (controller != 0) {
+ controller->shutdown(controller);
+ controller = controller->next;
+ }
+ return 0;
+}
+
+/**
* Polls all hubs on all USB controllers, to find out about device changes
*/
void
diff --git a/payloads/libpayload/drivers/usb/usbinit.c b/payloads/libpayload/drivers/usb/usbinit.c
index 3964197..8499b82 100644
--- a/payloads/libpayload/drivers/usb/usbinit.c
+++ b/payloads/libpayload/drivers/usb/usbinit.c
@@ -139,8 +139,3 @@ usb_initialize (void)
return 0;
}
-int
-usb_exit (void)
-{
- return 0;
-}
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 80eaaa4..0e892c8 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -123,6 +123,7 @@ void rtc_read_clock(struct tm *tm);
* @{
*/
int usb_initialize(void);
+int usb_exit (void);
int usbhid_havechar(void);
int usbhid_getchar(void);
/** @} */