Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/955987/?format=api
{ "id": 955987, "url": "http://patchwork.ozlabs.org/api/patches/955987/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-19-jagan@amarulasolutions.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180810060711.6547-19-jagan@amarulasolutions.com>", "list_archive_url": null, "date": "2018-08-10T06:06:36", "name": "[U-Boot,v2,18/53] usb: host: Drop [e-o]hci-sunxi drivers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "40908b1017129ddebb0b4a99cf3dd33914bcd78f", "submitter": { "id": 69820, "url": "http://patchwork.ozlabs.org/api/people/69820/?format=api", "name": "Jagan Teki", "email": "jagan@amarulasolutions.com" }, "delegate": { "id": 17739, "url": "http://patchwork.ozlabs.org/api/users/17739/?format=api", "username": "jagan", "first_name": "Jagannadha Sutradharudu", "last_name": "Teki", "email": "jagannadh.teki@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-19-jagan@amarulasolutions.com/mbox/", "series": [ { "id": 60190, "url": "http://patchwork.ozlabs.org/api/series/60190/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=60190", "date": "2018-08-10T06:06:18", "name": "clk: Add Allwinner CLK, RESET support", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/60190/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/955987/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/955987/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=amarulasolutions.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amarulasolutions.com\n\theader.i=@amarulasolutions.com header.b=\"YnLOo5Vz\"; \n\tdkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41mwNt6gcsz9s8f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Aug 2018 16:35:42 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 94219C21E16; Fri, 10 Aug 2018 06:19:18 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 94E18C21EA6;\n\tFri, 10 Aug 2018 06:10:10 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 7E6EDC21E6C; Fri, 10 Aug 2018 06:08:55 +0000 (UTC)", "from mail-pg1-f193.google.com (mail-pg1-f193.google.com\n\t[209.85.215.193])\n\tby lists.denx.de (Postfix) with ESMTPS id E6A62C21DD4\n\tfor <u-boot@lists.denx.de>; Fri, 10 Aug 2018 06:08:46 +0000 (UTC)", "by mail-pg1-f193.google.com with SMTP id r5-v6so3902181pgv.0\n\tfor <u-boot@lists.denx.de>; Thu, 09 Aug 2018 23:08:46 -0700 (PDT)", "from localhost.localdomain ([183.82.228.250])\n\tby smtp.gmail.com with ESMTPSA id\n\tr23-v6sm16880975pfj.5.2018.08.09.23.08.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 09 Aug 2018 23:08:44 -0700 (PDT)" ], "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_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amarulasolutions.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=vg0rG9SKHwVS6S0duoYkFa44WQkPQ6hAm5gvCEYzfCg=;\n\tb=YnLOo5Vzo/2k4ZSLoEHT3IR49V0iJ7CM+0ql6obbRK/O4PzqkWKk9VKICCvfvRzy3X\n\twX5Pq5ZrGqG8MLTbS1i8vmfuEmaxS7wzVUz0y8PDNoqdIKJtJDtOn4w1AD2oJ1Dc7U5r\n\t7oxTNWKOPXDolfH07be42MvtWClPcUes+JVys=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=vg0rG9SKHwVS6S0duoYkFa44WQkPQ6hAm5gvCEYzfCg=;\n\tb=snIwOOpRwC3HttTe0eOE/ME9W6gLS1asEY0UsbdDaASATb1YhSHmStA2TmSkd05pdt\n\tYrRqgzvNCQEpVVSYMT/WF7cCV7cOCvtnpJg4JT5fxjDDxq/E02uTnb6n12kbQEn6rykg\n\t0v/4DgSioQv8m1mst1Gl7LDC4OwbKOCmfLmrv+S5fC/FZzCYlGuAotQ2louOlYo8KLGS\n\tK7ddWqWi5AlPqMHqZRAXR818DWzNQEAXwaAgxrcftzGQdJIyULUoTvoIHb52m2qgWZ6G\n\tkp2oXG92Tn1YXbup9EAat9U8uXzdX9sFlrX8HYcR0vcTZaDKlICba0/Z7JWc/vJGsxrb\n\tXalA==", "X-Gm-Message-State": "AOUpUlEiPGeU4MgNdaUUjdVcNbCJoHZkMtRkFx9HMD42m8w2LYDucVqj\n\tQjk7XU7LTJMOW4PhhxaHIQI+GQ==", "X-Google-Smtp-Source": "AA+uWPz8Rvpr87WszkZNvbozrE7cZS70tElrULzZKQ1ze0aPA6sYiyrGcsuJJWtmc7D7wgCo7m9aOw==", "X-Received": "by 2002:a65:4304:: with SMTP id\n\tj4-v6mr5152490pgq.109.1533881325410; \n\tThu, 09 Aug 2018 23:08:45 -0700 (PDT)", "From": "Jagan Teki <jagan@amarulasolutions.com>", "To": "Maxime Ripard <maxime.ripard@bootlin.com>,\n\tAndre Przywara <andre.przywara@arm.com>, Chen-Yu Tsai <wens@csie.org>,\n\tIcenowy Zheng <icenowy@aosc.io>", "Date": "Fri, 10 Aug 2018 11:36:36 +0530", "Message-Id": "<20180810060711.6547-19-jagan@amarulasolutions.com>", "X-Mailer": "git-send-email 2.18.0.321.gffc6fa0e3", "In-Reply-To": "<20180810060711.6547-1-jagan@amarulasolutions.com>", "References": "<20180810060711.6547-1-jagan@amarulasolutions.com>", "MIME-Version": "1.0", "Cc": "Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v2 18/53] usb: host: Drop [e-o]hci-sunxi drivers", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Now Allwinner platform is all set to use Generic USB\ncontroller drivers, so remove the legacy sunxi drivers.\n\nSigned-off-by: Jagan Teki <jagan@amarulasolutions.com>\n---\n drivers/usb/host/Makefile | 2 -\n drivers/usb/host/ehci-sunxi.c | 204 -----------------------------\n drivers/usb/host/ohci-sunxi.c | 233 ----------------------------------\n scripts/config_whitelist.txt | 2 -\n 4 files changed, 441 deletions(-)\n delete mode 100644 drivers/usb/host/ehci-sunxi.c\n delete mode 100644 drivers/usb/host/ohci-sunxi.c", "diff": "diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile\nindex cb8c315a15..b62fdbb1d2 100644\n--- a/drivers/usb/host/Makefile\n+++ b/drivers/usb/host/Makefile\n@@ -15,7 +15,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o\n obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o\n obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o\n obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o\n-obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o\n obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o\n obj-$(CONFIG_USB_OHCI_GENERIC) += ohci-generic.o\n \n@@ -37,7 +36,6 @@ obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o\n obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o\n obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o\n obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o\n-obj-$(CONFIG_USB_EHCI_SUNXI) += ehci-sunxi.o\n obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o\n obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o\n obj-$(CONFIG_USB_EHCI_VF) += ehci-vf.o\ndiff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c\ndeleted file mode 100644\nindex 7a79931a97..0000000000\n--- a/drivers/usb/host/ehci-sunxi.c\n+++ /dev/null\n@@ -1,204 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0+\n-/*\n- * Sunxi ehci glue\n- *\n- * Copyright (C) 2015 Hans de Goede <hdegoede@redhat.com>\n- * Copyright (C) 2014 Roman Byshko <rbyshko@gmail.com>\n- *\n- * Based on code from\n- * Allwinner Technology Co., Ltd. <www.allwinnertech.com>\n- */\n-\n-#include <common.h>\n-#include <asm/arch/clock.h>\n-#include <asm/io.h>\n-#include <dm.h>\n-#include \"ehci.h\"\n-#include <generic-phy.h>\n-\n-#ifdef CONFIG_SUNXI_GEN_SUN4I\n-#define BASE_DIST\t\t0x8000\n-#define AHB_CLK_DIST\t\t2\n-#else\n-#define BASE_DIST\t\t0x1000\n-#define AHB_CLK_DIST\t\t1\n-#endif\n-\n-#define SUN6I_AHB_RESET0_CFG_OFFSET 0x2c0\n-#define SUN9I_AHB_RESET0_CFG_OFFSET 0x5a0\n-\n-struct ehci_sunxi_cfg {\n-\tbool has_reset;\n-\tu32 extra_ahb_gate_mask;\n-\tu32 reset0_cfg_offset;\n-};\n-\n-struct ehci_sunxi_priv {\n-\tstruct ehci_ctrl ehci;\n-\tstruct sunxi_ccm_reg *ccm;\n-\tu32 *reset0_cfg;\n-\tint ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */\n-\tstruct phy phy;\n-\tconst struct ehci_sunxi_cfg *cfg;\n-};\n-\n-static int ehci_usb_probe(struct udevice *dev)\n-{\n-\tstruct usb_platdata *plat = dev_get_platdata(dev);\n-\tstruct ehci_sunxi_priv *priv = dev_get_priv(dev);\n-\tstruct ehci_hccr *hccr = (struct ehci_hccr *)devfdt_get_addr(dev);\n-\tstruct ehci_hcor *hcor;\n-\tint extra_ahb_gate_mask = 0;\n-\tu8 reg_mask = 0;\n-\tint phys, ret;\n-\n-\tpriv->cfg = (const struct ehci_sunxi_cfg *)dev_get_driver_data(dev);\n-\tpriv->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n-\tif (IS_ERR(priv->ccm))\n-\t\treturn PTR_ERR(priv->ccm);\n-\n-\tpriv->reset0_cfg = (void *)priv->ccm +\n-\t\t\t\t priv->cfg->reset0_cfg_offset;\n-\n-\tphys = dev_count_phandle_with_args(dev, \"phys\", \"#phy-cells\");\n-\tif (phys < 0) {\n-\t\tphys = 0;\n-\t\tgoto no_phy;\n-\t}\n-\n-\tret = generic_phy_get_by_name(dev, \"usb\", &priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to get %s usb PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-\tret = generic_phy_init(&priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to init %s USB PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-\tret = generic_phy_power_on(&priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to power on %s USB PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-no_phy:\n-\t/*\n-\t * This should go away once we've moved to the driver model for\n-\t * clocks resp. phys.\n-\t */\n-\treg_mask = ((uintptr_t)hccr - SUNXI_USB1_BASE) / BASE_DIST;\n-\tpriv->ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_EHCI0;\n-\textra_ahb_gate_mask = priv->cfg->extra_ahb_gate_mask;\n-\tpriv->ahb_gate_mask <<= reg_mask * AHB_CLK_DIST;\n-\textra_ahb_gate_mask <<= reg_mask * AHB_CLK_DIST;\n-\n-\tsetbits_le32(&priv->ccm->ahb_gate0,\n-\t\t priv->ahb_gate_mask | extra_ahb_gate_mask);\n-\tif (priv->cfg->has_reset)\n-\t\tsetbits_le32(priv->reset0_cfg,\n-\t\t\t priv->ahb_gate_mask | extra_ahb_gate_mask);\n-\n-\thcor = (struct ehci_hcor *)((uintptr_t)hccr +\n-\t\t\t\t HC_LENGTH(ehci_readl(&hccr->cr_capbase)));\n-\n-\treturn ehci_register(dev, hccr, hcor, NULL, 0, plat->init_type);\n-}\n-\n-static int ehci_usb_remove(struct udevice *dev)\n-{\n-\tstruct ehci_sunxi_priv *priv = dev_get_priv(dev);\n-\tint ret;\n-\n-\tif (generic_phy_valid(&priv->phy)) {\n-\t\tret = generic_phy_exit(&priv->phy);\n-\t\tif (ret) {\n-\t\t\tpr_err(\"failed to exit %s USB PHY\\n\", dev->name);\n-\t\t\treturn ret;\n-\t\t}\n-\t}\n-\n-\tret = ehci_deregister(dev);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tif (priv->cfg->has_reset)\n-\t\tclrbits_le32(priv->reset0_cfg, priv->ahb_gate_mask);\n-\tclrbits_le32(&priv->ccm->ahb_gate0, priv->ahb_gate_mask);\n-\n-\treturn 0;\n-}\n-\n-static const struct ehci_sunxi_cfg sun4i_a10_cfg = {\n-\t.has_reset = false,\n-};\n-\n-static const struct ehci_sunxi_cfg sun6i_a31_cfg = {\n-\t.has_reset = true,\n-\t.reset0_cfg_offset = SUN6I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct ehci_sunxi_cfg sun8i_h3_cfg = {\n-\t.has_reset = true,\n-\t.extra_ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_OHCI0,\n-\t.reset0_cfg_offset = SUN6I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct ehci_sunxi_cfg sun9i_a80_cfg = {\n-\t.has_reset = true,\n-\t.reset0_cfg_offset = SUN9I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct udevice_id ehci_usb_ids[] = {\n-\t{\n-\t\t.compatible = \"allwinner,sun4i-a10-ehci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun5i-a13-ehci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun6i-a31-ehci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun7i-a20-ehci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-a23-ehci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-a83t-ehci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-h3-ehci\",\n-\t\t.data = (ulong)&sun8i_h3_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun9i-a80-ehci\",\n-\t\t.data = (ulong)&sun9i_a80_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun50i-a64-ehci\",\n-\t\t.data = (ulong)&sun8i_h3_cfg,\n-\t},\n-\t{ /* sentinel */ }\n-};\n-\n-U_BOOT_DRIVER(ehci_sunxi) = {\n-\t.name\t= \"ehci_sunxi\",\n-\t.id\t= UCLASS_USB,\n-\t.of_match = ehci_usb_ids,\n-\t.probe = ehci_usb_probe,\n-\t.remove = ehci_usb_remove,\n-\t.ops\t= &ehci_usb_ops,\n-\t.platdata_auto_alloc_size = sizeof(struct usb_platdata),\n-\t.priv_auto_alloc_size = sizeof(struct ehci_sunxi_priv),\n-\t.flags\t= DM_FLAG_ALLOC_PRIV_DMA,\n-};\ndiff --git a/drivers/usb/host/ohci-sunxi.c b/drivers/usb/host/ohci-sunxi.c\ndeleted file mode 100644\nindex bb3c2475df..0000000000\n--- a/drivers/usb/host/ohci-sunxi.c\n+++ /dev/null\n@@ -1,233 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0+\n-/*\n- * Sunxi ohci glue\n- *\n- * Copyright (C) 2015 Hans de Goede <hdegoede@redhat.com>\n- *\n- * Based on code from\n- * Allwinner Technology Co., Ltd. <www.allwinnertech.com>\n- */\n-\n-#include <common.h>\n-#include <asm/arch/clock.h>\n-#include <asm/io.h>\n-#include <dm.h>\n-#include <usb.h>\n-#include \"ohci.h\"\n-#include <generic-phy.h>\n-\n-#ifdef CONFIG_SUNXI_GEN_SUN4I\n-#define BASE_DIST\t\t0x8000\n-#define AHB_CLK_DIST\t\t2\n-#else\n-#define BASE_DIST\t\t0x1000\n-#define AHB_CLK_DIST\t\t1\n-#endif\n-\n-#define SUN6I_AHB_RESET0_CFG_OFFSET 0x2c0\n-#define SUN9I_AHB_RESET0_CFG_OFFSET 0x5a0\n-\n-struct ohci_sunxi_cfg {\n-\tbool has_reset;\n-\tu32 extra_ahb_gate_mask;\n-\tu32 extra_usb_gate_mask;\n-\tu32 reset0_cfg_offset;\n-};\n-\n-struct ohci_sunxi_priv {\n-\tohci_t ohci;\n-\tstruct sunxi_ccm_reg *ccm;\n-\tu32 *reset0_cfg;\n-\tint ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */\n-\tint usb_gate_mask; /* Mask of usb_clk_cfg clk gate bits for this hcd */\n-\tstruct phy phy;\n-\tconst struct ohci_sunxi_cfg *cfg;\n-};\n-\n-static fdt_addr_t last_ohci_addr = 0;\n-\n-static int ohci_usb_probe(struct udevice *dev)\n-{\n-\tstruct usb_bus_priv *bus_priv = dev_get_uclass_priv(dev);\n-\tstruct ohci_sunxi_priv *priv = dev_get_priv(dev);\n-\tstruct ohci_regs *regs = (struct ohci_regs *)devfdt_get_addr(dev);\n-\tint extra_ahb_gate_mask = 0;\n-\tu8 reg_mask = 0;\n-\tint phys, ret;\n-\n-\tif ((fdt_addr_t)regs > last_ohci_addr)\n-\t\tlast_ohci_addr = (fdt_addr_t)regs;\n-\n-\tpriv->cfg = (const struct ohci_sunxi_cfg *)dev_get_driver_data(dev);\n-\tpriv->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n-\tif (IS_ERR(priv->ccm))\n-\t\treturn PTR_ERR(priv->ccm);\n-\n-\tpriv->reset0_cfg = (void *)priv->ccm +\n-\t\t\t\t priv->cfg->reset0_cfg_offset;\n-\n-\tphys = dev_count_phandle_with_args(dev, \"phys\", \"#phy-cells\");\n-\tif (phys < 0) {\n-\t\tphys = 0;\n-\t\tgoto no_phy;\n-\t}\n-\n-\tret = generic_phy_get_by_name(dev, \"usb\", &priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to get %s usb PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-\tret = generic_phy_init(&priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to init %s USB PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-\tret = generic_phy_power_on(&priv->phy);\n-\tif (ret) {\n-\t\tpr_err(\"failed to power on %s USB PHY\\n\", dev->name);\n-\t\treturn ret;\n-\t}\n-\n-no_phy:\n-\tbus_priv->companion = true;\n-\n-\t/*\n-\t * This should go away once we've moved to the driver model for\n-\t * clocks resp. phys.\n-\t */\n-\treg_mask = ((uintptr_t)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST;\n-\tpriv->ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_OHCI0;\n-\textra_ahb_gate_mask = priv->cfg->extra_ahb_gate_mask;\n-\tpriv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK;\n-\tpriv->ahb_gate_mask <<= reg_mask * AHB_CLK_DIST;\n-\textra_ahb_gate_mask <<= reg_mask * AHB_CLK_DIST;\n-\tpriv->usb_gate_mask <<= reg_mask;\n-\n-\tsetbits_le32(&priv->ccm->ahb_gate0,\n-\t\t priv->ahb_gate_mask | extra_ahb_gate_mask);\n-\tsetbits_le32(&priv->ccm->usb_clk_cfg,\n-\t\t priv->usb_gate_mask | priv->cfg->extra_usb_gate_mask);\n-\tif (priv->cfg->has_reset)\n-\t\tsetbits_le32(priv->reset0_cfg,\n-\t\t\t priv->ahb_gate_mask | extra_ahb_gate_mask);\n-\n-\treturn ohci_register(dev, regs);\n-}\n-\n-static int ohci_usb_remove(struct udevice *dev)\n-{\n-\tstruct ohci_sunxi_priv *priv = dev_get_priv(dev);\n-\tfdt_addr_t base_addr = devfdt_get_addr(dev);\n-\tint ret;\n-\n-\tif (generic_phy_valid(&priv->phy)) {\n-\t\tret = generic_phy_exit(&priv->phy);\n-\t\tif (ret) {\n-\t\t\tpr_err(\"failed to exit %s USB PHY\\n\", dev->name);\n-\t\t\treturn ret;\n-\t\t}\n-\t}\n-\n-\tret = ohci_deregister(dev);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tif (priv->cfg->has_reset)\n-\t\tclrbits_le32(priv->reset0_cfg, priv->ahb_gate_mask);\n-\t/*\n-\t * On the A64 CLK_USB_OHCI0 is the parent of CLK_USB_OHCI1, so\n-\t * we have to wait with bringing down any clock until the last\n-\t * OHCI controller is removed.\n-\t */\n-\tif (!priv->cfg->extra_usb_gate_mask || base_addr == last_ohci_addr) {\n-\t\tu32 usb_gate_mask = priv->usb_gate_mask;\n-\n-\t\tusb_gate_mask |= priv->cfg->extra_usb_gate_mask;\n-\t\tclrbits_le32(&priv->ccm->usb_clk_cfg, usb_gate_mask);\n-\t}\n-\n-\tclrbits_le32(&priv->ccm->ahb_gate0, priv->ahb_gate_mask);\n-\n-\treturn 0;\n-}\n-\n-static const struct ohci_sunxi_cfg sun4i_a10_cfg = {\n-\t.has_reset = false,\n-};\n-\n-static const struct ohci_sunxi_cfg sun6i_a31_cfg = {\n-\t.has_reset = true,\n-\t.reset0_cfg_offset = SUN6I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct ohci_sunxi_cfg sun8i_h3_cfg = {\n-\t.has_reset = true,\n-\t.extra_ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_EHCI0,\n-\t.reset0_cfg_offset = SUN6I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct ohci_sunxi_cfg sun9i_a80_cfg = {\n-\t.has_reset = true,\n-\t.reset0_cfg_offset = SUN9I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct ohci_sunxi_cfg sun50i_a64_cfg = {\n-\t.has_reset = true,\n-\t.extra_ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_EHCI0,\n-\t.extra_usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK,\n-\t.reset0_cfg_offset = SUN6I_AHB_RESET0_CFG_OFFSET,\n-};\n-\n-static const struct udevice_id ohci_usb_ids[] = {\n-\t{\n-\t\t.compatible = \"allwinner,sun4i-a10-ohci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun5i-a13-ohci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun6i-a31-ohci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun7i-a20-ohci\",\n-\t\t.data = (ulong)&sun4i_a10_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-a23-ohci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-a83t-ohci\",\n-\t\t.data = (ulong)&sun6i_a31_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun8i-h3-ohci\",\n-\t\t.data = (ulong)&sun8i_h3_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun9i-a80-ohci\",\n-\t\t.data = (ulong)&sun9i_a80_cfg,\n-\t},\n-\t{\n-\t\t.compatible = \"allwinner,sun50i-a64-ohci\",\n-\t\t.data = (ulong)&sun50i_a64_cfg,\n-\t},\n-\t{ /* sentinel */ }\n-};\n-\n-U_BOOT_DRIVER(usb_ohci) = {\n-\t.name\t= \"ohci_sunxi\",\n-\t.id\t= UCLASS_USB,\n-\t.of_match = ohci_usb_ids,\n-\t.probe = ohci_usb_probe,\n-\t.remove = ohci_usb_remove,\n-\t.ops\t= &ohci_usb_ops,\n-\t.platdata_auto_alloc_size = sizeof(struct usb_platdata),\n-\t.priv_auto_alloc_size = sizeof(struct ohci_sunxi_priv),\n-\t.flags\t= DM_FLAG_ALLOC_PRIV_DMA,\n-};\ndiff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt\nindex 0d60da3f28..4cca3d1c73 100644\n--- a/scripts/config_whitelist.txt\n+++ b/scripts/config_whitelist.txt\n@@ -4611,7 +4611,6 @@ CONFIG_USB_EHCI_MX5\n CONFIG_USB_EHCI_MXC\n CONFIG_USB_EHCI_MXS\n CONFIG_USB_EHCI_SPEAR\n-CONFIG_USB_EHCI_SUNXI\n CONFIG_USB_EHCI_TEGRA\n CONFIG_USB_EHCI_TXFIFO_THRESH\n CONFIG_USB_EHCI_VCT\n@@ -4653,7 +4652,6 @@ CONFIG_USB_OHCI\n CONFIG_USB_OHCI_EP93XX\n CONFIG_USB_OHCI_LPC32XX\n CONFIG_USB_OHCI_NEW\n-CONFIG_USB_OHCI_SUNXI\n CONFIG_USB_OTG\n CONFIG_USB_OTG_BLACKLIST_HUB\n CONFIG_USB_PHY_CFG_BASE\n", "prefixes": [ "U-Boot", "v2", "18/53" ] }