From patchwork Thu Jun 28 14:32:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10494123 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 1E8F060230 for ; Thu, 28 Jun 2018 14:37:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0849A2A0A2 for ; Thu, 28 Jun 2018 14:37:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F06062A0BB; Thu, 28 Jun 2018 14:37:24 +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 3FF8E2A0BE for ; Thu, 28 Jun 2018 14:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966640AbeF1OdX (ORCPT ); Thu, 28 Jun 2018 10:33:23 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:44085 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966642AbeF1OdR (ORCPT ); Thu, 28 Jun 2018 10:33:17 -0400 Received: by mail-wr0-f195.google.com with SMTP id p12-v6so5752402wrn.11 for ; Thu, 28 Jun 2018 07:33:17 -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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=KHtzkdsOz9x/UgL+SoPpO/zrS4R+XN+tmNso9TvAsAN+D9Dr+hNFgePT1Lp0Op46rS +Fst7BB6HbRNzS6iqZiJGncTEg8Gemzfqx2BajYrB2fvV0n/4frJI7zRVB+LCJVFbI03 M0aocuVD7ja/ILi03DUAp9ScaVKe35oU+sPTAg5QLOlxErMyBs5raxJ3E4xdJN/mBYJ1 L0xuqMO2DFk2+eVlBn1Vy3qV4jVI/Y6QwHUb9RcK9ej79kF4wAeDuQ+wVyRW/bA22FtB Dbu3/83kPzaykWbM+ZaSJ6fREhvpvVORati0SnLKX/4RcFBKFhgcIUvdAZGr2lvG4cjC /SBQ== 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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=hlMeicrgzueZP0P2ctgv7/pfgm4NdSvAxO++Hyg7Hk8Cz9ka5OYL++eRMeqOViOmYf e8y28EuEfPmFPm/QNdd34yffKxfbkE+QvYPz0zMzk5KSkC9J1iDpszlM7J/+RT3YpMum 1mCoBqB7VoFH+cfZRhCy/1slsVO31DNpVcybohmktlh5M9ysIKaUegnMAtsyOW/MB1mL b4/GXiDfwHlhcxj8DpVyHbBcFwzb9xaf4DoY2wfvz/f4ai8VZt878gKsfwly2gia3uWI NGtpc2JwLiDBlUAVUaKgcu/KNRRB9fXWyG6H1msK8ebdsIg42Pig3Ka2MAQSBTS7IgW8 kQnw== X-Gm-Message-State: APt69E3IFGdbnJu0IAVOoTOCXumb1gfyT5YXxWTB4lrV3f6MWZ3nYFxr pGBgPNLGcuYoXk2tb6uSD+hRyQ== X-Google-Smtp-Source: AAOMgpcK4f3S+nFzcKzMfeSOy55ns231SscYLa/PhBscI5P3ZYcgckZBW3nDzg0NeSr8dlbQL5YlgQ== X-Received: by 2002:a5d:4e49:: with SMTP id r9-v6mr8574652wrt.27.1530196396588; Thu, 28 Jun 2018 07:33:16 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 07:33:16 -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 06/18] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Thu, 28 Jun 2018 16:32:32 +0200 Message-Id: <20180628143244.4561-7-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-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..4a2fe8142a2f 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_add_lookup_table(&da830_evm_mac_address_cell, 1); } #ifdef CONFIG_SERIAL_8250_CONSOLE