Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2965843imm; Fri, 10 Aug 2018 01:10:33 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzEEH7E3aCjRfFo5NiPJ0P6JAVmIJDJiC7qEfgM5oOB7G+AVCnQKd03TJYoAvJn5YupgylT X-Received: by 2002:a62:998:: with SMTP id 24-v6mr5872913pfj.99.1533888633611; Fri, 10 Aug 2018 01:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533888633; cv=none; d=google.com; s=arc-20160816; b=VLDcXyXnmQt5yrQYBmRotmIQUEG4kDaXHgZWWSyfzUYtwAWvdsOLfYaZ4iECxX94lO Bz56zuZL/3Y5Zr+cZRF8sJVTC5oIxxGUMPdYBmL2YGAu50fD+tXKQ//OFDOSGS2Df7e6 eZYHKtlNihfNZpzjbpsHB253U/T6ASL5sMAxHEegMY7/JRdCVftCf7JfwVVc/Zrl4UUN uDuFQ0gEO5iqf4XsAxCKxmIaoPU4kcsDA1kO8AO6lDqeGCRSho/6BpeggkPXkh1J14F4 WpKULuRKTvFYmg7tivSiFn+8rBymvNHaL0gIXFA2LyL1PbzpkVjLA5jFWc6ig0FHUCyj oXrA== 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=tD44cwr7sXYWqErJJIfO3Bw2kiDKPPT7OrF4lHBn54Q=; b=a2s9vIK27eRJ/P/1M3CU6akgLRzIEDsfu6y+5Oztxq4p3d3UA5JvFxeg+9vGu+mCRc z99IPfW8e1SPHy4HVyHlXtJNe5jrxhgYnIeAkX10SwrUQRBvx0FSo2GWGYGVmLpq3fcL AcftfVZxSk8LMbb2p1ZBx58s6yK4plSYyJzhntaVPQT8NN9ACkXDP/kc/B4LkiNhDbPX UqhNGhqR9csKvIqCyXOCS+lOUuIm3Yikf75M0gAP1fWg8lqi8TAgGp+UpjppVV0pfoWH gpQHjz2fn+C3iZkxDzTK5uYLi3YmW0eIOdkIpYJCXxP1irzzgZbxGue/eAOM5NKvLz7r PM5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=i7Jvdqv3; 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 n2-v6si8144303pgu.103.2018.08.10.01.10.18; Fri, 10 Aug 2018 01:10:33 -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=i7Jvdqv3; 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 S1728168AbeHJKej (ORCPT + 99 others); Fri, 10 Aug 2018 06:34:39 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50658 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728109AbeHJKeh (ORCPT ); Fri, 10 Aug 2018 06:34:37 -0400 Received: by mail-wm0-f65.google.com with SMTP id s12-v6so936658wmc.0 for ; Fri, 10 Aug 2018 01:05:52 -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=tD44cwr7sXYWqErJJIfO3Bw2kiDKPPT7OrF4lHBn54Q=; b=i7Jvdqv359c3LP6OxStHLZ7WdU4oXFsEe8+hVERmjmFAEBoR8qmvSggSTMdYxFlNkC BCLq7T8HJOrb0i4rZQy24/Afr07dzjSmQXu4d2zbgAdXcsosxzWFMX32XPlnMGR/ZRDq pgXbxP7pTUzvFNsfn1YOSihDxggLE3H132nAUQbJykILNhNssDIBGFOT4/Xxj3iTKw7v +RNlbQbxGNpAmLAtlIhWdgNWmkqUYtl5dtuhzSVrirK1X/fr/uIWQv9Hnw4LMwWjCtcG lzL9KKvAsng4e7nkGXgO0WQA8luehep9Cvfbl4h//9hc15IfokThlYgIhTpe6KnqGlur szkQ== 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=tD44cwr7sXYWqErJJIfO3Bw2kiDKPPT7OrF4lHBn54Q=; b=H+DCDcLEsM1k/8tHUHD8xApVpftykxZEfAXx0mZHtbcknHq4XiXfvyP7+/O3zJGarp clRkll4Dbz6f2vk3GpeyAzJrm9A6rpFNKZlmkaEnHvjQFqLnMN3cTYGcKXikJKGTek4y rv1KTjzgOGnXtmAM3JH8fFsW+KCyZRQnn/hHsuXcXluAWiQ1pA9o71ECgSMqJHdVcFou xt0uCygpFChlSE/yHszQVsVtvbXya3kUvGpr1UFiJ6m7Dt2zk/qawPPF7uCSsnEXvZgz ytjnSs8bBQ1oDJgjVOmGhxHiXD7wwtSAXEtzn4E5VVz8wabMi2HfqZwPRU8hSJHr9wOL X10w== X-Gm-Message-State: AOUpUlEDwwnL+1P9di6Ib3sbJlNzj2bR/uCQ/JbP71+4cL4urNXyJIAy pxdIQHSNgPyxGt+eqFIkJ53rmQ== X-Received: by 2002:a1c:cf0a:: with SMTP id f10-v6mr762990wmg.32.1533888351724; Fri, 10 Aug 2018 01:05:51 -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.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:05:51 -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 10/29] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Fri, 10 Aug 2018 10:05:07 +0200 Message-Id: <20180810080526.27207-11-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-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..9a055ebba081 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -21,6 +21,7 @@ #include #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 -- 2.18.0