From patchwork Fri Jun 29 09:40:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10496003 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 68CFD6022E for ; Fri, 29 Jun 2018 09:44:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E6172998D for ; Fri, 29 Jun 2018 09:44:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42E5E299A2; Fri, 29 Jun 2018 09:44:47 +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 DFD512998D for ; Fri, 29 Jun 2018 09:44:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935707AbeF2Jk6 (ORCPT ); Fri, 29 Jun 2018 05:40:58 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53931 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754694AbeF2Jkw (ORCPT ); Fri, 29 Jun 2018 05:40:52 -0400 Received: by mail-wm0-f68.google.com with SMTP id b188-v6so1485590wme.3 for ; Fri, 29 Jun 2018 02:40:51 -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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=IPzhrL/Wfl5EHcc2OjGi/1xooGj0EAxTifM32A3NSCR/y6LSMrO03YbiChhNBBt/Wp jijHgGa15QFHeDK0V5+ZyPp00D7V4aWXd4S8C86DfZADwkpnGbMPM2ThQK4v60Mj8jJs g/Y+/H4gm86pfaQcXOXyTQgKUqqGrxiDoU8qk41Wk8jrq+cmPtyNT5KrbpETQprE6oDC tfR3sQFkgG2D2YmyWx55QeoViUxzjJyaQYMrPp7gMp4WnMsBlAHRc3vZbusg5RzK76Xx vu3nR3+Py4jqg/h8yP0kr9H1NGDtBvyjLbwqlwITc8a9HoknKRg5pZOtpkOA3jeJRTFR 64oA== 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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=bieJJN3afltP4qNs8Go+K9nMKw45MrD51JI4UqqZYGIjfnRs+8/KT4h1gzZNUQTb7W sAKP6KT4pLHCj26fO64R3n2kolxOdfCzzAahIsDGDTWpNpzjx7ezsdNOzT3D1WB8rHsy E8ol2VcmU/bv7Q1NsPZd3SJmpTXI+2VYrwKQjcEQKANN4G5bQljY1AFpp5jJbXd8vyv0 pPns8tJNURF79C7BssfkoznrWV1B0rufSPMS8mypoycEdUfhtROHzz1znBqYPDYMMfFZ p0VcxNWfT4vxAZq0RhVHXmmwtlN/0Lpw2oVLJw5wAoxlmr6xClwprChXR5hbjBjXYcQg KeyQ== X-Gm-Message-State: APt69E0qhGPVGLiEUcP2FVLvwa+lKezSNTlq7gmfMQfPkxX5mX2W+e6v mQSX8XADlN+StnBXJS1lBJv1DA== X-Google-Smtp-Source: AAOMgpeDUO0C0K+/mlCkuVpSDtEsyHJVWrL69tI3d2CsBvuERqwQaYuDKywNtlI2L1Ikh+KJdNSf4g== X-Received: by 2002:a1c:8312:: with SMTP id f18-v6mr1253255wmd.127.1530265250476; Fri, 29 Jun 2018 02:40:50 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-55-10.w2-15.abo.wanadoo.fr. [2.15.147.10]) by smtp.gmail.com with ESMTPSA id d102-v6sm1386394wma.10.2018.06.29.02.40.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:49 -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 v4 05/18] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:26 +0200 Message-Id: <20180629094039.7543-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-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-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")