Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2966525imm; Fri, 10 Aug 2018 01:11:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw5zVrQsEiiMjNWJ19gN5CRajBW+YcNYVgAVwn0UTBQMbHGz0Gmbx0QBsMKL+BqtVBZaHD7 X-Received: by 2002:a63:5815:: with SMTP id m21-v6mr5305157pgb.78.1533888685329; Fri, 10 Aug 2018 01:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533888685; cv=none; d=google.com; s=arc-20160816; b=qMccMnhyrOy62RnF7na2MQVUjS8wpGaxb1bu9R4h7RmoJpV+nzd9vtQX+dj9mEBIc5 p5NqH9/TqHgomQj7wOytvlVAY0mzfdS33Vvn85xWflTKf/X8gZh2T68hXGHaG2IMWeB4 CbCtrXk8OG/O0nBIeG37kFkwfhLw3oSfFxgFl7Te7RvMSJtGFXgxDorLzrQJWJkde5Yv kZVQhBJ3+5pX6IFyyvAZqc+QIi6yZ+4b1DmCgD8uJgBeHjDNG4UYDzLvDnGcDOMamStz TvEaE1HHeVunRRWNYPR3yjrNvIzAI6g48UhtuuUFVQF+EP/NzCA92+CjekThp//2K9du ceLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=G5kqWCsWMSj90Glln9/pjzOQBVCAn+wjThQrCeWbXjY=; b=IQKTJjFSVOwJZosh2b2Q/U487uaiJIZ2RjaYYclosFW3HQVsotRO9pwf2+ZpSnhmIF doZxfgEtYhqzFs0hHARl3XoJkGpIjbzox4AGUmeWTi9P6YJ8zD8ocZyuStFHClWQb77r r5g9JV3GNHKVXTFVUEAqq0QVgbuuMgoaN9VG5bXY4UZZ+x3uSbzE94GDTQI09e/OMrBx 6JAUb2yxTLoUIze6rIFW9XqUBkpLSd2NSsWVezeX+YC2+m6zO+F8a8PlEfEIZU41YjYr lWxpkM40KusZCVEwObKVM5J+VHZJEioHmR4nGAocAdjI3hJjV1er/rKRRd7KDFOb4Y6n yHQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=cewKufJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a140-v6si10635507pfa.61.2018.08.10.01.11.10; Fri, 10 Aug 2018 01:11:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=cewKufJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeHJKei (ORCPT + 99 others); Fri, 10 Aug 2018 06:34:38 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33165 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbeHJKef (ORCPT ); Fri, 10 Aug 2018 06:34:35 -0400 Received: by mail-wr1-f66.google.com with SMTP id g6-v6so7494284wrp.0 for ; Fri, 10 Aug 2018 01:05:50 -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=pLwjp91afLxCF6Vf1O5sqtCDpIhLj48rfg7sgjS6NwgpYtZbApvesqedg+X0cbtHt7 lTkAg5cdxQWJzbfUJ2H/WNRspwVJLg4X7VV/ybEt8DwCUWlNkJV1ZbiP1RQjzN1MRfxl /qZYBgl7n+MOavSVjcEYffOh/5h8sQ0+7PN5zsLIIjK2ZEr9vDghgjaUeesGvY4yzHUu SCCWgP1GY/qgCzuEdh68UiR4uNG3CcGdpgEFE06Guf9QEG8wxzFlvc/4ZAX95o0+4LyS h3GiKyv9PHtEyZ4EKd8twPSJ5UOuH1W3SbcUh5xbMsAE4trfwtLVIw8lwmfHja1Al+3u pesA== X-Gm-Message-State: AOUpUlFAiWvsTzf2Yscr1lKV4Z9a7D4hHFOXo00901hrJcG6mUzT0DDr acotAWWZv+zAagVqWz6OYsUhjA== 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 Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") -- 2.18.0