]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-usb
authorTom Rini <trini@konsulko.com>
Tue, 25 Apr 2017 13:00:18 +0000 (09:00 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 25 Apr 2017 13:00:18 +0000 (09:00 -0400)
drivers/usb/host/ehci-ppc4xx.c
drivers/usb/musb-new/musb_uboot.c
drivers/usb/musb/musb_udc.c

index 9aee3ff786cba830eda534cdec6933eaa71e31d2..9d235776428e878cb45c3af315dc20931fce9004 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <usb.h>
+#include <asm/io.h>
 
 #include "ehci.h"
 
index ea71f759476ef46cf3fde775e1b4d6af93867bfe..8662c0ff70782bb872db836516e3e12a4c6df3a7 100644 (file)
@@ -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;
        }
index 87640f4e326a8062bca4757345ae1e90864bfbb5..d643334a2e8717bd4e7cd69a7dd74788e885d160 100644 (file)
@@ -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;