From patchwork Thu Jun 28 14:32:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10494119 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 CD670603EE for ; Thu, 28 Jun 2018 14:37:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B876B2A0A2 for ; Thu, 28 Jun 2018 14:37:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC92C2A0BE; Thu, 28 Jun 2018 14:37:16 +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 3952B2A0A2 for ; Thu, 28 Jun 2018 14:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966685AbeF1OdY (ORCPT ); Thu, 28 Jun 2018 10:33:24 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:42175 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966648AbeF1OdT (ORCPT ); Thu, 28 Jun 2018 10:33:19 -0400 Received: by mail-wr0-f171.google.com with SMTP id p1-v6so5765115wrs.9 for ; Thu, 28 Jun 2018 07:33:18 -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=uc9DsLvuo9YkRZ27l37cWzXamU3JMdrZofUpXwWBSEI=; b=LJyZ7zXxD1xKXGnte/b4sm4paxZOnN5pjajrfN6S3fZ4wZt86SnEMO5WW1svS90e4+ mBUOjpuACCCMSSp/s7u6Tizij3KnaNtoL3Yh+na5xxG5TIptZTzjwA1KUqVVDPwJhyFS L4mHkbxl9Mf9oMeBAKbrmKiQV2Z9EbEfzd+M7OD4sQGB+YJw4EMqNLZR/oeLQDS7+wyG lkZOhtizAzWRR4EPLBY3Ic2THZAe/Fdhc3ka5k7YJ68qiB4S3ervhKk4R6ipkO+2PiDB O1tNhPYfJAsL29MOkJqNytN3F7fXXHphzhxEQ3fpgk1bBG+y49/ZC5Iqg4yorXu/DD82 FvpA== 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=uc9DsLvuo9YkRZ27l37cWzXamU3JMdrZofUpXwWBSEI=; b=BVMXpm3e+Kd4JhZlUWtqIZRouL18H5fOy0ALc8dM6yMD2TwJ/WVRm094HoSsoBrvW9 3c17MiPLq1ktpBC1opNXnb8KBv1IApFsxK1Rcav3XtyA1GKGTEEf+4FnwMn+CbchtBDL eYtj2+2KeRiANrOthveZdl445QJXusUbml+C1/X2pZROnrhBwWG29YqI45P7OumkXW0C tHdjglOzv92pQsLdEWTsymmnkcw4Sni+36XpV0IIaBoJV8mUAXGBXdcSXlXufkln3gKO dk8Z8a806dshKaT76rZxTUzVghBjxMMeSQkINWADygmKPQMx09W4smglz8Bk9kWQw+HK vIjg== X-Gm-Message-State: APt69E1iY7TCXI0INYpjEq7p+ir6NvQ8Tjdpz6ZaotBo73F03Tb6ZB1S LDTP6Fu4RGMXd33K8pMJuyxfzQ== X-Google-Smtp-Source: AAOMgpfAm8rPir5y+o7a+baHhcYZ/y6WkATIz9utkr+rGs7F0ybz340tPZOwtm/JfUI0sQq2kPRI4w== X-Received: by 2002:adf:9ed0:: with SMTP id b16-v6mr6035015wrf.170.1530196397931; Thu, 28 Jun 2018 07:33:17 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-87-41.w90-86.abo.wanadoo.fr. [90.86.29.41]) by smtp.gmail.com with ESMTPSA id 4-v6sm8037499wmh.14.2018.06.28.07.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 07:33:17 -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 , Jonathan Corbet 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 v3 07/18] ARM: davinci: mityomapl138: add nvmem cells lookup entries Date: Thu, 28 Jun 2018 16:32:33 +0200 Message-Id: <20180628143244.4561-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628143244.4561-1-brgl@bgdev.pl> References: <20180628143244.4561-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..b5be51c0451e 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_add_lookup_table(mityomapl138_nvmem_cells, + ARRAY_SIZE(mityomapl138_nvmem_cells)); mityomapl138_config_emac(); ret = da8xx_register_rtc();