mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 06:46:59 +00:00
Merge git://git.denx.de/u-boot-usb
This commit is contained in:
commit
eab76dfd5b
4 changed files with 22 additions and 21 deletions
|
@ -44,7 +44,7 @@ static void ums_fini(void)
|
|||
for (i = 0; i < ums_count; i++)
|
||||
free((void *)ums[i].name);
|
||||
free(ums);
|
||||
ums = 0;
|
||||
ums = NULL;
|
||||
ums_count = 0;
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ cleanup:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
|
||||
static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
|
||||
int argc, char * const argv[])
|
||||
{
|
||||
const char *usb_controller;
|
||||
|
|
|
@ -1386,11 +1386,6 @@ static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
|
|||
gpio_set_value(udc->board.pullup_pin, !active);
|
||||
}
|
||||
|
||||
static const struct at91_udc_caps at91rm9200_udc_caps = {
|
||||
.init = at91rm9200_udc_init,
|
||||
.pullup = at91rm9200_udc_pullup,
|
||||
};
|
||||
|
||||
static int at91sam9260_udc_init(struct at91_udc *udc)
|
||||
{
|
||||
struct at91_ep *ep;
|
||||
|
@ -1503,11 +1498,6 @@ static int at91sam9263_udc_init(struct at91_udc *udc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct at91_udc_caps at91sam9263_udc_caps = {
|
||||
.init = at91sam9263_udc_init,
|
||||
.pullup = at91sam9260_udc_pullup,
|
||||
};
|
||||
|
||||
int usb_gadget_handle_interrupts(int index)
|
||||
{
|
||||
struct at91_udc *udc = controller;
|
||||
|
|
|
@ -43,6 +43,7 @@ struct dwc2_priv {
|
|||
struct dwc2_core_regs *regs;
|
||||
int root_hub_devnum;
|
||||
bool ext_vbus;
|
||||
bool hnp_srp_disable;
|
||||
bool oc_disable;
|
||||
};
|
||||
|
||||
|
@ -394,6 +395,9 @@ static void dwc_otg_core_init(struct dwc2_priv *priv)
|
|||
usbcfg |= DWC2_GUSBCFG_ULPI_CLK_SUS_M;
|
||||
}
|
||||
#endif
|
||||
if (priv->hnp_srp_disable)
|
||||
usbcfg |= DWC2_GUSBCFG_FORCEHOSTMODE;
|
||||
|
||||
writel(usbcfg, ®s->gusbcfg);
|
||||
|
||||
/* Program the GAHBCFG Register. */
|
||||
|
@ -422,12 +426,16 @@ static void dwc_otg_core_init(struct dwc2_priv *priv)
|
|||
|
||||
writel(ahbcfg, ®s->gahbcfg);
|
||||
|
||||
/* Program the GUSBCFG register for HNP/SRP. */
|
||||
setbits_le32(®s->gusbcfg, DWC2_GUSBCFG_HNPCAP | DWC2_GUSBCFG_SRPCAP);
|
||||
/* Program the capabilities in GUSBCFG Register */
|
||||
usbcfg = 0;
|
||||
|
||||
if (!priv->hnp_srp_disable)
|
||||
usbcfg |= DWC2_GUSBCFG_HNPCAP | DWC2_GUSBCFG_SRPCAP;
|
||||
#ifdef CONFIG_DWC2_IC_USB_CAP
|
||||
setbits_le32(®s->gusbcfg, DWC2_GUSBCFG_IC_USB_CAP);
|
||||
usbcfg |= DWC2_GUSBCFG_IC_USB_CAP;
|
||||
#endif
|
||||
|
||||
setbits_le32(®s->gusbcfg, usbcfg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1244,6 +1252,11 @@ static int dwc2_usb_ofdata_to_platdata(struct udevice *dev)
|
|||
if (prop)
|
||||
priv->oc_disable = true;
|
||||
|
||||
prop = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
|
||||
"hnp-srp-disable", NULL);
|
||||
if (prop)
|
||||
priv->hnp_srp_disable = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,13 +102,11 @@ struct usb_linux_config_descriptor {
|
|||
} __attribute__ ((packed));
|
||||
|
||||
#if defined CONFIG_EHCI_DESC_BIG_ENDIAN
|
||||
#define ehci_readl(x) cpu_to_be32((*((volatile u32 *)(x))))
|
||||
#define ehci_writel(a, b) (*((volatile u32 *)(a)) = \
|
||||
cpu_to_be32(((volatile u32)b)))
|
||||
#define ehci_readl(x) cpu_to_be32(readl(x))
|
||||
#define ehci_writel(a, b) writel(cpu_to_be32(b), a)
|
||||
#else
|
||||
#define ehci_readl(x) cpu_to_le32((*((volatile u32 *)(x))))
|
||||
#define ehci_writel(a, b) (*((volatile u32 *)(a)) = \
|
||||
cpu_to_le32(((volatile u32)b)))
|
||||
#define ehci_readl(x) cpu_to_le32(readl(x))
|
||||
#define ehci_writel(a, b) writel(cpu_to_le32(b), a)
|
||||
#endif
|
||||
|
||||
#if defined CONFIG_EHCI_MMIO_BIG_ENDIAN
|
||||
|
|
Loading…
Add table
Reference in a new issue