From patchwork Wed May 16 14:26: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: 914666 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="PY1d0Sqh"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40mGyy1mR0z9s3B for ; Thu, 17 May 2018 00:29:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 91F97C21F0B; Wed, 16 May 2018 14:28:46 +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 91F9DC21F02; Wed, 16 May 2018 14:26:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B804BC21F3F; Wed, 16 May 2018 14:26:26 +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 459F6C21F05 for ; Wed, 16 May 2018 14:26:20 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id p4-v6so1534287wrh.3 for ; Wed, 16 May 2018 07:26: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=phLnnZxYcRjLMwevFNlRKauG1Cm8zJF5U3BrktaHIjg=; b=PY1d0SqhahU9lQv1T1Cg2/QS9ijLZT3XOm+JIwF3LMq/98+jqnuuQuEohy0cU7fptK +3QMUuDz6zhD/BRQ3tsd9LN30ExFcMeINozX2fvaWKYM+82N2oRIABKhsXA+qsgtehUu C/IPY4bu8XwSVPGd7txFBSn+ePTiAP2ErI02hLi6AN52RGj1iE5CDdidINpiHl7JJuXa 69dZ6UBjE7BUXS4JbA2vvUJji2KTGp4EPds88rEebOi83GWuHmWw1RBImjQNhtDZ40Wf X/3WjP7ePCeMSD/SK/NivrRTz9jJmE8c3Td4NGM3XlMvBEVDRUgFYpA3YqIX1R8/g+2Q hPSA== 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=phLnnZxYcRjLMwevFNlRKauG1Cm8zJF5U3BrktaHIjg=; b=TKL1IAREtiYRf52bpGelcPKms79eMEVjgh+fT6O16y+Sy89Ryug6oIjwzXPhOcM/nf ndENk6QhJ89PtWGmrHBgU6/2sao8fOpsDOSpIymChurLAJU9L2oG3589lTfn3RK/WUA/ QprKml1wDmly2nPD6Sj9fqfEoL1OH+XTmJxlmgSaJspHg1CpnqE6YH3c5esyGTQSLokt THw1JokaemdtoER7lgx0MQsshg8Pduwe5NEIx3gloAcZRuKIm34CnzOQigJwaPUqdsuM uYnFAFkKwUiDg6KmdW5RDGbw4hRxU1NDLHkfcmjK0YUPdYxgVK9KIlUQCiPETZ2J0V1Y 9bMQ== X-Gm-Message-State: ALKqPweeETJUqhkRkDAqSxS3VwtdGp/h0/vk130uG/PqnY0sU7E+tIug LjPXpI15gHy8FUqHGfyLwvhj+A== X-Google-Smtp-Source: AB8JxZqnfRYxPtMXaCICWO6nxxRuJGListkIq5xS0vQ7wJx4V5gHt0tvflDL1zIn6zpEYhZqr63b2A== X-Received: by 2002:adf:9cc2:: with SMTP id h2-v6mr1013734wre.11.1526480779996; Wed, 16 May 2018 07:26:19 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id h66-v6sm3045279wmf.8.2018.05.16.07.26.19 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 16 May 2018 07:26:19 -0700 (PDT) From: Michal Simek To: Marek Vasut , u-boot@lists.denx.de Date: Wed, 16 May 2018 16:26:09 +0200 Message-Id: <21e9aef4a5d4baa6ebaaeb52acb03e2c1450433e.1526480763.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 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 --- 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