Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229932/?format=api
{ "id": 2229932, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229932/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260428-net-macb-support-for-feature-lite-instances-v1-3-480e4cecac01@nanoxplore.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260428-net-macb-support-for-feature-lite-instances-v1-3-480e4cecac01@nanoxplore.com>", "date": "2026-04-28T18:04:07", "name": "[3/4] net: macb: do not set user_io when it does not exist", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6ba9b4af075c3cf716268df9c3dccad79e33af0d", "submitter": { "id": 93277, "url": "http://patchwork.ozlabs.org/api/1.1/people/93277/?format=api", "name": "Christian DREHER via B4 Relay", "email": "devnull+christian.dreher.nanoxplore.com@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260428-net-macb-support-for-feature-lite-instances-v1-3-480e4cecac01@nanoxplore.com/mbox/", "series": [ { "id": 501943, "url": "http://patchwork.ozlabs.org/api/1.1/series/501943/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=501943", "date": "2026-04-28T18:04:05", "name": "net: macb: support for instances with less features", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501943/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229932/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229932/checks/", "tags": {}, "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=JEgxlUAv;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"JEgxlUAv\";\n\tdkim-atps=neutral", "phobos.denx.de; dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org", "phobos.denx.de; spf=pass\n smtp.mailfrom=devnull+christian.dreher.nanoxplore.com@kernel.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4wbC5hzyz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 08:48:55 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 5934F846C8;\n\tWed, 29 Apr 2026 00:48:18 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 031F88465E; Tue, 28 Apr 2026 20:04:53 +0200 (CEST)", "from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 69CF584669\n for <u-boot@lists.denx.de>; Tue, 28 Apr 2026 20:04:48 +0200 (CEST)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id E164244064;\n Tue, 28 Apr 2026 18:04:46 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPS id C7BDBC2BCB7;\n Tue, 28 Apr 2026 18:04:46 +0000 (UTC)", "from aws-us-west-2-korg-lkml-1.web.codeaurora.org\n (localhost.localdomain [127.0.0.1])\n by smtp.lore.kernel.org (Postfix) with ESMTP id C013EFF886D;\n Tue, 28 Apr 2026 18:04:46 +0000 (UTC)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1777399486;\n bh=cFFsDEuRX70J4rTHrmbPpO8/BDkt34P6VLGK/RvMGhw=;\n h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n b=JEgxlUAv+RF2gdvtWL0zfXmo/ExB1A68gbgfH3koQ5N0jjJ8kiimj9KlP1zm7Nm0M\n nuTQgIKb2V08ETFpZ+tS5s2/dq9SH5mJ50PLp6O8RHbI4V9tHH583sJn0B13qvmqs4\n OAxDDWEhlUsX5FHZmXa3nCuKNeKhzWBk9Ykl2rBEJnta3luOvUGSeQzSH0x0CmoAvn\n m+ycq2ta3SRcpHG7cgE+LoIycsH3xlPtCrtO3U5/H+4tdiTUpA3xhEx159BaTEnJvY\n 1Hdo9Q+9aDwXPn840/z9Ce4qhPi+/HHDkg1zGvM/fEKKdoS/zeJrWzh3NQxQhgyxiv\n xPvnd7EYY0x8Q==", "From": "Christian DREHER via B4 Relay\n <devnull+christian.dreher.nanoxplore.com@kernel.org>", "Date": "Tue, 28 Apr 2026 20:04:07 +0200", "Subject": "[PATCH 3/4] net: macb: do not set user_io when it does not exist", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "\n <20260428-net-macb-support-for-feature-lite-instances-v1-3-480e4cecac01@nanoxplore.com>", "References": "\n <20260428-net-macb-support-for-feature-lite-instances-v1-0-480e4cecac01@nanoxplore.com>", "In-Reply-To": "\n <20260428-net-macb-support-for-feature-lite-instances-v1-0-480e4cecac01@nanoxplore.com>", "To": "u-boot@lists.denx.de", "Cc": "Jerome Forissier <jerome.forissier@arm.com>,\n Tom Rini <trini@konsulko.com>,\n Christian DREHER <christian.dreher@nanoxplore.com>", "X-Mailer": "b4 0.15.2", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1777399485; l=3683;\n i=christian.dreher@nanoxplore.com; s=20260428; h=from:subject:message-id;\n bh=azfemyGZY4URq8jSKvMACBdrUxtdTLkpvC20Z3LnAS4=;\n b=3XnWTuEJnfLwpj/f0+sHJTsXq0+k8Anw9xnbR4N9uvZGXSIyIp+2ksxRLnNO7AJ42frj4sBjx\n 1nNnix1yrvtCzn3kTZmRZlN/2CNS1nbRsR5/cj2SBIGi6kqP4ZJ5wxS", "X-Developer-Key": "i=christian.dreher@nanoxplore.com; a=ed25519;\n pk=id7EcKmXLV2xNgNiCIcsPjkoMQHM/qxTYqEqMhidSAU=", "X-Endpoint-Received": "by B4 Relay for\n christian.dreher@nanoxplore.com/20260428 with auth_id=760", "X-Original-From": "Christian DREHER <christian.dreher@nanoxplore.com>", "X-Mailman-Approved-At": "Wed, 29 Apr 2026 00:48:15 +0200", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "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>", "Reply-To": "christian.dreher@nanoxplore.com", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Christian DREHER <christian.dreher@nanoxplore.com>\n\nCadence Ethernet MAC has a feature named user_io, which provides\nsome input and some output signals for arbitrary purpose in the SoC.\nFrom the driver code, I understand that, on Atmel SoC, it is used to\ndrive the PHY mode.\n\nAt least on Cadence IP7014 r1p12, this feature is optional, and I am\nworking on a SoC that does not instantiate it. The presence of this\nfeature is advertised in DCFG1, this patch merely disables the access\nto the user_io register based on this information.\n\nI did not apply this change to the non-gigabit capable versions of\nthe IP, as I do not have documentation for them, and a new non-gigabit\ninstance is unlikely to appear. I prefer avoiding regressions on old\nsystems.\n\nSigned-off-by: Christian DREHER <christian.dreher@nanoxplore.com>\n---\n drivers/net/macb.c | 51 ++++++++++++++++++++++++++++++++-------------------\n drivers/net/macb.h | 2 ++\n 2 files changed, 34 insertions(+), 19 deletions(-)", "diff": "diff --git a/drivers/net/macb.c b/drivers/net/macb.c\nindex 807a038e071..5cc29ecb214 100644\n--- a/drivers/net/macb.c\n+++ b/drivers/net/macb.c\n@@ -927,26 +927,39 @@ static int _macb_init(struct udevice *dev, const char *name)\n \t\t/* Check the multi queue and initialize the queue for tx */\n \t\tgmac_init_multi_queues(macb);\n \n-\t\t/*\n-\t\t * When the GMAC IP with GE feature, this bit is used to\n-\t\t * select interface between RGMII and GMII.\n-\t\t * When the GMAC IP without GE feature, this bit is used\n-\t\t * to select interface between RMII and MII.\n+\t\t/* This driver uses the user I/O to select the PHY features,\n+\t\t * but some GEM instances come with a fixed configuration and\n+\t\t * no USERIO.\n \t\t */\n-\t\tif (macb->phy_interface == PHY_INTERFACE_MODE_RGMII ||\n-\t\t macb->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||\n-\t\t macb->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||\n-\t\t macb->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID)\n-\t\t\tval = macb->config->usrio->rgmii;\n-\t\telse if (macb->phy_interface == PHY_INTERFACE_MODE_RMII)\n-\t\t\tval = macb->config->usrio->rmii;\n-\t\telse if (macb->phy_interface == PHY_INTERFACE_MODE_MII)\n-\t\t\tval = macb->config->usrio->mii;\n-\n-\t\tif (macb->config->caps & MACB_CAPS_USRIO_HAS_CLKEN)\n-\t\t\tval |= macb->config->usrio->clken;\n-\n-\t\tgem_writel(macb, USRIO, val);\n+\t\tif (gem_readl(macb, DCFG1) & GEM_BIT(USERIO)) {\n+\t\t\t/*\n+\t\t\t * When the GMAC IP with GE feature, this bit is used to\n+\t\t\t * select interface between RGMII and GMII.\n+\t\t\t * When he GMAC IP without GE feature, this bit is used\n+\t\t\t * to select interface between RMII and MII.\n+\t\t\t */\n+\t\t\tswitch (macb->phy_interface) {\n+\t\t\tcase PHY_INTERFACE_MODE_RGMII:\n+\t\t\tcase PHY_INTERFACE_MODE_RGMII_ID:\n+\t\t\tcase PHY_INTERFACE_MODE_RGMII_RXID:\n+\t\t\tcase PHY_INTERFACE_MODE_RGMII_TXID:\n+\t\t\t\tval = macb->config->usrio->rgmii;\n+\t\t\t\tbreak;\n+\t\t\tcase PHY_INTERFACE_MODE_RMII:\n+\t\t\t\tval = macb->config->usrio->rmii;\n+\t\t\t\tbreak;\n+\t\t\tcase PHY_INTERFACE_MODE_MII:\n+\t\t\t\tval = macb->config->usrio->mii;\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tif (macb->config->caps & MACB_CAPS_USRIO_HAS_CLKEN)\n+\t\t\t\tval |= macb->config->usrio->clken;\n+\n+\t\t\tgem_writel(macb, USRIO, val);\n+\t\t}\n \n \t\tif (macb->phy_interface == PHY_INTERFACE_MODE_SGMII) {\n \t\t\tunsigned int ncfgr = macb_readl(macb, NCFGR);\ndiff --git a/drivers/net/macb.h b/drivers/net/macb.h\nindex 0eb90574618..002d5bd31b2 100644\n--- a/drivers/net/macb.h\n+++ b/drivers/net/macb.h\n@@ -443,6 +443,8 @@\n #define MACB_REV_SIZE\t\t\t\t16\n \n /* Bitfields in DCFG1. */\n+#define GEM_USERIO_OFFSET\t\t\t9\n+#define GEM_USERIO_SIZE\t\t\t\t1\n #define GEM_IRQCOR_OFFSET\t\t\t23\n #define GEM_IRQCOR_SIZE\t\t\t\t1\n #define GEM_DBWDEF_OFFSET\t\t\t25\n", "prefixes": [ "3/4" ] }