From patchwork Tue Jun 26 10:22:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10488671 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 ACB16601A0 for ; Tue, 26 Jun 2018 10:28:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D10B283C3 for ; Tue, 26 Jun 2018 10:28:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 916E82850F; Tue, 26 Jun 2018 10:28:39 +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 3ACE9283C3 for ; Tue, 26 Jun 2018 10:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934797AbeFZK2g (ORCPT ); Tue, 26 Jun 2018 06:28:36 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44785 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934722AbeFZKXU (ORCPT ); Tue, 26 Jun 2018 06:23:20 -0400 Received: by mail-wr0-f196.google.com with SMTP id p12-v6so15025078wrn.11 for ; Tue, 26 Jun 2018 03:23:19 -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=CVC/eOoTlU/+PkIhjzQLRTpQV4C3GBqkw7jiGbnzbcc=; b=qYDhdejXW0Ofc6Db568aE20XSUq+x2o8L109R28CHP2WSMK5Road1NnGFqbjSXcVZN W95jrHm8C7LYMxMD4tj8l7yeHXYQsOB7r2tHwa+WnNzQtaEZKdA86wH2WaTx9hV8uSk5 IuqunepZqYW9dTEa2TqrtFspGMUYeVbm11l+eDXwDQGF/xG4cqQof21vJNHSyMYmL8X7 WNIP2FM6m3F4qxcYb1vRsYbcPQlkuVByeNe9mHBxi6CBGMLhr8YiQ/P97HWdRrVdNi8I Kt4eQEITJ1klKX0D1dcthOL6h7lwo6kxSfUNT9B7dzo/LbaLeK8AP9FBFC4scOt8xQ5q hvMA== 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=CVC/eOoTlU/+PkIhjzQLRTpQV4C3GBqkw7jiGbnzbcc=; b=Ln9sTjaAx3Afq2vXdYQj4KzxbFAK+eYjLDoELXOjPDxW6VcNdPlQ/AwQV/LgWyuG7N AfG/Dy5re8rjS59Pa1xAStxDuavCy2kMXtjCtQSvsQkR3ZKsGpOIFqMrybLtfalSc7K6 oDywSBwhhrHAFYC0MjvRkk/6eF2ea/ai1Z3cmqTq/CL8r93GGSayzbN+pryg2wc7JCGx v1Pk9LvBzbaWbmAb/wlOYLwKq65LI4WPgOlUKnkZZ0M8I5/KxKJb1ut4cEOKei6pP+EJ hPMQh0fYleEh2jldlVlHVprEHNYu4cxOdnNvbujfNt56Rw1k3y+N9pgSHRLCl18BLmtO 2Lpg== X-Gm-Message-State: APt69E10QgwfGWciAHTIj3pjwrN3JP3XDI1h5GExxsYZbu+8ySeu+p+H qcThrAMpxioAzb82pDXTXJNcZg== X-Google-Smtp-Source: AAOMgpcjgd9fTOB/Uiur4hJgOoXJDqigucgTGlCt3H9z5C2IV9O5Kl02+G+yQACj6xFINYpRlL1EKA== X-Received: by 2002:adf:b839:: with SMTP id h54-v6mr965338wrf.36.1530008599282; Tue, 26 Jun 2018 03:23:19 -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 203-v6sm2573852wmp.23.2018.06.26.03.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:23:18 -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 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 v2 04/15] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Tue, 26 Jun 2018 12:22:34 +0200 Message-Id: <20180626102245.30711-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626102245.30711-1-brgl@bgdev.pl> References: <20180626102245.30711-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..4c82d38033b6 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_register_lookup(&dm646x_evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")