reformatted, added diagnostics, defined swapped access

This commit is contained in:
Markus Fröschle
2013-11-03 18:07:54 +00:00
parent 70d2a312eb
commit a2f88ebc77
3 changed files with 133 additions and 120 deletions

View File

@@ -163,8 +163,11 @@ static struct ehci {
const char *slot_name;
} gehci;
#define DEBUG
#define SHOW_INFO
#ifdef DEBUG
#define debug(format, arg...) board_printf("DEBUG: " format, ## arg)
#define debug(format, arg...) xprintf("DEBUG: " format, ## arg)
#else
#define debug(format, arg...) do {} while (0)
#endif /* DEBUG */

View File

@@ -68,6 +68,8 @@
/*
* e.g. PCI controllers need this
*/
#define CONFIG_SYS_OHCI_SWAP_REG_ACCES
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
#define readl(a) swpl(*((volatile uint32_t *)(a)))
#define writel(a, b) (*((volatile uint32_t *)(b)) = swpl((volatile uint32_t)a))
@@ -108,7 +110,15 @@ struct pci_device_id ohci_usb_pci_table[] =
0
}, /* Philips 1561 PCI OHCI module ids */
/* Please add supported PCI OHCI controller ids here */
{ 0, 0, 0, 0, 0, 0, 0 }
{
0,
0,
0,
0,
0,
0,
0
}
};
#ifdef DEBUG
@@ -134,7 +144,8 @@ static inline uint32_t roothub_portstatus(ohci_t *ohci, int i) { return readl(&o
static void flush_data_cache(ohci_t *ohci);
static int hc_interrupt(ohci_t *ohci);
static void td_submit_job(ohci_t *ohci, struct usb_device *dev, uint32_t pipe,
void *buffer, int transfer_len, struct devrequest *setup, urb_priv_t *urb, int interval);
void *buffer, int transfer_len, struct devrequest *setup,
urb_priv_t *urb, int interval);
/*-------------------------------------------------------------------------*
* URB support functions

View File

@@ -248,7 +248,6 @@ int usb_mem_init(void)
#ifdef USE_RADEON_MEMORY
usb_buffer = (void *)offscren_reserved();
if (usb_buffer == NULL)
#else
#endif
memset(usb_buffer, 0, USB_BUFFER_SIZE);