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: 10488629 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 706CD602B3 for ; Tue, 26 Jun 2018 10:25:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6666D26E38 for ; Tue, 26 Jun 2018 10:25:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 592CD28606; Tue, 26 Jun 2018 10:25:40 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFF8A26E38 for ; Tue, 26 Jun 2018 10:25:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934791AbeFZKXa (ORCPT ); Tue, 26 Jun 2018 06:23:30 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:55460 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934746AbeFZKXX (ORCPT ); Tue, 26 Jun 2018 06:23:23 -0400 Received: by mail-wm0-f48.google.com with SMTP id v16-v6so1261194wmv.5 for ; Tue, 26 Jun 2018 03:23:22 -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=n3+Z8kvs4VzH/9VLCFWbkgcwTw4xFprqQoY+nsAROxSE2r5XbVrlcs7z8e5SL6TSM9 8iHbbMrA+1fSgyv/56VrYPJcEWbOI75UUvs5/fnPxocpzucOTs57bziJhJkdPNzaHRbT f3+9wWbjl8eRjNxkzrRGP6scs6rmsbG/4cdSHQTyg0EUE5c6bN2m/ubz98Js9X0loqre /8sY+Ulux7xSvrk9u92AC4Y1N2QfttNJ0WGkHRSCZcKsQB8WM+qPsJCWBcD5kQO9vFnQ rytRPEcTM7JexbGpdTJFHwjSu2PhD2VBLMl4DhYCZby6XwcUtRG4WmtCc293cJXza+hi 8Cgw== X-Gm-Message-State: APt69E2MRKxsAkLxwpRdTTsiCKzOaCXtcLIBcIqUP3vvCAYfVrPyQ9KK HGdGzjZ0eW8R2TyuQWjEn2jKWA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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();