diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/common/fsl-errata.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 9 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ppc4xx.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/xhci-omap.c | 19 | ||||
-rw-r--r-- | drivers/usb/musb-new/musb_uboot.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_udc.c | 4 |
6 files changed, 31 insertions, 6 deletions
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c index 6069c935c1..338ac08d8a 100644 --- a/drivers/usb/common/fsl-errata.c +++ b/drivers/usb/common/fsl-errata.c @@ -204,7 +204,7 @@ bool has_erratum_a010151(void) case SVR_LS1043A: return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1); #endif -#ifdef CONFIG_LS102XA +#ifdef CONFIG_ARCH_LS1021A case SOC_VER_LS1020: case SOC_VER_LS1021: case SOC_VER_LS1022: diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 0bf8274405..fb5aa6f889 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -44,6 +44,15 @@ config USB_XHCI_ZYNQMP help Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs. +config USB_XHCI_DRA7XX_INDEX + int "DRA7XX xHCI USB index" + range 0 1 + default 0 + depends on DRA7XX + help + Select the DRA7XX xHCI USB index. + Current supported values: 0, 1. + endif # USB_XHCI_HCD config USB_EHCI_HCD 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/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c index b881b198fc..d6c5744818 100644 --- a/drivers/usb/host/xhci-omap.c +++ b/drivers/usb/host/xhci-omap.c @@ -27,12 +27,27 @@ DECLARE_GLOBAL_DATA_PTR; static struct omap_xhci omap; -__weak int __board_usb_init(int index, enum usb_init_type init) +__weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) { + enable_usb_clocks(index); return 0; } + int board_usb_init(int index, enum usb_init_type init) - __attribute__((weak, alias("__board_usb_init"))); +{ + return omap_xhci_board_usb_init(index, init); +} + +__weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) +{ + disable_usb_clocks(index); + return 0; +} + +int board_usb_cleanup(int index, enum usb_init_type init) +{ + return omap_xhci_board_usb_cleanup(index, init); +} static int omap_xhci_core_init(struct omap_xhci *omap) { 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; |