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: 10488711 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 6A78F601A0 for ; Tue, 26 Jun 2018 10:33:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 519632886E for ; Tue, 26 Jun 2018 10:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44CA82887D; Tue, 26 Jun 2018 10:33:25 +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 DB83A2886E for ; Tue, 26 Jun 2018 10:33:24 +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=Xs2/ONaH62rCDErBj7TGL8PVOE glfAsPmJOBYf+7ejKu5ketHt29Q0wYwR1iJwMNrEg6UoTu9QgSdQVRxOq90NQHtjGJWJSUwgAgDFr OUmbCOEk5UAQGGUXvSHyHyNGPBWIH/28fPHD00Mzf96AEqm0FHM1GpSMcuEDqFLLKiWZ2zWfSm/6q kb5bKT2kJPmHLHVCu48x/YvT9b8Q892rpcYNua4SsEDRGXi+P6NIztIRLVWexV2LxDFnNZcxnBCGy z0dOoVvIVR29I0O/w9S+L6QDiW5/jCJBQApCb5WC6orElX1leluFxfvbZBTAWisHdJqTzh9rJItOX m1eoBFjA==; 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 1fXlHd-0001lV-27; Tue, 26 Jun 2018 10:33:13 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXl8H-0001vx-Em for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 10:23:37 +0000 Received: by mail-wm0-x244.google.com with SMTP id p11-v6so1205598wmc.4 for ; Tue, 26 Jun 2018 03:23:22 -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=VKNsKDFHrU02p5Xf1Wvn6IIw02bGe+HrigS436xa/4n84dUU3pHCIFtDY10DIHBmIR bFu+i00/nlZo+dQWWU4LP98iAVgyrjnXmQR9XbUTj5uAzcXnWL8pV5RaRbwlj35FSoNh xCMmeV/2Z8wZxzYlZIzS8aymUQc1N2+eoWiIB/3GXky3eMZ0/UceziwTx4VlJ65CN5is ashoZv2et4ZFVl9REN3XDGtyddH82W7fFz04/MMnXiPIGc2khdb6JXjM2ltLD22V2hmo Oh7UwA97w3MzPRkQDInZDvtvQL20Huk7UKal/I6TAZQ21qspCBl6d8G4Q9IBmyWZrMij Fe0A== X-Gm-Message-State: APt69E0PJTS/4qaXkJu6fw8lfN7m0+8bwC/f9DxRAjlREZPF5FCWu3D3 Sx1/rXxeQbW1PwXIfaI8H2ZJRQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_032333_509361_E5A4F35E X-CRM114-Status: GOOD ( 13.59 ) 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