From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartosz Golaszewski Subject: [PATCH 02/14] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:13 +0200 Message-ID: <20180625155025.12567-3-brgl@bgdev.pl> References: <20180625155025.12567-1-brgl@bgdev.pl> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, 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 Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:35865 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611AbeFYPvV (ORCPT ); Mon, 25 Jun 2018 11:51:21 -0400 Received: by mail-wm0-f67.google.com with SMTP id u18-v6so6105772wmc.1 for ; Mon, 25 Jun 2018 08:51:21 -0700 (PDT) In-Reply-To: <20180625155025.12567-1-brgl@bgdev.pl> Sender: netdev-owner@vger.kernel.org List-ID: 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..df640d977bfa 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_register_lookup(&dm365evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") -- 2.17.1