From patchwork Thu Jun 28 14:32: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: 10494161 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EAE916022E for ; Thu, 28 Jun 2018 14:39:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3B872A0BE for ; Thu, 28 Jun 2018 14:39:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C745A2A0CE; Thu, 28 Jun 2018 14:39:44 +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 719202A0BE for ; Thu, 28 Jun 2018 14:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966385AbeF1OjN (ORCPT ); Thu, 28 Jun 2018 10:39:13 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38991 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966493AbeF1OdO (ORCPT ); Thu, 28 Jun 2018 10:33:14 -0400 Received: by mail-wm0-f65.google.com with SMTP id p11-v6so9265373wmc.4 for ; Thu, 28 Jun 2018 07:33:13 -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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=wsI0y/YNPc6u9Foy+xNxXwkpLLaQA/ucKUwOI7LJLnkVq9bIEirI/2bshzxxpOfjYq DL1wGAKh2ovqYWyYA1OOHSkCzKGqqkqahd8gIb+1KrjUxer2xFK3/3Ywq7TIg4z8sfCw IJjMH8Z4JwoiMl8AdDs1q8ZEdNJPG5RM8n0yIUiqDIWuWhlaZNmA/VqmTenH4Weibrzw NXyuDZaKgX1oj9YqwnYREn4d+rW+WsrdtVHgJbyl3p52Rjd0FRazo6aUVH8yViRFPEDh x+yMb3G0nxA379RVbf0bFcGezM2tj8X9seaDUPLRioDMdGJr8fFKIcCyJcM0J/Co83vR hZKw== 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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=MmueQ1lzvKKej3CgD1I8yKGWNYR+DUK5Z8Nf38Z0iBxu5o+LXuZqED3yt3+Zj10ylA YzDVGt4ingaQi4UmxXhjSfoZY7FwgJmmLlQqeQ2zPNJlJYyK0PspXQP3Z4Jcige3R7FQ KMkuPuitd7LkPGH+LpmdEBW30uqTnBFHORU88DogokXSRlP+vmZm/2pAeD54Md2n6KXz 7q6ECH8TbVv3e+sg1pWy0FRKDuEKOQ7dVJGOyhpyT0gEvTjfmxhYhx7ur9vHlExQJPpU jBgaaAhPuJWVx88TcIzI8AFVrUAR0zwNRTvy603agpspTNmyV+6LP7F0ivAMtRfO4Wi2 3ClQ== X-Gm-Message-State: APt69E1Xf3ib9kSVBewgHtjCLSoex04LV/MVGjgsP3W0t7mcPxlOOa+8 jgRSZ07YTih4bCWXLKqtiwwBfA== X-Google-Smtp-Source: AAOMgpd8Q19NzVXDAMtNxGqmz1HnDK8QH4lQW1HR1vo5/prXrAncar4y5Mkrx76T4aMLHdZ8bmuqYQ== X-Received: by 2002:a1c:9253:: with SMTP id u80-v6mr8889728wmd.52.1530196392615; Thu, 28 Jun 2018 07:33:12 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-87-41.w90-86.abo.wanadoo.fr. [90.86.29.41]) by smtp.gmail.com with ESMTPSA id 4-v6sm8037499wmh.14.2018.06.28.07.33.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 07:33:12 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Lukas Wunner , Rob Herring , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn , Jonathan Corbet Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 03/18] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Thu, 28 Jun 2018 16:32:29 +0200 Message-Id: <20180628143244.4561-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628143244.4561-1-brgl@bgdev.pl> References: <20180628143244.4561-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")