diff options
author | Tom Rini <trini@konsulko.com> | 2017-04-25 09:00:18 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-25 09:00:18 -0400 |
commit | 9fde52a8d4dc48003e328a5d087de049daa8e768 (patch) | |
tree | 8e098bc01068eb95c7302759893c224ecd0bf1eb | |
parent | 9ad99bee9c6d840be89334fc16e7d04e350ce8c5 (diff) | |
parent | 83cb46c286beb5406aaed2e0d5895719717804b3 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
-rw-r--r-- | drivers/usb/host/ehci-ppc4xx.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb-new/musb_uboot.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_udc.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-ppc4xx.c b/drivers/usb/host/ehci-ppc4xx.c index 9aee3ff786..9d23577642 100644 --- a/drivers/usb/host/ehci-ppc4xx.c +++ b/drivers/usb/host/ehci-ppc4xx.c @@ -8,6 +8,7 @@ */ #include <common.h> #include <usb.h> +#include <asm/io.h> #include "ehci.h" diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index ea71f75947..8662c0ff70 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -446,7 +446,7 @@ int musb_register(struct musb_hdrc_platform_data *plat, void *bdata, } *musbp = musb_init_controller(plat, (struct device *)bdata, ctl_regs); - if (!musbp) { + if (!*musbp) { printf("Failed to init the controller\n"); return -EIO; } diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c index 87640f4e32..d643334a2e 100644 --- a/drivers/usb/musb/musb_udc.c +++ b/drivers/usb/musb/musb_udc.c @@ -85,7 +85,7 @@ do { \ /* static implies these initialized to 0 or NULL */ static int debug_setup; static int debug_level; -static struct musb_epinfo epinfo[MAX_ENDPOINT * 2]; +static struct musb_epinfo epinfo[MAX_ENDPOINT * 2 + 2]; static enum ep0_state_enum { IDLE = 0, TX, @@ -944,7 +944,7 @@ int udc_init(void) musbr = musb_cfg.regs; /* Initialize the endpoints */ - for (ep_loop = 0; ep_loop < MAX_ENDPOINT * 2; ep_loop++) { + for (ep_loop = 0; ep_loop <= MAX_ENDPOINT * 2; ep_loop++) { epinfo[ep_loop].epnum = (ep_loop / 2) + 1; epinfo[ep_loop].epdir = ep_loop % 2; /* OUT, IN */ epinfo[ep_loop].epsize = 0; |