Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp968290imm; Wed, 8 Aug 2018 08:36:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz8EO4ewbhsf9W2zoDNpNJ+VyFaL8KEgPsLPDhwRhi5tLyHRZk2QjC0bMAp3HLZ7G88uLKV X-Received: by 2002:a63:c20:: with SMTP id b32-v6mr2975258pgl.400.1533742585233; Wed, 08 Aug 2018 08:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742585; cv=none; d=google.com; s=arc-20160816; b=uQFbaYmKy82xDl1SGwUjV4FtSqHu4PaFXIv2uGwGWtqQM1oq50itGNQbC5UhKDB9WV H3P0i369/2Opgs1gb39IaQABNZgtDAz+UZl1UhWzsw+mQhW2DL+VWFjlsYDuG+kjHtu7 +gwMtGDa+6tABDuvy/d3xvDNS8rVLjZSonqEcLt5e9R03JeqN4unhKugM1tJsbYgXEtS u/KSVJQu0WfOs/TpaBe9/Y1t4DetVDxhETqgMr6F8u+INLDrp7i7O/+mfT0LjTDoroUd EEifli4DQtXWqMCfUZQylRZgQ+wLW7VTu0mXHoeElD+QJKyneefbcVzJXNhI2bLF4fDz OVog== 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=3db+EwdA0BE/nKODKMaepKnhT1t81s2qEJflbfjuR1A=; b=V99xSx8YTbtxClWvKuvKVlT/eYiB2w34Z3hyL9j6RDCoKXMTBoA7ONmRmQdkAOw5bX iPq5p0b2RD/6daae1nc9dUydsE5XmpS1xdf3qb1QxWILusJx8clELHPf/CLxUYAMb11h xYW5ioc7qNdR1SOWuWm3Qd9xwpaRqpuZSfW9YWh5SlevFULTYIAmxWSwipVcX/RlNTea Wrgt55oy+GpgLCJK1hIT+YZkndEGxgQZjYUJCW70fRCXEVRMvbrfG4bLwJhZ7Dxmal14 KiS1WDsrB6xXfQBs7vkjuRnMjfpUQHm7accQIjY16TSI5899czlgp00nwA8IwwWFvoej Vj0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=fO4u90gR; 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 e3-v6si4147984pgh.385.2018.08.08.08.36.10; Wed, 08 Aug 2018 08:36:25 -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=fO4u90gR; 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 S1728036AbeHHRxx (ORCPT + 99 others); Wed, 8 Aug 2018 13:53:53 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40443 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728167AbeHHRxv (ORCPT ); Wed, 8 Aug 2018 13:53:51 -0400 Received: by mail-wr1-f67.google.com with SMTP id h15-v6so2398424wrs.7 for ; Wed, 08 Aug 2018 08:33:40 -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=3db+EwdA0BE/nKODKMaepKnhT1t81s2qEJflbfjuR1A=; b=fO4u90gRjcwJ1PkoMrvfUoqbmGq/lYuIUldc48QmVBYbNkJFkz2gyQukVu4JTNrBCu 4UsEvaLrpuXhZlqYiH84ZBdMbEFONdoKwjKVbhJHQ26B7ebLQTjJH9pUDWMZ0KVwKRlE pdvJmEfg6MMindvOSEtSu/pqYSQQsbsT/jLgSOMC698QYXGPLMgB8Ca2LTqeTfJWYokE GNrAil+tILe7xAbtMnNqOkNbqC0PM6Z//6DnRbbR8PPJRFjGIt+ZgOTKi6tC1LYidaOq M3Jl95Rbiblq+r9g0Y/3ciiOog9D2AZXZTAJ8S/czLde/bQe1HlWLqDGI+ZSEQcW/AEN tmQQ== 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=3db+EwdA0BE/nKODKMaepKnhT1t81s2qEJflbfjuR1A=; b=V1YLmkeLCfrlhOlWCRipo7v/4tjJs5FtZ8GbQC1jfnXmwJiCt9rRitwsNyitSHf4VS ix6iB2bd3aHAwwuAVffn8lzFdMKLMAideXdmSnl9ysN96x/XJh+cdCbG+SGoaiSMQpBB qDig2ugKxcTSfTrp0WymCW+UEdF6Je6IMZjHrDgNHQhF5MHuOZVyCdWnAIWaQglwfyRT XB9LyPTaLUygjLZa5cjIJT4yyexaWaWXq1C+Q6uN+nAxxtHzq1h8/ioxweQDGPZA9X36 aapdOuVYWMv/umhpUG7XJyHuQNLjycqwdeOaa1gAW5k9FIfMGMrdT/d2/Nk6vflWoE86 OW8g== X-Gm-Message-State: AOUpUlHT4/5aA8J8Z9afEiFimRv19jvdXuWAai3rOl+sufVlwtytnfnI 3wz626t8oFSNOVN3O5ylJTsPrw== X-Received: by 2002:adf:9e84:: with SMTP id a4-v6mr2234951wrf.70.1533742419840; Wed, 08 Aug 2018 08:33:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:33:39 -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 07/28] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Wed, 8 Aug 2018 17:31:29 +0200 Message-Id: <20180808153150.23444-8-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-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") -- 2.18.0