From patchwork Fri Aug 10 08:05:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10562359 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 A1FB590E3 for ; Fri, 10 Aug 2018 08:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9301927F10 for ; Fri, 10 Aug 2018 08:05:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85F8C2B575; Fri, 10 Aug 2018 08:05:50 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 2C93E27F10 for ; Fri, 10 Aug 2018 08:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727970AbeHJKed (ORCPT ); Fri, 10 Aug 2018 06:34:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39081 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727973AbeHJKeb (ORCPT ); Fri, 10 Aug 2018 06:34:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id h10-v6so7461536wre.6 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=DVzkGCcxJjapswh15RRcfALW38SR+3yW3l1eBXNAn0AxK7miUyOyF/rseTD40CL6Zl ZTBc8Wth9oTqqlc8ZqY/kSoJ7GmnowQayc5lvlBiuZhPW5Ev9BB5vBX6vaxWrfbXEHjW g2v5PTYBzT1vs/UaKbyBnM6aGzX8mQTv+JVPLHqoUd3PLoliqVhzxNabaMu3FQK8dq7r uBpuPr6SkC1cs9K9yWIlBMvq2KuttJG+ZOnhABxd+NV8KDsztGrNBhgtZwMZofTQEiIg /V4HYH6CIlkWt+6zSwQ/VS5ejh+I6mvqRI69JTtiNeT8IYT202lln7e7MZPRFmIjhu/S 9W9g== X-Gm-Message-State: AOUpUlGIWBEP8J1iXwumKAIrjdb1mtSMBKS8zfApBqBtrrAhKZGjpmah zrHNcOsmKSGqja0n7qgwFhpd2w== X-Google-Smtp-Source: AA+uWPwbRZ4qbxJYpAg+IYZPFTqoclehtJo2xzwKjACWoVjj9ER+07jUmdmdQUzbJBGsORJ7A2umQQ== 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-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..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")