From patchwork Tue Jun 26 10:22:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10488651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5817F602B3 for ; Tue, 26 Jun 2018 10:27:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B49C2886E for ; Tue, 26 Jun 2018 10:27:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 401CC28878; Tue, 26 Jun 2018 10:27:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BFED62886E for ; Tue, 26 Jun 2018 10:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RIJSCfWuu8CPNcVGewZhNvzXNYii5VyybDYuI0W7pMk=; b=kHWrA/xAC47S1zt9u6BuRISB/7 fZYdJUm2dwnXkHK/PybuPEIzEh4tZ/RkT4YNgRdT1y7xq4AdFRy48mIg98mJ1hSpMLNVocBFwwTpN mE2DFwvn2Vkwl+6x9p5ieIqYuqPVd7Q2QHq/VVBZ4w39avAi+V6wMQAqZYvownKH0sbxZep4xU9aL os0ks5rAecbfGtEj5SVYJCgmNhvbJScf34DRoYTVlpgK7KEszsHbVUo0eKJDh3S1zgxZHyWodnn+g o1+myry40r7LiW3b1OFRcyVAYXhzLCq28ZvBf9fYhYNJ6RZe6zurllksZMYS+QJtUQs9x7z4/UPRD We9SB8Rg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXlBm-0004vI-40; Tue, 26 Jun 2018 10:27:10 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXl8I-0001w7-PB for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 10:23:38 +0000 Received: by mail-wm0-x22c.google.com with SMTP id v16-v6so1261195wmv.5 for ; Tue, 26 Jun 2018 03:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hdmPjDSvWgFzi/ui3xXp3ufbDxi9LLAFx2+8+VRHKfA=; b=wlUZKtMDGsHfkupc1APfL2G0dnOb00u/nK4Tx67TO8lYIPQlJw8FW0URchiUlgDNM7 e5OtZ7C41nOhB8JZu5+t55IaGW6hlh/L1YNjeTZRS81IZrroe8IorAzc5S4IIELidhym OVCxfTl93G7ArWEgrLIuXZj4JwSTdCz+30c8QsrkMqokC/vlwvbxY8KH38dU1QgasbUJ VuKyTLEVofNhh0vj4oITPUt2SCEpVbwGtwU9z9IW61qb7x+Jx4zxCAeBtprhsxdCU4aS xns0ph4NpdhdzUaD+C7cq/YO2UmnC0leUOob0cRjG2csDAt4X+8KODAzqrN7UPSeu6QP 5gUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hdmPjDSvWgFzi/ui3xXp3ufbDxi9LLAFx2+8+VRHKfA=; b=tKR7CTOEnHQMZ3mHLblohi9XMhoceXXIgdDBufFrW9OKp+qNaEIYIqXcVulmDpeD3o zVbUgZ2HvkAzos5HkFSkFTxNScWUQh85RyM5N4czC5VWVnCbWFsznobcGmh/Qxw6mt0+ WrORX1fuylazsJ8AndlJdJnRQ18szC3pdIeCHCIyMZkJodLzFt39s88NcnrK10M/R+LT Jo0Xuc+w5ixXT99uxm3oJEAa7g24BipCcL/gqAsAMafaLxegNGhSn9S0JghlcA40eLBC Ta6kXbzgGt7Z7BusedwpoByAdbLzQKSLeG7PqOUbAXKAfYen3CyZoBYc0USVCK0iN7fD +OHg== X-Gm-Message-State: APt69E22DGD0dj+zvLXP/4i1DJGe2vc3IgjzzZZRZbno+tQ/5XUU+1p+ DcBJaCBFb602TnRZHIs2Oz0axQ== X-Google-Smtp-Source: AAOMgpeyzz3Q5XFfHsPANFtUwp7wACT4QVoZ8WsynwlwelV0Sw7JlEG88z7sQ+uoK1bZAtjf1HAxdA== X-Received: by 2002:a1c:694e:: with SMTP id e75-v6mr740355wmc.44.1530008602071; Tue, 26 Jun 2018 03:23:22 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-55-10.w2-15.abo.wanadoo.fr. [2.15.147.10]) by smtp.gmail.com with ESMTPSA id 203-v6sm2573852wmp.23.2018.06.26.03.23.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:23:21 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Lukas Wunner , Rob Herring , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn Subject: [PATCH v2 06/15] ARM: davinci: mityomapl138: add nvmem cells lookup entries Date: Tue, 26 Jun 2018 12:22:36 +0200 Message-Id: <20180626102245.30711-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626102245.30711-1-brgl@bgdev.pl> References: <20180626102245.30711-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_032334_832664_4D8D936D X-CRM114-Status: GOOD ( 14.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski We now support nvmem lookups for machine code. Add a lookup for mac-address. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-mityomapl138.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 37b3e48a21d1..2ec31ff61dbd 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -160,6 +161,25 @@ static void read_factory_config(struct nvmem_device *nvmem, void *context) mityomapl138_cpufreq_init(partnum); } +static struct nvmem_cell_lookup mityomapl138_nvmem_cells[] = { + { + .info = { + .name = "factory-config", + .offset = 0x0, + .bytes = sizeof(struct factory_config), + }, + .nvmem_name = "1-00500", + }, + { + .info = { + .name = "mac-address", + .offset = 0x64, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", + } +}; + static struct at24_platform_data mityomapl138_fd_chip = { .byte_len = 256, .page_size = 8, @@ -534,6 +554,8 @@ static void __init mityomapl138_init(void) if (ret) pr_warn("spi 1 registration failed: %d\n", ret); + nvmem_register_lookup(mityomapl138_nvmem_cells, + ARRAY_SIZE(mityomapl138_nvmem_cells)); mityomapl138_config_emac(); ret = da8xx_register_rtc();