Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp971437imm; Wed, 8 Aug 2018 08:39:20 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyqX1D+kSbs4qHULmzv/WAb5Gg6Wj8p0Sm7FHeD09tYfyP4yqFdmaoYNWZU75WOQ6ASUkKQ X-Received: by 2002:a17:902:6b05:: with SMTP id o5-v6mr3043364plk.338.1533742760850; Wed, 08 Aug 2018 08:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742760; cv=none; d=google.com; s=arc-20160816; b=07h/PiKjLyZbPVWOXtYhMLpGny7/UhFA6UltNoalRoHSd+vI4Umoi3CL1x+mnACzLZ nZofoxOTNeOFxhYLcxD5GYO+uZP+V7UMcUS2VjFrGQjbOm0advmCy1Pj6tXHQUojXBMy Nc8QIx3M65l+EayOEYXk7eSCmNC62YWxLzcIvIkxIzfILmoqS5825AaVhHVsfWO2yOOD VdMkCOwaEs/JCtxtzogU1e0J/YJniajwjm9pTL3fBmV9AwbuTZvSH6PrzHQbnheGRg0X qYjtI1a3yGy/iABBCE5vnGPpqpfg8IYmqFY5GMgzsY8Ai08DIVIfry1hWLCrxMfXNv48 BIOg== 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=3wRKI0ad1H2vl0yNJFc7xc7E5f/unJTGeQQy+eD1Wno=; b=ocJUg2cr0ypvsoFaCKlx9MYItFbymCFxNYhHwQwW/HQX9J0G2lWQSl8n+cSpDKaP6J Yx4aHiE1ph7IGf6nJ2dbPQUKPs3JKMgGUiN958jeplqNwN3Xgov1NUs64bK49T9jXoZ4 /vZyVEzbn1Z9b9tE3R3jHM/ms9Zfqg92kybO1Vx/RcCqxf3r90+58RPg4khqnkb/zsC9 AsXHkzlaqg9nvYRnTOEvjaF4mKMe5YUXKimCcPMXuuixvQ6T2pTYj9BwqJo57Wd52IyE DLX80BJw/TH7Lm+ltx9ZzFSJpnpUmieTCbdmQX25zWD4HQPCdEQhetDO8r1m+dnGyAiR wLRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=aJkLKR3b; 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 m76-v6si4674366pfg.323.2018.08.08.08.39.06; Wed, 08 Aug 2018 08:39:20 -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=aJkLKR3b; 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 S1730130AbeHHR5R (ORCPT + 99 others); Wed, 8 Aug 2018 13:57:17 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33697 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728232AbeHHRxx (ORCPT ); Wed, 8 Aug 2018 13:53:53 -0400 Received: by mail-wr1-f68.google.com with SMTP id g6-v6so2426058wrp.0 for ; Wed, 08 Aug 2018 08:33:42 -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=3wRKI0ad1H2vl0yNJFc7xc7E5f/unJTGeQQy+eD1Wno=; b=aJkLKR3bbxHEvPsHktybDHMDjy8Or0i5AfpgguA+wvFfLA/nY9ls2YSzs1tEKn4V9x P+o36ClWOqMj1Advaed1Z0ga5zZQdXXtWHsGQuqVnIkIvkVqyyeu/+/XyHHuaHHL+OZ2 rBcr2W0DMDRW8+D2HfoO06Zz6pnrDpvaZDQRRtuVPYXRx4/UE226U5DZnwqZG7LnaYAP hlpfBbBXv64mPAfxxOQjiXcdCbTLYXJaja25aXaFuJnrATzXhFrRxOkpHhk1ET0dfXlv h/LBjsVnENhIfMR+Ajx0LsK+BlrR/+YD5EJqHuouER3WZ0Z4UQWeUnssUSwycbROWtOC zclg== 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=3wRKI0ad1H2vl0yNJFc7xc7E5f/unJTGeQQy+eD1Wno=; b=BCCIUXR0o5K7Xoy/4Y4S7QIqx1AdZ4jK2AVH8xwKPyDch6vnPOSHvk9/uvph6bbZ+n HWYo78hRBbLYSIURpr4QjIcNV5XjZ16pdhkDNlax1sZKz42apOtIVwjNxarozHiBh+EO fPfxlpgrs4dVGAhXv6rYXaSr7yMwkQZHwJ/txP5P9fAdZUbasyQYZ3lTQLCLKeUk6QGr X4x5x3gejIXFmm8Q2Ntzfyhkrcf+CVC0y4Kw1xs/fvzZC/ivzUgUWUPW/7t/+wavnDOb xMq5tOQtfvXv8+3q8WHSk5Mh9uyJLAfYL3fYKPO0pzoNHCm0aBqAWJW/CJBRezhYyZMG wIBQ== X-Gm-Message-State: AOUpUlEJlBef/Xll/A/AzuJhje3iq5oIxEsJKM9GbVvvq//cKu1z5M9Z EvuxF2DkSbbpcJt4bKUxYLfGoA== X-Received: by 2002:adf:8362:: with SMTP id 89-v6mr2319554wrd.147.1533742421830; Wed, 08 Aug 2018 08:33:41 -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 s2-v6sm5240915wrw.52.2018.08.08.08.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:33:41 -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 08/28] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Wed, 8 Aug 2018 17:31:30 +0200 Message-Id: <20180808153150.23444-9-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180808153150.23444-1-brgl@bgdev.pl> References: <20180808153150.23444-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-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") -- 2.18.0