From patchwork Wed Aug 8 15:31:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10560249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38C041057 for ; Wed, 8 Aug 2018 15:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2519329E6F for ; Wed, 8 Aug 2018 15:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18B222A9C3; Wed, 8 Aug 2018 15:37:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3D2829E6F for ; Wed, 8 Aug 2018 15:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728238AbeHHRxx (ORCPT ); Wed, 8 Aug 2018 13:53:53 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33865 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728178AbeHHRxv (ORCPT ); Wed, 8 Aug 2018 13:53:51 -0400 Received: by mail-wr1-f68.google.com with SMTP id c13-v6so2425411wrt.1 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=A8Ec9AI0l4hEsJZ1mLbbvzChDexzCpTlVMoFjtPu3LZBByVSHCkWFLkDBZJbaLHN0T HUBuAgcY2PhmgAjMs3hKHiXtlIbwSac4SM7nOWS5RORxBnIN7liVc2VqTOUi6wR8uFHw ND/l5vxsv4FR+K2CRL7Y3b3UyX49psRtIhqHjW2Acbkv4FAUDfTmxo6aW7r74IoJBH3j ojXrVobLimKCg9VB+furK0RIqnUSA21QdZsBhMw+a7b7ueil3tNHsCWi0CzLLf10TaoG /tZRi+VoEgRFJ0zJLjIvl9vDK9bs/GwsN2QHNGGk5uY+sXNh3sUTSCPwjEcg/ZzEBHGD ow5A== X-Gm-Message-State: AOUpUlHudmQhgROc0I/5qCiJsdwQJA7fs3Dq3DECLFi2xGVmxmHnkhzm xKcgXfIzDi2ueFd9IAcsFsCoOg== X-Google-Smtp-Source: AA+uWPzi/DfnxkWlzRJWkuCz9Vk5iiOrkjRdGpqxGNn1tqWZ1Bwdhofy38dZ4+bn8pt48LHVGuy/XQ== 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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")