libpayload: Fix random warnings
dump_td() is orphaned but looks useful => commented out. The delay identifier shadowed the global one => renamed to total_delay. Change-Id: I4f3766a07db9194b2552ebf9302bd7ef8a66371f Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/1895 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
4f83d1b0c6
commit
e8a71d34cd
|
@ -205,6 +205,7 @@ ohci_stop (hci_t *controller)
|
||||||
// TODO: turn off all operation of OHCI
|
// TODO: turn off all operation of OHCI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void
|
static void
|
||||||
dump_td(td_t *cur, int level)
|
dump_td(td_t *cur, int level)
|
||||||
{
|
{
|
||||||
|
@ -216,6 +217,7 @@ dump_td(td_t *cur, int level)
|
||||||
usb_debug("%s toggle: %x\n", spc, !!(cur->config & TD_TOGGLE_DATA1));
|
usb_debug("%s toggle: %x\n", spc, !!(cur->config & TD_TOGGLE_DATA1));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
wait_for_ed(usbdev_t *dev, ed_t *head, int pages)
|
wait_for_ed(usbdev_t *dev, ed_t *head, int pages)
|
||||||
|
|
|
@ -48,8 +48,8 @@ ohci_rh_enable_port (usbdev_t *dev, int port)
|
||||||
* After reset, the port will be enabled automatically (ohci spec
|
* After reset, the port will be enabled automatically (ohci spec
|
||||||
* 7.4.4).
|
* 7.4.4).
|
||||||
*/
|
*/
|
||||||
int delay = 100; /* 100 * 500us == 50ms */
|
int total_delay = 100; /* 100 * 500us == 50ms */
|
||||||
while (delay > 0) {
|
while (total_delay > 0) {
|
||||||
if (!(OHCI_INST(dev->controller)->opreg->HcRhPortStatus[port]
|
if (!(OHCI_INST(dev->controller)->opreg->HcRhPortStatus[port]
|
||||||
& CurrentConnectStatus))
|
& CurrentConnectStatus))
|
||||||
return;
|
return;
|
||||||
|
@ -61,7 +61,7 @@ ohci_rh_enable_port (usbdev_t *dev, int port)
|
||||||
while ((OHCI_INST (dev->controller)->opreg->HcRhPortStatus[port]
|
while ((OHCI_INST (dev->controller)->opreg->HcRhPortStatus[port]
|
||||||
& PortResetStatus)
|
& PortResetStatus)
|
||||||
&& timeout--) {
|
&& timeout--) {
|
||||||
udelay(500); delay--;
|
udelay(500); total_delay--;
|
||||||
}
|
}
|
||||||
if (OHCI_INST (dev->controller)->opreg->HcRhPortStatus[port]
|
if (OHCI_INST (dev->controller)->opreg->HcRhPortStatus[port]
|
||||||
& PortResetStatus) {
|
& PortResetStatus) {
|
||||||
|
|
Loading…
Reference in New Issue