diff options
author | Tom Rini <trini@ti.com> | 2013-08-01 09:19:28 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-08-01 09:19:28 -0400 |
commit | 245d65b6e503f3a159cffb3392ac3b2c25606d8e (patch) | |
tree | 468379202891d516817dfad73ac6ba907bb1156a /drivers/usb/host/ehci-hcd.c | |
parent | 327b5c9f7cde4e621c2f49fbd2e9890d32f2bef8 (diff) | |
parent | 8bc3603675f7bf4dfa4eb6bdaf2aa0a8ddce9fa6 (diff) | |
download | u-boot-imx-245d65b6e503f3a159cffb3392ac3b2c25606d8e.zip u-boot-imx-245d65b6e503f3a159cffb3392ac3b2c25606d8e.tar.gz u-boot-imx-245d65b6e503f3a159cffb3392ac3b2c25606d8e.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 706cf0c..fdad739 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -36,16 +36,7 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif -static struct ehci_ctrl { - struct ehci_hccr *hccr; /* R/O registers, not need for volatile */ - struct ehci_hcor *hcor; - int rootdev; - uint16_t portreset; - struct QH qh_list __aligned(USB_DMA_MINALIGN); - struct QH periodic_queue __aligned(USB_DMA_MINALIGN); - uint32_t *periodic_list; - int ntds; -} ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT]; +static struct ehci_ctrl ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT]; #define ALIGN_END_ADDR(type, ptr, size) \ ((uint32_t)(ptr) + roundup((size) * sizeof(type), USB_DMA_MINALIGN)) @@ -954,7 +945,9 @@ int usb_lowlevel_init(int index, void **controller) * Split Transactions will be spread across microframes using * S-mask and C-mask. */ - ehcic[index].periodic_list = memalign(4096, 1024*4); + if (ehcic[index].periodic_list == NULL) + ehcic[index].periodic_list = memalign(4096, 1024 * 4); + if (!ehcic[index].periodic_list) return -ENOMEM; for (i = 0; i < 1024; i++) { |