From patchwork Sat Mar 18 17:13:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13179922 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E2F6C61DA4 for ; Sat, 18 Mar 2023 17:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NgnBrl5RVCklKn4uRhILRWC6AXbDoKDPyEnGqaC6iEA=; b=R3+wWL+LyT7P0S j1qwDPOAABpeYn8T5J6LMLV7XEpqMzBeMRINO3E1hVkjLS0gtZycQEdq9bqE7pKNdXCnYFv4DJABq VtCrL9ZsbU11VvkkA+M484uZCfmaWJjpy/EWfUdMn+GScJTLnXuI8nHadiC43Kmb3TuRSIglroRWY Jc0Mtdif+byivndb12Cw2iciUlZCWsFFv1UaC5cCRmpHmKLmDDNCxo4mXcPvd5uIqTX82dvBarEAm xXEcHkk3vVCeBLfTw7lQ+XXUGfirts6yA9TSKXoq2IPn2UqJUUnAe8+Ndqtn+t3SK9274QkhLzbHf NWIse+RvrJfR2JS1//Sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pda8L-0052xk-0Z; Sat, 18 Mar 2023 17:14:21 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pda8I-0052wn-0s for linux-arm-kernel@lists.infradead.org; Sat, 18 Mar 2023 17:14:19 +0000 Received: by mail-lj1-x235.google.com with SMTP id x36so8143142ljq.7 for ; Sat, 18 Mar 2023 10:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679159655; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=78t4Gb8Yu+T0jud32VqLBv00huqUTII4Y3HDon4R8gA=; b=oPP/nfFO1Sd8LBwgrIVKfT0hFGeBU0w1rxnUCMETf98bw043tRqnuJm4srgBJdue5C 4dIhquqzzCqmvYgYHMSzzCJI5DHeqLozu0yqahD/YOMjMkZwHtV2v8iA1z1j5/0dWM6q EprRqs3vTw9L6lMl+DwY7Kl7onPfpoLfpfUP5N1atUxIjnVBWEL0FPLfqC6b3T9Z4T6P Xs+1ctpdXq6W4HE21Mf9elSQZtgQYfnePr4/zHHGYMP834r44VDbvth9Hn39IcWTCW6/ 5azVZAgCJ04JuEA/8Y9RrMN/ISNgRyYHIbhbCgVWyh9/XfGyQbEFSX3pywJkwF8nzb4j hFdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679159655; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=78t4Gb8Yu+T0jud32VqLBv00huqUTII4Y3HDon4R8gA=; b=qdw90n+9rzQ1hSHqoMVM8xv+LucXT02t42UMwgD4Um41PDEi5AxLTODfFwd7muoHVA am5Tf5mqej7l/DEY0hTMxrOggGqUvFZW2u1dNtvnuFeLb1mzhWF1QLTH7ZmY9NqknckT 2MhfcbF4K2Up69w8ALMGQcLexqaG7bfJsoqlvZjOd3VHf1z4KM16rQ5Jn/NgUd1tzkUG PaU+rIXSi6lfxFBXXtXdem1RF4Z2F2Bxdx3SliWtEBRT0KhRhI86JCB3EPlETdZeTbKf 4ICE+AqeK7jXM6rruZrtvQTLwhCLoAYcRU84Y6AbcezugGx4jay8CaGoLZsBnubxqAZt tf1Q== X-Gm-Message-State: AO0yUKUObIvJ8uxS3WcfHj3IzLMdY3zzqvlb0NApH0fUhLtsUIE9iScA CtyfONRb7dldmCNGmHUckbQ= X-Google-Smtp-Source: AK7set9vm1kIBp2fvAvJ+Wyla2iE/3SWk1c3zwPjJ33Mj0VSwul0XYBD8qfWhLckUd1ANLuRaEt83g== X-Received: by 2002:a2e:9bc4:0:b0:29a:95d8:3e04 with SMTP id w4-20020a2e9bc4000000b0029a95d83e04mr2090020ljj.50.1679159654640; Sat, 18 Mar 2023 10:14:14 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id r9-20020a2e80c9000000b0029573844d03sm929221ljg.109.2023.03.18.10.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Mar 2023 10:14:13 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Miquel Raynal , Michael Walle , gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u-boot@lists.denx.de, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 0/3] nvmem: support post read for U-Boot's "ethaddr" Date: Sat, 18 Mar 2023 18:13:53 +0100 Message-Id: <20230318171356.29515-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230318_101418_336742_57A569AD X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki This change is required for NVMEM consumers to get expected MAC address from U-Boot env data variable "ethaddr". To address some previous concerns: 1. Yes, U-Boot env binding & driver should be converted to NVMEM layout 2. My priority is to get working MAC rather than fancy DT syntax 3. I AM going to convert U-Boot env into layout later 4. This work DOESN'T conflict with layout migration 5. This code WILL stay during / after layout migration My brain limitations don't allow me to handle everything at once, please let's review what I already have here. Rafał Miłecki (3): dt-bindings: nvmem: u-boot,env: add MAC's #nvmem-cell-cells nvmem: core: support specifying both: cell raw data & post read lengths nvmem: u-boot-env: post-process "ethaddr" env variable .../devicetree/bindings/nvmem/u-boot,env.yaml | 7 ++++- drivers/nvmem/Kconfig | 1 + drivers/nvmem/core.c | 11 +++++--- drivers/nvmem/u-boot-env.c | 26 +++++++++++++++++++ include/linux/nvmem-provider.h | 2 ++ 5 files changed, 42 insertions(+), 5 deletions(-)