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: 10487029 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 71A2F6038C for ; Mon, 25 Jun 2018 17:18:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 528A2205FC for ; Mon, 25 Jun 2018 17:18:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4738327B13; Mon, 25 Jun 2018 17:18: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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC811205FC for ; Mon, 25 Jun 2018 17:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=1NZHPUG7ksFN5p7udu5DgtP8wcfNuH0cOUR7Y7Cix6k=; b=UyQQwZkqCqQ6hFB0/luLL+edNq O8nPFfXGELWJQsjy5x74pgH1WHf5Z1DgH/yuUA5/xZRMY5Vr8LqC5VT0QbAigliVOxuaEc+wBO7F2 wo6rbu7SSNxV2oSPCldrCrFaC6JCEP8C98313zzP3ys7gpoCjJ5Iu2WN3UOrZ2g2BMmX7Y3Ukur0G h8R8SSUS/Pm1bYsSCsI1PU8GeGh4QD1nTlJj2me2aalh5Ot7Iu0Tez+iVm8dB1qsHkwf3i9+BEP0F t9Tyvt5FOKJAgHGbfi3D1hnGP1QsBqGBT0JkDwlL54It2wXjOuXzvULKfQGMj6gSCPPC6DrVxlnYv stK/jp2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXV8H-0007eP-MD; Mon, 25 Jun 2018 17:18:29 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXUvo-0006Ph-LE for linux-arm-kernel@bombadil.infradead.org; Mon, 25 Jun 2018 17:05:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qDcomHocfb0UTWNpKg09I19AVkb09J7DVriHdyGCECI=; b=MrzGAGGnRwdr7L7YhNSNeqWRr Xcm8tR8+qVix0JCCqUJ8MgLI+a2oRojmF62BzWV/hz3ITWS2R5ojUCSGVBxYa3K/2GSp6gAu418zL YVjsnvWrReglK8zkFxukDb38PdWvh5VThgd9mPMU7BSwS/YvBimnUp7JBJOthuNsS4MHLWxKvE5q5 CdFB8yDg2FmVRltlCjaBVXO/BQmKoTXxRdC363SGRVSmGLy9lLk1/e16RU88+v4wYEenh3VyRksHg wDPJPWQdE/TYNbUDL9wrt3zCCAZuWjOdYaIQnSkaljtJD2usitxpnxErvPu8ce9RQHNaYr5ISjtQx fKF+Yx0tQ==; Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXTmB-0005ES-Qi for linux-arm-kernel@lists.infradead.org; Mon, 25 Jun 2018 15:51:37 +0000 Received: by mail-wm0-x243.google.com with SMTP id i139-v6so2882659wmf.4 for ; Mon, 25 Jun 2018 08:51:26 -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=chJNlDjqtrCftE8ECTiIbcAs9yntHRA/jX1ZHAeo0Hs0q1HDVKhTObSxBR6Q9+WlzU NSRy3wgshp9quOUbNOJGiL1rfHzdGosMlMRjM0FAOYjB8eQ0z1iUCUxbh3MoCNIbUnAi ZJCob/L1TYFsQAj/qcXWsvc97qtZtwv/IQZj651wV/wfoIGnseBe89wtv444ouXxSbM0 qBOM0YlqBz8Dn9Exmzjh1GLi/L1SxfYfq53a9DZBmQbqFoGiJnz18eUlN5r4o+43qiX+ q9oZ0emx4Fbq0NfXFj/YucaSdtshsdbP9FSRexg/T2JHui4SMhR/yvUoeU70ylr3MIHS as8g== X-Gm-Message-State: APt69E15tTwGeaPo3Sqak7HpX9648wShu6A2fgxkBB134/S2wZAkmNSc C/Uo8nT8Ky3+DkmZALW0kaQfCw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180625_115135_995409_FFF9C9F1 X-CRM114-Status: GOOD ( 15.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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