mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-21 22:21:36 +00:00
usb: xhci: zynqmp: Remove support for !DM_USB
Switch to DM_USB was done and there is no need to keep !DM_USB code in tree. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b4af64fdfd
commit
d067624c47
3 changed files with 1 additions and 47 deletions
|
@ -75,6 +75,7 @@ config USB_XHCI_STI
|
||||||
config USB_XHCI_ZYNQMP
|
config USB_XHCI_ZYNQMP
|
||||||
bool "Support for Xilinx ZynqMP on-chip xHCI USB controller"
|
bool "Support for Xilinx ZynqMP on-chip xHCI USB controller"
|
||||||
depends on ARCH_ZYNQMP
|
depends on ARCH_ZYNQMP
|
||||||
|
depends on DM_USB
|
||||||
help
|
help
|
||||||
Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
|
Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
|
||||||
|
|
||||||
|
|
|
@ -55,23 +55,15 @@
|
||||||
#define USBOTGSS_IRQ_SET_1_DMADISABLECLR_EN BIT(17)
|
#define USBOTGSS_IRQ_SET_1_DMADISABLECLR_EN BIT(17)
|
||||||
|
|
||||||
struct zynqmp_xhci {
|
struct zynqmp_xhci {
|
||||||
#ifdef CONFIG_DM_USB
|
|
||||||
struct usb_platdata usb_plat;
|
struct usb_platdata usb_plat;
|
||||||
#endif
|
|
||||||
struct xhci_ctrl ctrl;
|
struct xhci_ctrl ctrl;
|
||||||
struct xhci_hccr *hcd;
|
struct xhci_hccr *hcd;
|
||||||
struct dwc3 *dwc3_reg;
|
struct dwc3 *dwc3_reg;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DM_USB
|
|
||||||
struct zynqmp_xhci_platdata {
|
struct zynqmp_xhci_platdata {
|
||||||
fdt_addr_t hcd_base;
|
fdt_addr_t hcd_base;
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
static struct zynqmp_xhci zynqmp_xhci;
|
|
||||||
|
|
||||||
unsigned long ctr_addr[] = CONFIG_ZYNQMP_XHCI_LIST;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int zynqmp_xhci_core_init(struct zynqmp_xhci *zynqmp_xhci)
|
static int zynqmp_xhci_core_init(struct zynqmp_xhci *zynqmp_xhci)
|
||||||
{
|
{
|
||||||
|
@ -89,42 +81,6 @@ static int zynqmp_xhci_core_init(struct zynqmp_xhci *zynqmp_xhci)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_DM_USB
|
|
||||||
int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor)
|
|
||||||
{
|
|
||||||
struct zynqmp_xhci *ctx = &zynqmp_xhci;
|
|
||||||
int ret = 0;
|
|
||||||
uint32_t hclen;
|
|
||||||
|
|
||||||
if (index < 0 || index >= ARRAY_SIZE(ctr_addr))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
ctx->hcd = (struct xhci_hccr *)ctr_addr[index];
|
|
||||||
ctx->dwc3_reg = (struct dwc3 *)((void *)ctx->hcd + DWC3_REG_OFFSET);
|
|
||||||
|
|
||||||
ret = board_usb_init(index, USB_INIT_HOST);
|
|
||||||
if (ret != 0) {
|
|
||||||
puts("Failed to initialize board for USB\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = zynqmp_xhci_core_init(ctx);
|
|
||||||
if (ret < 0) {
|
|
||||||
puts("Failed to initialize xhci\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
*hccr = (struct xhci_hccr *)ctx->hcd;
|
|
||||||
hclen = HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase));
|
|
||||||
*hcor = (struct xhci_hcor *)((uintptr_t) *hccr + hclen);
|
|
||||||
|
|
||||||
debug("zynqmp-xhci: init hccr %p and hcor %p hc_length %d\n",
|
|
||||||
*hccr, *hcor, hclen);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void xhci_hcd_stop(int index)
|
void xhci_hcd_stop(int index)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -135,7 +91,6 @@ void xhci_hcd_stop(int index)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DM_USB
|
|
||||||
static int xhci_usb_probe(struct udevice *dev)
|
static int xhci_usb_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct zynqmp_xhci_platdata *plat = dev_get_platdata(dev);
|
struct zynqmp_xhci_platdata *plat = dev_get_platdata(dev);
|
||||||
|
@ -189,4 +144,3 @@ U_BOOT_DRIVER(dwc3_generic_host) = {
|
||||||
.priv_auto_alloc_size = sizeof(struct zynqmp_xhci),
|
.priv_auto_alloc_size = sizeof(struct zynqmp_xhci),
|
||||||
.flags = DM_FLAG_ALLOC_PRIV_DMA,
|
.flags = DM_FLAG_ALLOC_PRIV_DMA,
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
|
@ -4782,7 +4782,6 @@ CONFIG_ZLIB
|
||||||
CONFIG_ZLT
|
CONFIG_ZLT
|
||||||
CONFIG_ZM7300
|
CONFIG_ZM7300
|
||||||
CONFIG_ZYNQMP_EEPROM
|
CONFIG_ZYNQMP_EEPROM
|
||||||
CONFIG_ZYNQMP_XHCI_LIST
|
|
||||||
CONFIG_ZYNQ_EEPROM
|
CONFIG_ZYNQ_EEPROM
|
||||||
CONFIG_ZYNQ_EEPROM_BUS
|
CONFIG_ZYNQ_EEPROM_BUS
|
||||||
CONFIG_ZYNQ_GEM_EEPROM_ADDR
|
CONFIG_ZYNQ_GEM_EEPROM_ADDR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue