reduced debug printout to a minimum

This commit is contained in:
Markus Fröschle
2013-12-11 20:48:23 +00:00
parent 4337d25e4c
commit 04d2dccfde
4 changed files with 12 additions and 7 deletions

View File

@@ -22,6 +22,7 @@
#ifndef USB_EHCI_H
#define USB_EHCI_H
#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 5
#if !defined(CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS)
#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
#endif

View File

@@ -556,7 +556,7 @@ static int ehci_submit_root(struct usb_device *dev, uint32_t pipe, void *buffer,
uint32_t *status_reg;
if (swpw(req->index) > CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS)
{
err("The request port(%d) is not configured\r\n", swpw(req->index) - 1);
err("the requested port(%d) is not configured\r\n", swpw(req->index) - 1);
return -1;
}
status_reg = (uint32_t *)&gehci.hcor->or_portsc[swpw(req->index) - 1];

View File

@@ -40,7 +40,11 @@
#define debug_printf(format, arg...) do { ; } while (0)
#endif /* DEBUG_PCI */
#if MACHINE_FIREBEE
#define pci_config_wait() wait(20000); /* FireBee USB not properly detected otherwise */
#elif MACHINE_M5484LITE
#define pci_config_wait() do { ; } while (0)
#endif
/*
* PCI device class descriptions displayed during PCI bus scan

View File

@@ -56,7 +56,7 @@
extern int usb_stor_curr_dev;
extern uint32_t usb_1st_disk_drive;
#define USB_DEBUG
//#define USB_DEBUG
#ifdef USB_DEBUG
#define debug_printf(fmt, args...) xprintf(fmt , ##args)
@@ -180,7 +180,7 @@ int usb_init(int32_t handle, const struct pci_device_id *ent)
usb_started = 0;
return -1; /* out of memoy */
}
debug_printf("Scanning bus for devices... ");
xprintf("Scanning bus for devices... ");
controller_priv[bus_index] = (struct hci *)priv;
controller_priv[bus_index]->usbnum = bus_index;
usb_scan_devices(priv);
@@ -1079,13 +1079,13 @@ void usb_scan_devices(void *priv)
dev = usb_alloc_new_device(bus_index, priv);
if (usb_new_device(dev))
{
debug_printf("No USB Device found\r\n");
xprintf("No USB Device found\r\n");
if (dev != NULL)
dev_index[bus_index]--;
}
else
{
debug_printf("%d USB Device(s) found\r\n", dev_index[bus_index]);
xprintf("%d USB Device(s) found\r\n", dev_index[bus_index]);
}
{
/* insert "driver" if possible */
@@ -1100,7 +1100,7 @@ void usb_scan_devices(void *priv)
else
debug_printf("USB HID mouse driver installed\r\n");
}
debug_printf("Scan end\r\n");
xprintf("Scan end\r\n");
}
/****************************************************************************
@@ -1108,7 +1108,7 @@ void usb_scan_devices(void *priv)
* Probes device for being a hub and configurate it
*/
#define USB_HUB_DEBUG
//#define USB_HUB_DEBUG
#ifdef USB_HUB_DEBUG
#define dbg_hub(fmt, args...) xprintf(fmt , ##args)