From patchwork Wed Jun 5 19:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1944124 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=T0RGS0sM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vvd743pZfz20Q5 for ; Thu, 6 Jun 2024 05:38:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EEA8688414; Wed, 5 Jun 2024 21:37:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T0RGS0sM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 141EF882E6; Wed, 5 Jun 2024 21:03:47 +0200 (CEST) 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2F87F88261 for ; Wed, 5 Jun 2024 21:03:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ansuelsmth@gmail.com Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4213485697fso2140475e9.1 for ; Wed, 05 Jun 2024 12:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717614224; x=1718219024; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kr80qGA8fTtmGld4Thh3XY/hn2vKZu79T8rEjD9KMoo=; b=T0RGS0sMs+YRhZ1IgYnNP5LWQ0LOQcFBD4vwDP8qRZL/M6i6Gp8WEpj821SzPXiXtX RjwN2m1Zf8mYX5i0N4+z0PbimPrUZbce/5rW7oFpy4pkF+vNHrBaAGt48zWAIB+m/HTO j8P2v2pKvnfvd1TUpThNcbijckCYXmBp1YU+LP77dZq5SMHVBVaHePJiyqqdnvzgGZBv ubDKMAnnqQwlasDP0xcWsRh7qQ6BHvPsmMMDcJ40JF+8/Sv38J67RtWcU0nPS9hs1TWt hJCYuK7efvo6yFvCc0/9dou5EsuqC7hFnQdoqRNXpNTJHdPAM7Xjkaeemch/WyyzqFhz RbkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717614224; x=1718219024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kr80qGA8fTtmGld4Thh3XY/hn2vKZu79T8rEjD9KMoo=; b=WdDywWq7fTDbtcQ1FsGyR++rxpyNf9qd+JGT0owRqNIRDV9Bhmk484W6xaqNstyPUT 08kvZSWMMM2cuUO3GRfc7OvRUmjLopckT446DvlTdd8UM4xA7eCsBQHue41/0biPtSUB aTuY+elLQQFmKBQFSFUHQH6B+W4tOe+pxRgfuJ42agzJGDCAFZcWMhpDiJwK+D+BWFyx DKz4uDnfzsQvR8Nam8LrJ7ABHnwmGma/R+YSb9IJhkj4OaljZJE88fEjSJCpFzQfAvkS 2oEzglR6W2aaF99eEylu9aa3ilwQDoCn7Fg1vx7g1xntptjqFB8ERKG4IPIyD/vD+muo DHVA== X-Forwarded-Encrypted: i=1; AJvYcCV2NKphb2f+3NSeOyeiRPquAl1qcm79lRj8e/+1kI6aPJOTVYw7xdO42qRlF7qyp2LPJaaAyNvWYvvDCnNY5ZTCg3yYPA== X-Gm-Message-State: AOJu0YyRzxeCnSN9D6N9SRvqtBS9VRkmX4CnW6YMuDrg82YjaxTLyAot do7v752u+OlUaxe1VzJJQRnJRqosO00Qtz8/hJ/yNyolEWAK62WF X-Google-Smtp-Source: AGHT+IFzLMHIiQTWILsOVgyiPA4WF0QOn97BSkqFIeETD+Dvc6dKmP8GcZM47yUzhSoCvCuBo4jg/A== X-Received: by 2002:a05:600c:138e:b0:41f:e56c:ef81 with SMTP id 5b1f17b1804b1-421562cf5f9mr25400085e9.1.1717614224529; Wed, 05 Jun 2024 12:03:44 -0700 (PDT) Received: from localhost.localdomain (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4214a4abdd5sm44772195e9.0.2024.06.05.12.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 12:03:44 -0700 (PDT) From: Christian Marangi To: Tom Rini , Lukasz Majewski , Sean Anderson , Ryder Lee , Weijie Gao , Chunfeng Yun , GSS_MTK_Uboot_upstream , Heiko Schocher , Peng Fan , Jaehoon Chung , Joe Hershberger , Ramon Fried , Jagan Teki , Christian Marangi , Sam Shih , Francois Berder , Simon Glass , Julien Masson , Peter Robinson , Marek Vasut , Bo-Cun Chen , This contributor prefers not to receive mails , Michal Simek , John Crispin , Heinrich Schuchardt , Mason Huo , Stefan Roese , Sumit Garg , Mark Kettenis , Sergei Antonov , Mayuresh Chitale , "SkyLake.Huang" , =?utf-8?q?Nicol=C3=B2_Verones?= =?utf-8?q?e?= , u-boot@lists.denx.de Subject: [PATCH 04/11] net: mediatek: handle alternative name for pn_swap property Date: Wed, 5 Jun 2024 21:02:11 +0200 Message-ID: <20240605190220.17616-5-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605190220.17616-1-ansuelsmth@gmail.com> References: <20240605190220.17616-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 05 Jun 2024 21:37:35 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Handle alternative name for pn_swap property as upstream linux use mediatek,pnswap. Signed-off-by: Christian Marangi --- drivers/net/mtk_eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index 75e7bcf83b7..87e2e1d9cda 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -1965,7 +1965,9 @@ static int mtk_eth_of_to_plat(struct udevice *dev) return -ENODEV; } - priv->pn_swap = ofnode_read_bool(args.node, "pn_swap"); + /* Upstream linux use mediatek,pnswap instead of pn_swap */ + priv->pn_swap = ofnode_read_bool(args.node, "pn_swap") || + ofnode_read_bool(args.node, "mediatek,pnswap"); } else if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII) { /* get corresponding usxgmii phandle */ ret = dev_read_phandle_with_args(dev, "mediatek,usxgmiisys",