Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp970807imm; Wed, 8 Aug 2018 08:38:47 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzKmsxQyNYhPtdx+Fc3/RKazi97DBltxCkaOW9zDgKjCl8GTJDeur4jxiyLoS55aWEc5Z44 X-Received: by 2002:a17:902:934c:: with SMTP id g12-v6mr3085651plp.67.1533742727517; Wed, 08 Aug 2018 08:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742727; cv=none; d=google.com; s=arc-20160816; b=wALiG1gkz22JcprNY1dvaPL2gf4vgdK8z8wkvi4T/chGAMwPbBk0QLNtUttdOWr4a3 qisAsvvUNW8hpY5vqWpBom7Tbuai8i/89qRoBaTltKp5Sf6igVDrOvJ1Mi5cJdW3uJ1I S9exS+l4eK+slJQ01RObgmIgAZ2VyVo51H/cU4X8NhpaeIoDCtPIl7T3dn6qeK3K7B7/ CNtPNsrN+DyXg7lcZHDY3vgSjWrUQ1JFy+rG/aSfUA3R2YgxrIFCCqn5vMdA9FKOx2WH 5nzf5Idx93Da+N9zErZja6/b2lxoCB8HKxWweVjnbgjxugI9FjMSR0pxXa7fV/vp8HRl H1UA== 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=fI+k8Vv3yG+m9/MHc2+cp7aa8pgPxuuoC1DpPepTxjM=; b=Jhxqn7fm7UN08fcPrvqafGVLzoLHXIxaJ8SeW/ukBW8nGSPQAcU6SvjDKqHYUQUwPf S9jb5iSW5odTTPAI23G+uE3/bQR2TlY7zabIKqj9XY2EsLeleg5ID5wUO7VQWmQyONfO 269mp2M/QjTuzeuu88HWJIFxe9cz/GbbepNeTeikTtflsW6Pg0iG0AxjLaPH/jJcgkKq v8hrlpGfqUJ6gk/R8zS3tOsB6tp5vwlD7qkVi8vezHExKkD3qDrgbL9fmeGm9LA7fKwP en27T5okKygOERNlybgxjBW/EZKeoN/7+5XkFLVgY7sJs7jCqyVNpbFXbJqAcYJTS39h r2IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=wrfabtZw; 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 28-v6si4390315pgk.111.2018.08.08.08.38.32; Wed, 08 Aug 2018 08:38:47 -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=wrfabtZw; 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 S1728450AbeHHRx5 (ORCPT + 99 others); Wed, 8 Aug 2018 13:53:57 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35741 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728167AbeHHRx4 (ORCPT ); Wed, 8 Aug 2018 13:53:56 -0400 Received: by mail-wm0-f68.google.com with SMTP id o18-v6so3249457wmc.0 for ; Wed, 08 Aug 2018 08:33:45 -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=fI+k8Vv3yG+m9/MHc2+cp7aa8pgPxuuoC1DpPepTxjM=; b=wrfabtZwU/d/lWONYUx0VOtQu0zRo8SDOMXGZaxGqjyRN8QWvxmyd6SbS3aq7lswg/ S9hPghko6V8V3f8jt6p4L6xkFi8AoJxRmBJHLLzrQXQrxjDTw1+Ysm+1wzTx4ELwjlNY t48/wtltq44OJVKx9fmN3gMtDLRvE5ElvSNAQDwAj2qnsvezlONIf1sZJQRSQh55hRj6 37cUooOzfaTwRD835fPQAugWzVe5139PKPLxSXfqbNmUweCECgZqFePK8OKH6uihv3L1 SIBBPnWxdwQNOoAVph2Ir7hv628hKFY6pj7rXguqwP0/yTZ0/CSTFZJVDKlLtsxSOtsj gvNA== 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=fI+k8Vv3yG+m9/MHc2+cp7aa8pgPxuuoC1DpPepTxjM=; b=UbCRKvE2wBmpeT42+7hz9nEnOz7KVGvzU/UggnA6cC1+qQWm7YGKABonncU2lMc7r8 RWvQhJWaJ0wV5tHOyxj/oti3lIkJduOCeTFn2LSqk5/s0caSIvl96Ic7kcdTw3NP4905 8apcA0JqZdCD6m6Nb6bKNKzG4E1FHDie2ueGpzt0gtp4Z8GP9cSGDiiFaiXpPbZuyIlC MsoACjoILaRgao0h2zXIUOI43HFDUogoVDzku/8biQKr/djWX6KdoUR9xkSvKDf9IMUF vQbB8Ty6H3RnOQugynbF5b+qMVkkrE+rT/CRxrv3y5++t/WR2gUIBCwsAySHFVEq1Xty rPWA== X-Gm-Message-State: AOUpUlEgiVqQWxL+zJuWZcwHYl1zxryLUwXyw1K9cqK7K/G2DKEfbsA0 SgS+2oMzZQCx0vgVA1av8Gvwnw== X-Received: by 2002:a1c:55c2:: with SMTP id j185-v6mr2240121wmb.104.1533742424512; Wed, 08 Aug 2018 08:33:44 -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.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:33:43 -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 09/28] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Wed, 8 Aug 2018 17:31:31 +0200 Message-Id: <20180808153150.23444-10-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-dm646x-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 584064fdabf5..5a9de47bc8a2 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -310,6 +311,15 @@ static struct pcf857x_platform_data pcf_data = { * - ... newer boards may have more */ +static struct nvmem_cell_lookup dm646x_evm_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, @@ -802,6 +812,8 @@ static __init void evm_init(void) davinci_init_ide(); soc_info->emac_pdata->phy_id = DM646X_EVM_PHY_ID; + + nvmem_add_lookup_table(&dm646x_evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") -- 2.18.0