Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp971358imm; Wed, 8 Aug 2018 08:39:16 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwh6tUVsF+1nWb7swT42gl0biac26CZUIx7jPDClcBa9Gj1JEPPqlRRJIa+9EPmEn2ZGTlz X-Received: by 2002:a63:f18:: with SMTP id e24-v6mr3108700pgl.320.1533742756874; Wed, 08 Aug 2018 08:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742756; cv=none; d=google.com; s=arc-20160816; b=EaOUMmTrNvy5PwIoUsJxA8xrouG30Q/PHUxKdzZOqCu0iRrlwwdF0PkHoRMf9YJc8H GrqpTDYM8qMliY2JZiHaFMS3p8Vftk6iI0fzkZ4rbbAriehRjCXp7iK2ZfjfZDMIiSJn rtmj3A6GATSfJ7O+8uor7vjCvnSvRZ0Fjb6WAoEY3tQf5R2zctZdJOATGK9GxBE4BTOk k+cBeYPcliTm83me8kcB3PvvaY0Lj7Iq4DHI4TmM10Ty7BN7hiaO2MwcwJc1uJ7n9+lM xvuu0Y9s3AhnFuwSt6QNCa4y/I6A6FxM+vYe+DUml9Fe0RTnNNwwMheItzfl6UI2Uq4b PZiw== 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=UaMCnpUR2BVBntYfvCxdZ/Bq79Ac4uMXuz598bqXs7A=; b=DqtkUsNvPo6yQLV75fG6qFTflSrvEgIXBqdoncxbojapSzKjgb6/TnZQC7gFmkWAu8 RRNCKUZcyd3+YG61Dwq6iDHznH2kNxX3kim0Wx5nSAeL5FnTgQ9ctZjE19dyGzPPu9MO xeFRN+mZ2QbQbwTpnW2nDScdnn27EQqjZN3eBuW1M92DaiLNysuYJMJhL6OB0EuYWQsO DQ5rYUERLE78Oig6ZFVA0YCR7HCTCvnndHEPLOMWTu91lAH7GNGIwWL0BLBtE5Zl6lgS kqFLf+At4V2HVeoXh6c0HojGFrf/MXQ2sP4dR1o3uTBcybGPMwt+BvPt/3pogbmgIO4K tqeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=sX3LdCS9; 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 22-v6si5053770pfy.169.2018.08.08.08.39.02; Wed, 08 Aug 2018 08:39:16 -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=sX3LdCS9; 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 S1728610AbeHHRx6 (ORCPT + 99 others); Wed, 8 Aug 2018 13:53:58 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33490 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728382AbeHHRx6 (ORCPT ); Wed, 8 Aug 2018 13:53:58 -0400 Received: by mail-wm0-f68.google.com with SMTP id r24-v6so957035wmh.0 for ; Wed, 08 Aug 2018 08:33:47 -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=UaMCnpUR2BVBntYfvCxdZ/Bq79Ac4uMXuz598bqXs7A=; b=sX3LdCS9jckTwsFoDRZe2ahO/owvgdq6cCChJEa3aJ/Et9TzlvzCyrDD7WxkyMlRZ0 QlmREy2BfoqdyqUZeHX1IIi6UXlScQkArZuw+rSqneDpZTM+uXC/9EMA4XdNsOrEH63/ DEjqcfmns62vUHPQGv9DpafvUOgLrUIi5CkNVwgafZCRFEf6D2zT+L6fwHuCSvVP8w+z Xyaia7fBe/EKYz+IMDXA3ALQ77NU56rAD+ydVE6EJaQHy3boTJgDNrjbL8f46DozzXZl Q8BB0z7JQY9DwwAodb65jGQ0c2/htq8XqjQMofOnm+dUSg6yk7e1akmeQi+Z/eb8A9WN uNUg== 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=UaMCnpUR2BVBntYfvCxdZ/Bq79Ac4uMXuz598bqXs7A=; b=TvHiMh3mwROH2K+mqHa8+j2EjjvXMaWWRJQnmzvPOcuwdu7ME+lP0XyiMdBA9xdK1A uY2hZooB5+h2yeKxSQY6WGNTkthi52mbR2snEu4WyiG8VDoL59hHFDAIHuBCse8tdPW1 XYbDB7HVCAFu2+cWN9iQtVwwzQzYnvsNBLk7qw7FDdDmdxDaezxbejBDZqu88YWS7KGt J3iN187MIMZUsRYoMamR0FnOXABE0nKcTnBqNbd+UTHrzpCqo79/XQOXaXMHomWeBF6j eFSoom3LdM42cCRh/J0VBXV9GDpDKC/6jZDlaTySx/dqr3lUfzLy+pGddcTnp527qoak Tncw== X-Gm-Message-State: AOUpUlEFRjNpWke0kgUWKY5qgl75mmqfIPmSYPkv8eGyI7oxM/l2J6OR byXX8RMHwVL+gLSfSS/OEQ/i9Q== X-Received: by 2002:a1c:c241:: with SMTP id s62-v6mr2326164wmf.146.1533742426569; Wed, 08 Aug 2018 08:33:46 -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 s2-v6sm5240915wrw.52.2018.08.08.08.33.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:33:45 -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 10/28] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Wed, 8 Aug 2018 17:31:32 +0200 Message-Id: <20180808153150.23444-11-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180808153150.23444-1-brgl@bgdev.pl> References: <20180808153150.23444-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..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 -- 2.18.0