From patchwork Fri May 18 11:15:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 916213 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="OzwVlsiW"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40nQjs0gsrz9rxs for ; Fri, 18 May 2018 21:21:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D2EB7C21F64; Fri, 18 May 2018 11:20:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BAE2AC21EC3; Fri, 18 May 2018 11:15:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C4D10C21FA3; Fri, 18 May 2018 11:15:33 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id 09A4DC21EC3 for ; Fri, 18 May 2018 11:15:20 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id x9-v6so5936579wrl.13 for ; Fri, 18 May 2018 04:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=kL/GPbE7sX6tq+fAykU0nYxHX79UO5k/eBZ3LFnsNTA=; b=OzwVlsiWcCR+hNKrGSQ8nvl3I6c7QJIWVlCRQwfhNU8k13fZVycrxL+ETcbSHSpPz7 PHQtagHpcmi6edjyVJu0Mx5nt5zIFYhv19REZvqwWDGBQI9DklGkvGy3G1v0c6l5D/6j W1RKQkHZHqy6aejNqao3j+zJhZrsjL7hP0Lr76++Rlan8rt5JqGDSWubvqMGm7O6sGJ8 EXh36H/kIztb7sXsquGJ7LDB4q17LL7k4fkoAEipmT+F21mJbNyYI+U7DI6NWHY0HgO2 07mDBKRpQIFY0rh/tiDiLQj4KVkmb0D+O0lGlsX08CLgS47r3kQw4kV0/RDziTMjfsXU X8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=kL/GPbE7sX6tq+fAykU0nYxHX79UO5k/eBZ3LFnsNTA=; b=tBJ8T/K+ghFnpnsa24RCz8AIB6knPDzC/++v6SWmxh6nfIHtEWmbrupzFOteIuobhr AigqmnTVqFordAOjWi4pk5+QjBLjPy9U9tEK/4Fngf3dhoJEH0rlFkEwabsJ9ihxJfn0 HDMErr3Dtre9EpX3WNYyplSgyPyXHoB4xl0VqEL+hHZ/aIOKzcJlK3atylPy2pqEVwdw etprsR+PL371vSkxBFhuf5tDT2SqWv3N53/w9QwJrdkTetlYokTGq9rZAM6mPk/yWXTu sGtak7LA01bWx63Bldoi7Pqzk3dQY7n5vILzLK5sQrWg0t56mdTXLCU9HraoFtur8WV7 yPoQ== X-Gm-Message-State: ALKqPwe/+Yrc49NrcPNi9ydCABjwZ5tuWH6cJw14Po8pWAMLs9SFHwno whYS2r3N0bD2n/63Oy8ni+EkDg== X-Google-Smtp-Source: AB8JxZq8yPgeBp3wNcysrUkTQc1RLxJKugQfkYQpjeSiF1NO/tgxJ4hgnUQC05mf+ywZdbenWwJD9g== X-Received: by 2002:adf:8124:: with SMTP id 33-v6mr6296567wrm.109.1526642119742; Fri, 18 May 2018 04:15:19 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id m17-v6sm6812394wrh.3.2018.05.18.04.15.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 18 May 2018 04:15:19 -0700 (PDT) From: Michal Simek To: Marek Vasut , u-boot@lists.denx.de Date: Fri, 18 May 2018 13:15:09 +0200 Message-Id: <63a670e66ceeccbc19a8d3e96aef5a56b7b9ee53.1526642103.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: In-Reply-To: References: Cc: Alexey Brodkin , Ran Wang , Chris Packham Subject: [U-Boot] [PATCH v2 6/6] usb: xhci: zynqmp: Remove support for !DM_USB X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Switch to DM_USB was done and there is no need to keep !DM_USB code in tree. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v2: None drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-zynqmp.c | 46 ---------------------------------- scripts/config_whitelist.txt | 1 - 3 files changed, 1 insertion(+), 47 deletions(-) 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