From patchwork Fri Aug 10 08:05:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10562429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69F5A157B for ; Fri, 10 Aug 2018 08:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 589D42B71B for ; Fri, 10 Aug 2018 08:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B6F02B72B; Fri, 10 Aug 2018 08:11:46 +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 D69862B71B for ; Fri, 10 Aug 2018 08:11:45 +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=fqAMdTShcGDiujncfS0YwARRS0Gq53LWX4BeS0rqjG8=; b=QQzE3ykiMXE4dWxCD5y6wzud43 GaTN/m8bncIqb6QpS8EEdf50WWuQ5oaaETZcYiekl6upEqdpkeUTCMVo7nrW/d7G9jzjGhwC6rBCB TFFe/Ez5dYFED1787SqrhkiRrUrbtzzLX2hC3jXM3pl+klkVx8MpD1tVW2jDkaEXM/Y2CowOOyHPj sHGPaRPen0a6Tvl9AsKbSsFYTIVMH+fxpbjmwme5//A3oytLuWMPdaO0QoUSP/UniGXwBSC9fR525 MlCOdao9NltPTaR2eN1FEFlfJ6WyNtVBegS9qT5goonmq10ORls/4V6+ucRFU22kS+BKOMPreigK1 dQqc5kaw==; 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 1fo2WO-0001bp-6e; Fri, 10 Aug 2018 08:11:44 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo2Qr-0002MD-8r for linux-arm-kernel@lists.infradead.org; Fri, 10 Aug 2018 08:06:14 +0000 Received: by mail-wr1-x443.google.com with SMTP id e7-v6so7441741wrs.9 for ; Fri, 10 Aug 2018 01:05:51 -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=G5kqWCsWMSj90Glln9/pjzOQBVCAn+wjThQrCeWbXjY=; b=cewKufJyOi4MN2nTblfsSAfiPvACoBYNyZNPM0atkEBznxXQ7sKq2JxrQ+2+0p7uCD UcvlDLlFkVk4vaLezAj2y+8ZjTfTmxr9m/5dBXgfQEHjkayryaj4az+2pqklz9VoDXID j9bf/d2uzJuEVQhXUGctMjnx7wwzizCAJNhdaa4AY1bVqOA4FxF6cl+yt/kYhX5mOugf 14PEh6zu9CkV124cseOCkFXoJsmmB8EXie833W/f3fal/VOZqCPkk8PD1naIfQfxq9/B JYZp+mzenjkYBHHlzGJeBUeY7CnZS8wpywIsrpu0FZJ8HoPIUYQcpSEMpNKk5zNdCkgA CufA== 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=G5kqWCsWMSj90Glln9/pjzOQBVCAn+wjThQrCeWbXjY=; b=fO1YOUuM1VnYXGOlwDRseVAm5XFSOhurzOv99BNIYZzcymgy741vseofx+OhciawFk tx9msU0xfMhx+fQTioZWoeNFp5ZPtZpv65rRrRB3VHf8AY6KxAYVSIvWPhfwbil0hAwr mK93mobTv/y3V5MRt0tKwHBDuN33HlAzHVHxCCOWADy7Vx/INzNHJKh8YcF4+a6K9Z0I Z+66bRHK+hxg022iH3GUkaxf9XWil+INwZ5fL9I+CBN1FiKenS55JakPuZgx8uzXqsXO 5U5EGeFMwmAdT+7vHzg/p9pbMQ5WJly6haMFRTotwua+VsxX/llf/HKHBNLYQaclWu2C ovhQ== X-Gm-Message-State: AOUpUlEqcAMlTtUmcDY4R/FYAGmMMDJOlClMUvZDxiUi9xL+9wUJ5Umb fq/+4nD0p7tSOOvGM0wQz/bxEg== X-Google-Smtp-Source: AA+uWPw/Gnx/xGfligkHKZKWSjU14CMK5H9IcmHK5JkFMKmXaVTFEdlAXhlemGX+z1tERW+yOh6u5w== X-Received: by 2002:adf:8466:: with SMTP id 93-v6mr3390066wrf.274.1533888349942; Fri, 10 Aug 2018 01:05:49 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-MAR-1-609-89.w90-118.abo.wanadoo.fr. [90.118.185.89]) by smtp.gmail.com with ESMTPSA id h7-v6sm9546405wrs.8.2018.08.10.01.05.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:05:49 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn Subject: [PATCH v2 09/29] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Fri, 10 Aug 2018 10:05:06 +0200 Message-Id: <20180810080526.27207-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810080526.27207-1-brgl@bgdev.pl> References: <20180810080526.27207-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180810_010601_659874_58C03579 X-CRM114-Status: GOOD ( 18.72 ) 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: linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-mtd@lists.infradead.org, linux-i2c@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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-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..943ab0ca6db8 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -31,6 +31,7 @@ #include #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_add_lookup_table(&dm646x_evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")