From patchwork Mon Jun 25 15:50:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10486875 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 C63C7604D3 for ; Mon, 25 Jun 2018 15:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACBF7285A0 for ; Mon, 25 Jun 2018 15:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A15A4285B6; Mon, 25 Jun 2018 15:56:04 +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 4DD3B285A0 for ; Mon, 25 Jun 2018 15:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752639AbeFYPzZ (ORCPT ); Mon, 25 Jun 2018 11:55:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39510 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbeFYPv0 (ORCPT ); Mon, 25 Jun 2018 11:51:26 -0400 Received: by mail-wm0-f67.google.com with SMTP id p11-v6so10554109wmc.4 for ; Mon, 25 Jun 2018 08:51:25 -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=qDcomHocfb0UTWNpKg09I19AVkb09J7DVriHdyGCECI=; b=NZDrb4LZLkSDqZfojWGWuejLVM4ujk3TzuHgSzlm2p5RPvLFxgIf7M++AM1+9+92Jt PpXWgEoQ+TXN2ryG82HXieONOlG1WKALBMTcixCb3pr9spcbtYsnQhk+cNcm4ZVs5Ell 0MyME9I/6+roHcR1WKi5G6L6ghZB8NvWTzSLIyTxP5FIg/K2aVNIDa4OSXHOs7xyedrr eVymJAc0M7BSCywdhPBz8tiyAqkusRWxOV7XoXF19iRBmV74HLvkzmnXOiNoTpbE2mMt UNoBQKJhJ3RTtSakjZEh395jAZRYM4IBZuG5pibb34OoIR8EoMG+WKx80j5vuuGWd2Y4 cJMQ== 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=qDcomHocfb0UTWNpKg09I19AVkb09J7DVriHdyGCECI=; b=Mynt+OThde5Xw7PTKCnhmHoVtmFW7qbTQw1Udm9kViHjKWeIVlRU6FWT6AXWj1Hh4P /cyrkJlQVssa6gIDS2zsR4h6Abo2Cbtjau6jgGp3QqSN2kDeWG/99O8pVfBlrYJi1yCg ssbDAO+EmIb3iz55U42MI1W1/4+YJNt82xuaa1T0wdDXk2Rmm6FhXRfKzH2Z8xLqL9A1 2gtRJF2NgeZmUN+wI4EYVrOaS61Ap8NkIibAVan2qGJ4IxndZSkkNLjORyLhBoVhjF1G 8hV8e/y/dw7qO4BN7cBBif+lgEY9y/fx5/ZClK3OoI/fLwtQySBnORbrhpGRh5KtEnXJ FeeA== X-Gm-Message-State: APt69E1fcvV35Y3MpXotPPSWezKkuUkZbaXsvNqGn70Mgv2ztszxRBI/ 8G+KAhReeY6wlCwUA0EQZqgLdA== X-Google-Smtp-Source: ADUXVKK7L0YfEl6wV7fAUrHzRba9obcauKxKfgL2nTZ+lv63HHlYZDwLlpQqI0mysPUlrF7HSPS+fw== X-Received: by 2002:a1c:7212:: with SMTP id n18-v6mr1447596wmc.5.1529941884857; Mon, 25 Jun 2018 08:51:24 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id x16-v6sm3523737wro.13.2018.06.25.08.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 08:51:24 -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 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 05/14] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:16 +0200 Message-Id: <20180625155025.12567-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625155025.12567-1-brgl@bgdev.pl> References: <20180625155025.12567-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-da830-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 14a6fc061744..3be3e93f2f18 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -409,6 +410,15 @@ static inline void da830_evm_init_lcdc(int mux_mode) static inline void da830_evm_init_lcdc(int mux_mode) { } #endif +static struct nvmem_cell_lookup da830_evm_mac_address_cell = { + .info = { + .name = "mac-address", + .offset = 0x7f00, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", +}; + static struct at24_platform_data da830_evm_i2c_eeprom_info = { .byte_len = SZ_256K / 8, .page_size = 64, @@ -618,6 +628,8 @@ static __init void da830_evm_init(void) pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret); regulator_has_full_constraints(); + + nvmem_register_lookup(&da830_evm_mac_address_cell, 1); } #ifdef CONFIG_SERIAL_8250_CONSOLE