Message ID | 20221128074901.8D80B135A@mail.steuer-voss.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5508385wrr; Mon, 28 Nov 2022 00:20:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf4vpFFT7fOkEOEgVU2oKg3l3s+WepgQssbZI2kla5ta8jb0kuGNQbDe48iSjv2/0Q2qayCr X-Received: by 2002:a17:907:c24a:b0:7ac:2e16:bc31 with SMTP id tj10-20020a170907c24a00b007ac2e16bc31mr2931310ejc.242.1669623627019; Mon, 28 Nov 2022 00:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669623627; cv=none; d=google.com; s=arc-20160816; b=J7VddeVX1BO2tr/4St0OWUCsUbiwZzvmNY0kLn9oqIWSy7j0jeauFYfsfUhC6fv+/o UHvzDmq94VuvOWQR/gsHjYVoTN+gObBHYVoYbJd2f+OC+kpPbObAe7BnZVREnE578R7N Rluz87aoZuiaVtFaYZG6eg5TzhRdl9OlemvbVfBIGAe90DotsCxdS8dkvzzBzsOlge3H JH80xALC59Sc0m4zeQxmStCuI07A2qfFg8ac0rK/GQI8SpEb2s3YULDVXSw0vCDI1cXb M1lEGKhgGYsrrZHY68DlXMMiid6Yg3VME0wwNIC3tgrm9DNs6+Y3V1hb2yMMDPMvYIJl s7OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:subject:date:cc:to:from; bh=PAsMpW3ilCet7g2vvXqKqttoKi5s8jP1ZHR03JoWsXM=; b=wYCgxTXpjdJscEhs6xaSYSi/PAvUmhSYJ/Oy4bo+EHqBHVDAeACyBbmsnUaY3EHCzX 81yhBKFav4imeoDf8dezvSs7bIr8VIhdKs8IGzn6Wb+ksCGYeONJuzGnccMEEt3ouDUA FNRnwBoE5EFS8vWH2hBXNib4x+jRusoUePBZfXWnj3BHEKoJIwCaLpinJeg5dDK9E5zo +xNXzDCzCljcBq8MVz2xkCjaS9jqO2i4coTsBuuOIyHAmXXEbV+ygpwo5WCF9EOT0qn2 iXznj90F4ooeAouvCeB3HKgjdUN3v2YPAN1sYhovZPdTzTP99GI0Gh5fydxA2ZCy+NBQ +gvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=haag-streit.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs13-20020a170906dc8d00b0078d4ba46622si10502074ejc.616.2022.11.28.00.20.03; Mon, 28 Nov 2022 00:20:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=haag-streit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbiK1H4o (ORCPT <rfc822;gah0developer@gmail.com> + 99 others); Mon, 28 Nov 2022 02:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbiK1H4l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 Nov 2022 02:56:41 -0500 X-Greylist: delayed 451 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 27 Nov 2022 23:56:38 PST Received: from mail.steuer-voss.de (mail.steuer-voss.de [85.183.69.95]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9049AA44E; Sun, 27 Nov 2022 23:56:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 8D80B135A; Mon, 28 Nov 2022 08:49:01 +0100 (CET) From: Nikolaus Voss <nikolaus.voss@haag-streit.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, nv@vosn.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Date: Thu, 24 Nov 2022 17:50:34 +0100 Subject: [PATCH 1/2] nvmem: imx-ocotp: reverse MAC on imx6qdl Message-Id: <20221128074901.8D80B135A@mail.steuer-voss.de> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750727264057025305?= X-GMAIL-MSGID: =?utf-8?q?1750727264057025305?= |
Series |
[1/2] nvmem: imx-ocotp: reverse MAC on imx6qdl
|
|
Commit Message
Nikolaus Voss
Nov. 24, 2022, 4:50 p.m. UTC
Ethernet MAC on iMX6Q/DL is stored in OTP in little-endian byte order. I
suspect that this is true for all iMX flavors. If so, we could get rid
of the .reverse_mac_address attribute entirely.
Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com>
---
drivers/nvmem/imx-ocotp.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hello Nikolaus, On 24.11.22 17:50, Nikolaus Voss wrote: > Ethernet MAC on iMX6Q/DL is stored in OTP in little-endian byte order. I > suspect that this is true for all iMX flavors. If so, we could get rid > of the .reverse_mac_address attribute entirely. I also think all i.MX flavors are similar here. The barebox driver has had a MAC address parsing function for a few years[1] and it's the same for all i.MX variants. The only different SoC is VF610, but that has a standalone driver in Linux. [1]: https://elixir.bootlin.com/barebox/v2022.11.0/source/drivers/nvmem/ocotp.c#L551 > Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Cheers, Ahmad > --- > drivers/nvmem/imx-ocotp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c > index 14284e866f26e..a39a0defb070a 100644 > --- a/drivers/nvmem/imx-ocotp.c > +++ b/drivers/nvmem/imx-ocotp.c > @@ -496,6 +496,7 @@ static const struct ocotp_params imx6q_params = { > .bank_address_words = 0, > .set_timing = imx_ocotp_set_imx6_timing, > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT, > + .reverse_mac_address = true, > }; > > static const struct ocotp_params imx6sl_params = {
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 14284e866f26e..a39a0defb070a 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -496,6 +496,7 @@ static const struct ocotp_params imx6q_params = { .bank_address_words = 0, .set_timing = imx_ocotp_set_imx6_timing, .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT, + .reverse_mac_address = true, }; static const struct ocotp_params imx6sl_params = {