Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3003833imm; Fri, 10 Aug 2018 02:00:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzZSr1zPSMbtiOh8SK6wTWb6eldfIc1mAJ56QjoHRBFIyn0sBSmfuHRX8L0ZaHEStdzAej8 X-Received: by 2002:a62:25c5:: with SMTP id l188-v6mr6111160pfl.179.1533891621972; Fri, 10 Aug 2018 02:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533891621; cv=none; d=google.com; s=arc-20160816; b=yvG9xwAFcq9yFiul7efHCHzeXfpznFpQ30tWKuDOMNnOe8Ht6rQ1HLXAZdeEmgsAEx P1ICf/hrc5bHCPrYxsnFfOgdxw0HG4fHAuCGDFV4GSGmLPKI7EkezpE1YWJIJxutf0uw 4g/c0HO8nYA2cae4iH1LMExgS/ET3djGe5ha/FlhP2HpJSsjxyEqs5ruo4Oea06ENZCZ 50T3a+j5rcVWm7tiBtPw0Q0mGR5073E6IeVDpGvNKclxl1m2SpIXCNMIzB0f+wHOKyis xt8vMeVm5XGxtRnOCwJAr7PE09ov2RsfB1oDHv/sSRQOSdwIIDxN/Bt822QwYfag493I nkrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FwyNGSHiOJtGONRaDr8ThVu1ERv+Zjqtryg9AOfSNOg=; b=tIerQfOI0+cllPXxdQ4TkqmsAharNksnVbl+mg0ETTPE2akPDBQdWvqkm5oHJ7nbbY fDPoHwlNIipdNrDW9KcsXlnek5O/eY/myMtpCBEd9ZvZ8TOroWyPerDoqfzL4Hd6I+AJ Rj6fRWPQ1MBj/MvG2WB30bO90KRo4r/cE0d/qFEQIAMeEVWiAnSDU5sbPON8O6RCpoFB B2OIj630xrzuPSkA20i2mQPcqF3rZhN60p1fSODEJio5aMYf0XE/q3YFj0ppF6NRtxtI 7cbdZ48OAcRElnrZsPvqrbpv0TBYMbQKmaWs2NZQaLqt/jQBo6vKA6JKhOqNnw4g38cD n4Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=hpbHyybq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k130-v6si10084582pfc.282.2018.08.10.02.00.07; Fri, 10 Aug 2018 02:00:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=hpbHyybq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbeHJKed (ORCPT + 99 others); Fri, 10 Aug 2018 06:34:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43698 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728011AbeHJKeb (ORCPT ); Fri, 10 Aug 2018 06:34:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id b15-v6so7446506wrv.10 for ; Fri, 10 Aug 2018 01:05:46 -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=FwyNGSHiOJtGONRaDr8ThVu1ERv+Zjqtryg9AOfSNOg=; b=hpbHyybqOz4E2uVHyVT+2GgLMXrKdt6w6C6XcRDtPYAW54YvGdyDToBmubnIZk9suH tOtjJw2FS2UqReoSnuvU4XivlJJUN8WiMeC1xwnpNq3rtBWrtWFtQ5VB8MYaLkCKoQ1Y eHgQ050yRpH7mCSqzyvgWT5NuflUn53IZqT1prc0qDrrWjkhQUzMFX36a7SHyaebOT/n TB4vJDBG+DPwD+V8QZzRCqLRHwuLEptjkuOC1MLRUTTzwE4k45rGO33kiJ5YgFsxL7wI LO6eHX6+Rf3F5UvAxT1TfsShXgNG71xGwSvRZ3gOVdhREWBCiAWtllK8F4zVEPtH4heU ImcQ== 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=FwyNGSHiOJtGONRaDr8ThVu1ERv+Zjqtryg9AOfSNOg=; b=DBRCBaWiMSWGHR/9HvUZ7dRDuRSYM3EItp0dw7yFDOn/8sD+6LzAdWQguLD2uOVF+9 4FGjTNga2jh5tHaSGnhtL6zJUv9WphB1c5u0nYJjwf8J7leX207gdpE/R2FiWP1JZjbl jbOf0Gd0zWOviV0IqHt7EOAStUs13FjQhMtjxjdQsB2OFhd/iRLSF7qeT88aAl26HOPT x01kDd25BEvyyL7Jn4AxbZnh5V1ImSK36oqrPwPJTZydje6qN1Dyz91xr+XOaLzHiLTW xTVZllvHnnCeXN35oaovE92UCY+mGL3kxXKL0oN60YLZVANNK7i1nPNtQ+h0XADneqhE ZZJQ== X-Gm-Message-State: AOUpUlFvvnwFgUOdadYR1xyIEXAYTy657pQhkLchGXtvfgIvg7IoxgV0 RMfSh9/HcF6UuqVJUFxOcjFCdA== X-Received: by 2002:a5d:5349:: with SMTP id t9-v6mr3377951wrv.186.1533888345376; Fri, 10 Aug 2018 01:05:45 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-MAR-1-609-89.w90-118.abo.wanadoo.fr. [90.118.185.89]) by smtp.gmail.com with ESMTPSA id h7-v6sm9546405wrs.8.2018.08.10.01.05.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:05:44 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 07/29] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Fri, 10 Aug 2018 10:05:04 +0200 Message-Id: <20180810080526.27207-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810080526.27207-1-brgl@bgdev.pl> References: <20180810080526.27207-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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..cf3f2e611228 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -22,6 +22,7 @@ #include #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") -- 2.18.0