diff mbox series

[U-Boot,6/6] usb: xhci: zynqmp: Remove support for !DM_USB

Message ID 21e9aef4a5d4baa6ebaaeb52acb03e2c1450433e.1526480763.git.michal.simek@xilinx.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series Convert Xilinx ZynqMP to DM_USB with generic DWC3 glue logic driver | expand

Commit Message

Michal Simek May 16, 2018, 2:26 p.m. UTC
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>
---

 drivers/usb/host/Kconfig       |  1 +
 drivers/usb/host/xhci-zynqmp.c | 46 ----------------------------------
 scripts/config_whitelist.txt   |  1 -
 3 files changed, 1 insertion(+), 47 deletions(-)

Comments

Simon Glass May 16, 2018, 8:57 p.m. UTC | #1
On 16 May 2018 at 08:26, Michal Simek <michal.simek@xilinx.com> wrote:
> 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>
> ---
>
>  drivers/usb/host/Kconfig       |  1 +
>  drivers/usb/host/xhci-zynqmp.c | 46 ----------------------------------
>  scripts/config_whitelist.txt   |  1 -
>  3 files changed, 1 insertion(+), 47 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 3455e8113bb8..b4dd005651cf 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -75,6 +75,7 @@  config USB_XHCI_STI
 config USB_XHCI_ZYNQMP
 	bool "Support for Xilinx ZynqMP on-chip xHCI USB controller"
 	depends on ARCH_ZYNQMP
+	depends on DM_USB
 	help
 	  Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
 
diff --git a/drivers/usb/host/xhci-zynqmp.c b/drivers/usb/host/xhci-zynqmp.c
index 526a42a9a58a..e44e1ae1d915 100644
--- a/drivers/usb/host/xhci-zynqmp.c
+++ b/drivers/usb/host/xhci-zynqmp.c
@@ -55,23 +55,15 @@ 
 #define USBOTGSS_IRQ_SET_1_DMADISABLECLR_EN	BIT(17)
 
 struct zynqmp_xhci {
-#ifdef CONFIG_DM_USB
 	struct usb_platdata usb_plat;
-#endif
 	struct xhci_ctrl ctrl;
 	struct xhci_hccr *hcd;
 	struct dwc3 *dwc3_reg;
 };
 
-#ifdef CONFIG_DM_USB
 struct zynqmp_xhci_platdata {
 	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)
 {
@@ -89,42 +81,6 @@  static int zynqmp_xhci_core_init(struct zynqmp_xhci *zynqmp_xhci)
 	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)
 {
 	/*
@@ -135,7 +91,6 @@  void xhci_hcd_stop(int index)
 	return;
 }
 
-#ifdef CONFIG_DM_USB
 static int xhci_usb_probe(struct udevice *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),
 	.flags = DM_FLAG_ALLOC_PRIV_DMA,
 };
-#endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 71df6dbebde6..bfbdfcfc80ac 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -4782,7 +4782,6 @@  CONFIG_ZLIB
 CONFIG_ZLT
 CONFIG_ZM7300
 CONFIG_ZYNQMP_EEPROM
-CONFIG_ZYNQMP_XHCI_LIST
 CONFIG_ZYNQ_EEPROM
 CONFIG_ZYNQ_EEPROM_BUS
 CONFIG_ZYNQ_GEM_EEPROM_ADDR