From patchwork Tue Jun 26 10:22:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10488665 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 95AF8601A0 for ; Tue, 26 Jun 2018 10:28:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DEB02850F for ; Tue, 26 Jun 2018 10:28:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71F672869A; Tue, 26 Jun 2018 10:28:30 +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 18D272850F for ; Tue, 26 Jun 2018 10:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934759AbeFZK1z (ORCPT ); Tue, 26 Jun 2018 06:27:55 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:40604 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934733AbeFZKXW (ORCPT ); Tue, 26 Jun 2018 06:23:22 -0400 Received: by mail-wm0-f67.google.com with SMTP id z13-v6so1213694wma.5 for ; Tue, 26 Jun 2018 03:23:21 -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=bCfsQ43OdsHikmK7mN3/Hb3JDPblleIhaKkOug7e/0TT1N+u3DrJtlUMnnRTbmqNZD evj6bqmKfYogmHdbVelivQvS8gW4wC/1dkTjSX8wqKUHJKKXQP2u40kxobfke0NTQvC2 BpnX9ydto3aWvLnLtQfde87/Zo18SnzaCFaDlDHpI4QpXljPX614WZ+encg/i+AxvxXi qBMsO1EGJHnWtv8a2MpxJjlIIiaeMn35GhW6X2hinip9GhnxYFCMCR08MVU0lLhL1EAC qC+fGG3hFk8j6+ESQW5sjQAauvt91h+Dz8qdqObxiCOVjo4I0cPr8c50s1xzE9abgO1w QH1Q== 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=NWmmeMbnqSH3uFsolbipfUXSisp+KW5xsaKOpywM0LlV5QvSdnJqdpl4YBDPEc+ziT wZ6HWigtbxdPgALJvf4u8GPcS2xfg0xTItFitKyR4Pq8CGcbNAVcBRnQ67HZ6ILpGQha OprKDVxbRh79P7RJoRIy/eUYDrkachIesD7yE4EbHitT73XFon0DD0b+3E9V1rLT6sU/ aABNsryCsmpQfJh3qEsd21XOBJCBkKpFVmgN4GP4ITUbYaOpLnklHYjwdS9M7dZxkBzF y7GkkTzOu1vuMtBkeJdt+NrJSZyTrVpmDV7uN68fWmMFY2c8A+KD5V0ziowg1/7WQUfW e5tA== X-Gm-Message-State: APt69E0k2YCsIWsK0UnlZ3eC4yHWFcCEhSRFIgInCG1vKT8+95tze+sm vLuFUDJRx80JYwxNxA+roo7ijA== X-Google-Smtp-Source: AAOMgpcC+3TY2kHfkk06zefIvcGD3PUwe3P+koUGFRwnHcakBjlRDrF3iuExqyS3Kz6lcX9HAP7KHQ== X-Received: by 2002:a1c:2686:: with SMTP id m128-v6mr1197661wmm.65.1530008600773; Tue, 26 Jun 2018 03:23:20 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:23:20 -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 05/15] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Tue, 26 Jun 2018 12:22:35 +0200 Message-Id: <20180626102245.30711-6-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-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