reformatted, added diagnostics, defined swapped access
This commit is contained in:
@@ -163,8 +163,11 @@ static struct ehci {
|
|||||||
const char *slot_name;
|
const char *slot_name;
|
||||||
} gehci;
|
} gehci;
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
#define SHOW_INFO
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define debug(format, arg...) board_printf("DEBUG: " format, ## arg)
|
#define debug(format, arg...) xprintf("DEBUG: " format, ## arg)
|
||||||
#else
|
#else
|
||||||
#define debug(format, arg...) do {} while (0)
|
#define debug(format, arg...) do {} while (0)
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|||||||
@@ -68,6 +68,8 @@
|
|||||||
/*
|
/*
|
||||||
* e.g. PCI controllers need this
|
* e.g. PCI controllers need this
|
||||||
*/
|
*/
|
||||||
|
#define CONFIG_SYS_OHCI_SWAP_REG_ACCES
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
|
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
|
||||||
#define readl(a) swpl(*((volatile uint32_t *)(a)))
|
#define readl(a) swpl(*((volatile uint32_t *)(a)))
|
||||||
#define writel(a, b) (*((volatile uint32_t *)(b)) = 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
|
0
|
||||||
}, /* Philips 1561 PCI OHCI module ids */
|
}, /* Philips 1561 PCI OHCI module ids */
|
||||||
/* Please add supported PCI OHCI controller ids here */
|
/* Please add supported PCI OHCI controller ids here */
|
||||||
{ 0, 0, 0, 0, 0, 0, 0 }
|
{
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG
|
#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 void flush_data_cache(ohci_t *ohci);
|
||||||
static int hc_interrupt(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,
|
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
|
* URB support functions
|
||||||
|
|||||||
@@ -248,7 +248,6 @@ int usb_mem_init(void)
|
|||||||
#ifdef USE_RADEON_MEMORY
|
#ifdef USE_RADEON_MEMORY
|
||||||
usb_buffer = (void *)offscren_reserved();
|
usb_buffer = (void *)offscren_reserved();
|
||||||
if (usb_buffer == NULL)
|
if (usb_buffer == NULL)
|
||||||
#else
|
|
||||||
#endif
|
#endif
|
||||||
memset(usb_buffer, 0, USB_BUFFER_SIZE);
|
memset(usb_buffer, 0, USB_BUFFER_SIZE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user