Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1421829/?format=api
{ "id": 1421829, "url": "http://patchwork.ozlabs.org/api/patches/1421829/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20210103092633.36226-14-jernej.skrabec@siol.net/", "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": "<20210103092633.36226-14-jernej.skrabec@siol.net>", "list_archive_url": null, "date": "2021-01-03T09:26:29", "name": "[13/17] net: sun8i-emac: Determine pinmux based on SoC, not EMAC type", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "40d2c3574052c665c7683877aaea70038b2b303f", "submitter": { "id": 70601, "url": "http://patchwork.ozlabs.org/api/people/70601/?format=api", "name": "Jernej Škrabec", "email": "jernej.skrabec@siol.net" }, "delegate": { "id": 114289, "url": "http://patchwork.ozlabs.org/api/users/114289/?format=api", "username": "apritzel", "first_name": "Andre", "last_name": "Przywara", "email": "andre.przywara@arm.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20210103092633.36226-14-jernej.skrabec@siol.net/mbox/", "series": [ { "id": 222511, "url": "http://patchwork.ozlabs.org/api/series/222511/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=222511", "date": "2021-01-03T09:26:16", "name": "sunxi: Introduce H616 support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/222511/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1421829/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1421829/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 spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=siol.net", "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=siol.net", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=siol.net", "phobos.denx.de;\n spf=pass smtp.mailfrom=jernej.skrabec@siol.net" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4D7tkf06y6z9sVq\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 3 Jan 2021 20:29:29 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 7964B826AA;\n\tSun, 3 Jan 2021 10:27:25 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 014AC8269F; Sun, 3 Jan 2021 10:27:23 +0100 (CET)", "from mail.siol.net (mailoutvs44.siol.net [185.57.226.235])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 3398E82694\n for <u-boot@lists.denx.de>; Sun, 3 Jan 2021 10:27:19 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n by mail.siol.net (Zimbra) with ESMTP id DFA80522D6C;\n Sun, 3 Jan 2021 10:27:18 +0100 (CET)", "from mail.siol.net ([127.0.0.1])\n by localhost (psrvmta12.zcs-production.pri [127.0.0.1]) (amavisd-new,\n port 10032)\n with ESMTP id 0MM9RyJ4toYy; Sun, 3 Jan 2021 10:27:18 +0100 (CET)", "from mail.siol.net (localhost [127.0.0.1])\n by mail.siol.net (Zimbra) with ESMTPS id 9FA00522D8D;\n Sun, 3 Jan 2021 10:27:18 +0100 (CET)", "from localhost.localdomain (89-212-178-211.dynamic.t-2.net\n [89.212.178.211]) (Authenticated sender: 031275009)\n by mail.siol.net (Zimbra) with ESMTPSA id 67638522D8C;\n Sun, 3 Jan 2021 10:27:16 +0100 (CET)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,\n SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2", "From": "Jernej Skrabec <jernej.skrabec@siol.net>", "To": "jagan@amarulasolutions.com,\n\tandre.przywara@arm.com", "Cc": "hdegoede@redhat.com, jernej.skrabec@siol.net, lukma@denx.de, hs@denx.de,\n peng.fan@nxp.com, joe.hershberger@ni.com, jh80.chung@samsung.com,\n u-boot@lists.denx.de, linux-sunxi@googlegroups.com", "Subject": "[PATCH 13/17] net: sun8i-emac: Determine pinmux based on SoC,\n not EMAC type", "Date": "Sun, 3 Jan 2021 10:26:29 +0100", "Message-Id": "<20210103092633.36226-14-jernej.skrabec@siol.net>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20210103092633.36226-1-jernej.skrabec@siol.net>", "References": "<20210103092633.36226-1-jernej.skrabec@siol.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "quoted-printable", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.102.3 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Andre Przywara <andre.przywara@arm.com>\n\n---\n drivers/net/sun8i_emac.c | 28 ++++++++++++++++++++--------\n 1 file changed, 20 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c\nindex 4524604126c9..7e57f1d01c8c 100644\n--- a/drivers/net/sun8i_emac.c\n+++ b/drivers/net/sun8i_emac.c\n@@ -85,7 +85,9 @@\n \n /* IO mux settings */\n #define SUN8I_IOMUX_H3\t\t2\n-#define SUN8I_IOMUX_R40\t5\n+#define SUN8I_IOMUX_R40\t\t5\n+#define SUN8I_IOMUX_H6\t\t5\n+#define SUN8I_IOMUX_H616\t2\n #define SUN8I_IOMUX\t\t4\n \n /* H3/A64 EMAC Register's offset */\n@@ -519,10 +521,10 @@ static int sun8i_emac_eth_start(struct udevice *dev)\n \n static int parse_phy_pins(struct udevice *dev)\n {\n-\tstruct emac_eth_dev *priv = dev_get_priv(dev);\n \tint offset;\n \tconst char *pin_name;\n \tint drive, pull = SUN4I_PINCTRL_NO_PULL, i;\n+\tu32 iomux;\n \n \toffset = fdtdec_lookup_phandle(gd->fdt_blob, dev_of_offset(dev),\n \t\t\t\t \"pinctrl-0\");\n@@ -549,6 +551,21 @@ static int parse_phy_pins(struct udevice *dev)\n \telse if (fdt_get_property(gd->fdt_blob, offset, \"bias-pull-down\", NULL))\n \t\tpull = SUN4I_PINCTRL_PULL_DOWN;\n \n+\t/*\n+\t * The GPIO pinmux value is an integration choice, so depends on the\n+\t * SoC, not the EMAC variant.\n+\t */\n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3))\n+\t\tiomux = SUN8I_IOMUX_H3;\n+\telse if (IS_ENABLED(CONFIG_MACH_SUN8I_R40))\n+\t\tiomux = SUN8I_IOMUX_R40;\n+\telse if (IS_ENABLED(CONFIG_MACH_SUN50I_H6))\n+\t\tiomux = SUN8I_IOMUX_H6;\n+\telse if (IS_ENABLED(CONFIG_MACH_SUN50I_H616))\n+\t\tiomux = SUN8I_IOMUX_H616;\n+\telse\n+\t\tiomux = SUN8I_IOMUX;\n+\n \tfor (i = 0; ; i++) {\n \t\tint pin;\n \n@@ -561,12 +578,7 @@ static int parse_phy_pins(struct udevice *dev)\n \t\tif (pin < 0)\n \t\t\tcontinue;\n \n-\t\tif (priv->variant == H3_EMAC)\n-\t\t\tsunxi_gpio_set_cfgpin(pin, SUN8I_IOMUX_H3);\n-\t\telse if (priv->variant == R40_GMAC || priv->variant == H6_EMAC)\n-\t\t\tsunxi_gpio_set_cfgpin(pin, SUN8I_IOMUX_R40);\n-\t\telse\n-\t\t\tsunxi_gpio_set_cfgpin(pin, SUN8I_IOMUX);\n+\t\tsunxi_gpio_set_cfgpin(pin, iomux);\n \n \t\tif (drive != ~0)\n \t\t\tsunxi_gpio_set_drv(pin, drive);\n", "prefixes": [ "13/17" ] }