From patchwork Fri Jun 29 09:40:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10496039 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 E24066022E for ; Fri, 29 Jun 2018 09:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C771C298D4 for ; Fri, 29 Jun 2018 09:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB035298DA; Fri, 29 Jun 2018 09:47:32 +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 64BB0298D4 for ; Fri, 29 Jun 2018 09:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846AbeF2Jqx (ORCPT ); Fri, 29 Jun 2018 05:46:53 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:45987 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754653AbeF2Jku (ORCPT ); Fri, 29 Jun 2018 05:40:50 -0400 Received: by mail-wr0-f196.google.com with SMTP id u7-v6so8202255wrn.12 for ; Fri, 29 Jun 2018 02:40:49 -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=gAqKxmwQ6nNvtV8JzUC0NcVxi+XZIxU9MdjN+s8vFbeI6e5d+bZ49ObILCbbdek8o+ wodO+sE/AMoAvg0seWrqzHe1stZ/TvPSRIpJz1WC81akB17BlNWZCsZu737wvAY9fT2W c9cprrVKAmZ3ATc4Cc8Y3mpN1yPNdHKyw1ln4TGNQ11WeYrIu6lEVz9cjWYb37X6OF8m 8hEIQZYIvlgPUF2Z29ctA5+atB00SUmFEaVP+xhTz3tPDsYZd7kb1ofbcmRGwWT7xTGy wSxXAfsdWP6ESDmno+Qodi3lfhxle1DBzJenj4B7bamWcR8ybI6w4ebq+ezd9lcTYDAR /4Lg== 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=BzRN2I/3qAL/Nz75BhRVWxq0mUsmlNgL7rW34zbxo/8Pr3YJ+W4FZCiOjqDxcA+DNG r+COxx64IeA/lFe5/mqSYYZ3EynewTm255jneT55ZvWMAO8w+dfzo+JtUwiaZ12SO6Sc 4DEdIiB3utubfwJhLbaZ23GfGppqZV8ZXgZqwQu2NvCCqh1kr10f4pkk/oMK5mAqa1Ij zkjApG2nyjuOLk+QxdCfCL87nyVa0I1hf5gouvTCc1Ifj2JTDHkTN31Vk/KTPgAtryH5 ueh6XtkjzZLyqW7+YT5H3WXxjSwq3E4KumUAZ9rKYYMCa80kKz8EfrJjv8FvXO84sZrr GbgQ== X-Gm-Message-State: APt69E1nnqTGsBxca0wMY6XjcuIsDeIsnMpQ3MLd0VvirBEkD8oOafyt R/4n6fvNtGiWMuyRC1LCpDTW31fZjzo= X-Google-Smtp-Source: AAOMgpf1qN5eVzpltpqvBoH+9Bc1OEfaP87a/MtRLl4vDZJuAGVGtKWtPYFfIyPkxQKMOWT39nwJSA== X-Received: by 2002:adf:b219:: with SMTP id u25-v6mr11586114wra.1.1530265248807; Fri, 29 Jun 2018 02:40:48 -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 d102-v6sm1386394wma.10.2018.06.29.02.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:48 -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 v4 04/18] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:25 +0200 Message-Id: <20180629094039.7543-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-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")