From patchwork Thu Jun 28 14:32:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10494139 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 56A0B603EE for ; Thu, 28 Jun 2018 14:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F77D2A0A4 for ; Thu, 28 Jun 2018 14:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 338FD2A0BE; Thu, 28 Jun 2018 14:38:19 +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 C8A212A0A4 for ; Thu, 28 Jun 2018 14:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966655AbeF1OdU (ORCPT ); Thu, 28 Jun 2018 10:33:20 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38651 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966641AbeF1OdR (ORCPT ); Thu, 28 Jun 2018 10:33:17 -0400 Received: by mail-wm0-f51.google.com with SMTP id 69-v6so9272784wmf.3 for ; Thu, 28 Jun 2018 07:33:16 -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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=OkmCgaxfVoCkXBNIGG2PS9VWKeU3H5fvipri13H1JWnghIQLxeMsMALjJJO4mUzely 8mGGjqBykuuhUNh7OQ5ouXgTZaBOFhKR7X7Kfn/8oUQKG0xe0HKzuiVQMWdciWAuqmFp 0rXD7jbrREp5jqS7pjnlZUlDjVQP6vGrAsKVv4rdjTrLSDz1GVQF6x9YUPagIqqgtLfE quT0PTQvpLGwu0iE4uTxoMHhnwgIXpev3pM5XqU6cqcPYk2BM819cMHsVZ5oAVQe/Lo3 dVdKCGPMXqhG5l0N1n7UgZRemxvZXmhe3oGZXP86JvjQ5tlIlh8N/mL/3FV6iSQp5G8i EgsQ== 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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=sCZ0odo7kucUmSK7Y9y1YBm5rSYCyF8KspejFECdXI5LE2gXTqICDfdchnoRlL3fnF EjZR/2B5+1PZru+U/ACzBbQHhuzERnGNe5AxOiw3aSSXpEKGoFwjvQ9t+C8Dx6MeLpKa kxWTYnSq9aci5HfVUIGpxIJFZmzrxa01GkXm9zh1qLZymZ84I10w+VifQCHXnVk4ugVV FzegUOPgW6fbu2XSPa28Ui4lmPdkZSjSPJxEQOow0pJtQQy+aSiWG4/6NPc+FrWouhDH 1F+KeSUt3uX9RyZBZu1rQ/n61rYrJGmuMFi2zbYRGJ075oypWie18mt+lovXYvV4sulN 5DIQ== X-Gm-Message-State: APt69E3f8SN5ahGmxY5Z+/kgvW9PJIZISfxWCrJIMDdDmhdGWuRfLYNi l4K6MAGEz+YizSBhXsOgplnCMQ== X-Google-Smtp-Source: AAOMgpdJV85ndXL+poDBR08dPuabDdSA1Pje6JIZEs97hDDItzKvsGVotPjXIm8BTQJCxfqWZwAQhw== X-Received: by 2002:a1c:b94a:: with SMTP id j71-v6mr8706898wmf.28.1530196395343; Thu, 28 Jun 2018 07:33:15 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-87-41.w90-86.abo.wanadoo.fr. [90.86.29.41]) by smtp.gmail.com with ESMTPSA id 4-v6sm8037499wmh.14.2018.06.28.07.33.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 07:33:14 -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 , Jonathan Corbet 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 v3 05/18] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Thu, 28 Jun 2018 16:32:31 +0200 Message-Id: <20180628143244.4561-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628143244.4561-1-brgl@bgdev.pl> References: <20180628143244.4561-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-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..5a9de47bc8a2 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -37,6 +37,7 @@ #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")