From patchwork Fri Jun 29 09:40:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10496029 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 675716016C for ; Fri, 29 Jun 2018 09:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42FC29889 for ; Fri, 29 Jun 2018 09:46:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7A11298A6; Fri, 29 Jun 2018 09:46:56 +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 6E66829889 for ; Fri, 29 Jun 2018 09:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753856AbeF2Jqy (ORCPT ); Fri, 29 Jun 2018 05:46:54 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:43361 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753286AbeF2Jks (ORCPT ); Fri, 29 Jun 2018 05:40:48 -0400 Received: by mail-wr0-f193.google.com with SMTP id c5-v6so8198210wrs.10 for ; Fri, 29 Jun 2018 02:40:48 -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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=AUQcx8MSzvEVx8ntynYLAJtPX8iUcOhCeWYtwDHS3SSx4CYQShmQrZWhnqLS6xvc4P pjYsadgXaEe6c8KhwSIH/csBXbYLxRi5BmoiM8BTIX+B/g6uuEEAeYZSIIiDhhyYDiVJ NWr4hWwsu1BHI7qap/QjZmGwdy4G9t/cr7Kj0zPwoBRHMShlcQV0m+qy1z0QNFUvvNjl HivVRB0fO4HCCp/hTKKKBT0Ho7Yf07KhoMb0sxw9Ug+fG5CDwNOH28MXTdJOEdFapTa2 sNOxsbC999XRVJnB90/GmpSvRBrFM+BzPEhJ//wrc6wztUDVkvhnGxhtcPG2Di0a5mTi xeUg== 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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=clDDkDJF2o0/4LHke86b5mhxicj1sh3CKaqec9bMXUXpZA/F74t9asfYBi3sGH10Bi kZ7sy0l39q2CW0XFKtbZYIDF19PWWvqO8EVcKj967WcT/TSNaQwuEXMKto8xClGr2t7J Mv4wNYuXXAHVZZ2WFqiOq2ylxJ76X7Agxlj9wCGhg+ubTTn2+wU9sCttIOEH/wbuSYZt Ope/ElJ42CBiwwm7uHR0OxpuYp4a3CzR9h5SwBzZpzZMGn4AaDDz/k40LBlawX1bMC3e Wat/6i0IJbQBXYFEqsWmNVKMclzbpF8YCfwVoyzV79cjsQOAOZeamAICh2RIjbLgLVuF wiRA== X-Gm-Message-State: APt69E2aaX7U/vmcfodKdkLTYD6A5DdwSBCFpvy2DZ0F310iT/E4nXmN hFdStp8tQCr4JKP3d21+ImvJLg== X-Google-Smtp-Source: AAOMgpdVKHR98lL4fAH29/Ozh9Cai9N+wq9O51qgZ/4JKXUocxrnWp6lz7T65Wu94PbQMVH6cqkMSA== X-Received: by 2002:adf:a963:: with SMTP id u90-v6mr11131948wrc.248.1530265247510; Fri, 29 Jun 2018 02:40:47 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:46 -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 03/18] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:24 +0200 Message-Id: <20180629094039.7543-4-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-dm365-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 435f7ec7d9af..cb0ac92a278e 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,15 @@ static struct platform_device davinci_nand_device = { }, }; +static struct nvmem_cell_lookup dm365evm_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, @@ -769,6 +779,8 @@ static __init void dm365_evm_init(void) dm365_init_spi0(BIT(0), dm365_evm_spi_info, ARRAY_SIZE(dm365_evm_spi_info)); + + nvmem_add_lookup_table(&dm365evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")