X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Fusb.c;h=4df01eabe513163eeb80475f9495b72ea504ac80;hb=5e3dca577b7c1bf58bd2b48449b18b7e7dcd8e04;hp=b1b7aec621a013b2ce4237038bd30bf2ee4d5d28;hpb=7455af41d19d5e0194e23f3b06f1bf64e3430d62;p=oweals%2Fu-boot.git diff --git a/common/usb.c b/common/usb.c index b1b7aec621..4df01eabe5 100644 --- a/common/usb.c +++ b/common/usb.c @@ -49,11 +49,11 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_USB) +#if defined(CONFIG_CMD_USB) #include #ifdef CONFIG_4xx -#include <405gp_pci.h> +#include #endif #undef USB_DEBUG @@ -72,6 +72,8 @@ static int running; static int asynch_allowed; static struct devrequest setup_packet; +char usb_started; /* flag for the started/stopped USB status */ + /********************************************************************** * some forward declerations... */ @@ -110,10 +112,12 @@ int usb_init(void) printf("scanning bus for devices... "); running=1; usb_scan_devices(); + usb_started = 1; return 0; } else { printf("Error, couldn't init Lowlevel part\n"); + usb_started = 0; return -1; } } @@ -124,6 +128,7 @@ int usb_init(void) int usb_stop(void) { asynch_allowed=1; + usb_started = 0; usb_hub_reset(); return usb_lowlevel_stop(); } @@ -1242,6 +1247,6 @@ int usb_hub_probe(struct usb_device *dev, int ifnum) return ret; } -#endif /* (CONFIG_COMMANDS & CFG_CMD_USB) */ +#endif /* EOF */