From patchwork Thu Jun 28 14:32:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10494145 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 982EB603EE for ; Thu, 28 Jun 2018 14:38:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 806B62A0A4 for ; Thu, 28 Jun 2018 14:38:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 740072A0BE; Thu, 28 Jun 2018 14:38:41 +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 1A0AC2A0A4 for ; Thu, 28 Jun 2018 14:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966649AbeF1Oij (ORCPT ); Thu, 28 Jun 2018 10:38:39 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35869 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966622AbeF1OdP (ORCPT ); Thu, 28 Jun 2018 10:33:15 -0400 Received: by mail-wm0-f65.google.com with SMTP id u18-v6so9344796wmc.1 for ; Thu, 28 Jun 2018 07:33:14 -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=8vikMWRVd5RpNbpIMgIoO4AUKuTDf/0imXwnHOpRp0w=; b=xW/y215GlSBadHN52RnfIpsFowaA1AI0wsrYAd7ssAs+XAt3SSS0AtIxNA7IMBofdS guk1tabXrUU0w27ZnC+x++nmXHrVRZx/WDmokp3NGwn/+LM9Xq+7BFw+K5+8hq5Cryix SIRRrNzVSsvM/KDcB4p5jiUEhdmWrrBd9QFEg3CEfia7IoT22uZGPSWp7uhiKS4kOg3K VbIMtOENoa4e/pztNfk4fhIjPZiwHEe+IaRjnlo1LVOdc89APsA6koluAWMrHT6VD1FV pOMrchLXuZ4MebN4+TeIBeXNYBICuB3LnMLF1yJ7fZEi+RvltYw+xY/HEKvPRvxSRlec CUBA== 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=8vikMWRVd5RpNbpIMgIoO4AUKuTDf/0imXwnHOpRp0w=; b=YC1az2DOZJ5DDAfSsAiuNkUY5S36PBomFY9Ol68OBIYK187kuLl2Hqxrm+Q+bh0bVb OrugdSoeqRQVAuBqcuhFK/xQf6dkcnzTdF1xmXBjlkn/I2f01vvPG11nLTuXhAsHCyQ2 6DhW1awHyu1iNIdEaV8BtoG8CAAmBpBjkur8Ob97fAnM2/yHRipif2bo2fBo7VEgCEE+ AWvQ1OTy8U8o9Nvw32nVnP7bvb3/olyUvQ9DqwMiXfVymSQ5HAnh7kh89RmyAsxkJLrq QOC8zqmMu8d7Lt+MUWJE35KOToMpDQh32aPDj5SMmpNlL615ys7n1IqyV1woHw2MV3Wm e7Vg== X-Gm-Message-State: APt69E0TbY18nQLASWSMiV45GUcgShQcHg6M9Zrvzq43CtI2v5qsnvVm dHGrrNxWjc4eYDHvoeJ6A6BhwA== X-Google-Smtp-Source: AAOMgpcfZ88YhmHAEgyRsx1BLSKtfKtajgjhIpDDixA+zBfo2tdRB0/AqAgmuqqPDCTYzdYfgUhXvA== X-Received: by 2002:a1c:7d47:: with SMTP id y68-v6mr1935224wmc.62.1530196393996; Thu, 28 Jun 2018 07:33:13 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 07:33:13 -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 04/18] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Thu, 28 Jun 2018 16:32:30 +0200 Message-Id: <20180628143244.4561-5-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-dm644x-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 48436f74fd71..6d35c6e1b0bd 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -476,6 +477,15 @@ static struct pcf857x_platform_data pcf_data_u35 = { * - ... newer boards may have more */ +static struct nvmem_cell_lookup dm6446evm_mac_address_cell = { + .info = { + .name = "mac-address", + .offset = 0x7f00, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", +}; + static struct at24_platform_data eeprom_info = { .byte_len = (256*1024) / 8, .page_size = 64, @@ -828,6 +838,8 @@ static __init void davinci_evm_init(void) phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, davinci_phy_fixup); } + + nvmem_add_lookup_table(&dm6446evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")