[coreboot] [commit] r5826 - trunk/src/lib
repository service
svn at coreboot.org
Thu Sep 23 01:42:33 CEST 2010
Author: uwe
Date: Thu Sep 23 01:42:32 2010
New Revision: 5826
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5826
Log:
Fix a compiler warning in src/lib/usbdebug.c (trivial).
The 'delay' variable shadows the global 'delay()' function, yielding
this compiler warning/error:
src/pc80/../lib/usbdebug.c: In function `ehci_reset_port':
src/pc80/../lib/usbdebug.c:281: error: declaration of `delay' shadows a global declaration
src/lib/delay.c:9: error: shadowed declaration is here
This fixes the issue by renaming the 'delay' variable to 'delay_ms'.
Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
Modified:
trunk/src/lib/usbdebug.c
Modified: trunk/src/lib/usbdebug.c
==============================================================================
--- trunk/src/lib/usbdebug.c Thu Sep 23 00:46:47 2010 (r5825)
+++ trunk/src/lib/usbdebug.c Thu Sep 23 01:42:32 2010 (r5826)
@@ -278,7 +278,7 @@
static int ehci_reset_port(struct ehci_regs *ehci_regs, int port)
{
unsigned portsc;
- unsigned delay_time, delay;
+ unsigned delay_time, delay_ms;
int loop;
/* Reset the usb debug port */
@@ -287,10 +287,10 @@
portsc |= PORT_RESET;
write32((unsigned long)&ehci_regs->port_status[port - 1], portsc);
- delay = HUB_ROOT_RESET_TIME;
+ delay_ms = HUB_ROOT_RESET_TIME;
for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT;
- delay_time += delay) {
- dbgp_mdelay(delay);
+ delay_time += delay_ms) {
+ dbgp_mdelay(delay_ms);
portsc = read32((unsigned long)&ehci_regs->port_status[port - 1]);
if (portsc & PORT_RESET) {
@@ -299,9 +299,9 @@
write32((unsigned long)&ehci_regs->port_status[port - 1],
portsc & ~(PORT_RWC_BITS | PORT_RESET));
do {
- dbgp_mdelay(delay);
+ dbgp_mdelay(delay_ms);
portsc = read32((unsigned long)&ehci_regs->port_status[port - 1]);
- delay_time += delay;
+ delay_time += delay_ms;
} while ((portsc & PORT_RESET) && (--loop > 0));
if (!loop) {
printk(BIOS_DEBUG, "ehci_reset_port forced done");
More information about the coreboot
mailing list