Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3005318imm; Fri, 10 Aug 2018 02:01:35 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzkg/gJSoVTKr2VJkqHD4bvAgbzvng0e65EkU64POoLbmSzg0Wgf3vho1FlYQQDOoWg3JgI X-Received: by 2002:a63:fa18:: with SMTP id y24-v6mr5638989pgh.362.1533891695815; Fri, 10 Aug 2018 02:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533891695; cv=none; d=google.com; s=arc-20160816; b=UHiN30qLdqLTqMUeHs02cgt1eqTEMHnXs4rqrdwuUvrN+PjPFwfLcAwkXcFpz3pmB9 bV+Rj51LBrS/kDfKg01BfwCInlicjZdMMvMu81eN4CmN4/jg4E76OIVXThNMJUp3smg+ dKTbFFB4baaZiY16f0ymruSK7Mp76a2vOFpByvoFEkn3d4vKIBmJFBRIOfks2RonPGbs pswXmyCNmKBF+Gnab9Ntm2eeXLYiNE5u8Q5rgWXR2IqHDV7RHEhkVhTUF0XXZNN+AH33 Tde6byOnM2+axc1dCae6XF9wifUIJx5SwFRQhFnJ8orf7LofWkMgIHTIccgFgVsD4V+L PKWA== 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=bxzAHxBZXjRxHAL9jtG/FK0HAvx9UzeP0h5va0TWUB0=; b=oFY+HA4LX2Vl1gUMu0d4MPhBc1R57RAnx+HjMJaZpsHRKuoIq2QvaHIaiGLDlspYed betxa+Q+52eFBV5wERl48xHKqID+AIv7C+H9sVqS2kAkySMKvPUEvInnKLA16e+8wqzz RvB/8anpvEyE7OEoxQC3ZFHu6ZcrRMTFnGZiB5zzSH5sxk95Eu3h/Oa+XDaWKawDS6+e MXYd70IH0XOX3LIdhwv7PAlXnXqaf94eZUrLY3Yav1jsCfxxQREVd+ugRC9XNydTqMXs nBMyR2LjnUWm5NBQ/Jl4gDM3mk7oAnCtzX3lf/aCNjXtS28zieeFY3tJT6tiqa7I8+87 Rryg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=L1fUj1hx; 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 192-v6si10602583pfa.81.2018.08.10.02.01.21; Fri, 10 Aug 2018 02:01:35 -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=L1fUj1hx; 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 S1729138AbeHJKh3 (ORCPT + 99 others); Fri, 10 Aug 2018 06:37:29 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37336 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728151AbeHJKek (ORCPT ); Fri, 10 Aug 2018 06:34:40 -0400 Received: by mail-wr1-f66.google.com with SMTP id u12-v6so7467922wrr.4 for ; Fri, 10 Aug 2018 01:05:54 -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=bxzAHxBZXjRxHAL9jtG/FK0HAvx9UzeP0h5va0TWUB0=; b=L1fUj1hxtvDEdmNJU7oSl9Zu87psQ9mN+BYuQMmV9OdAN1nOBQ+AEFM9fFW5ry0wTQ QZHF7LAtJ8oBD7VzPOPwcOkALe5JGmaB94B5fBCyNAFd6J/D0/+brCg1r98mH1ty5zPH wr4DdkYYDJGOIM7oIGesWQDssRhswq6aeudoxfAN8OJTcgMpLNTRPZt1fm8gRAOFdH1P mogJFjE9ERXOPDa7N+QSQvQqROs0B9xCPyOAikWsYsD3zYGoZi9n9zhhvSlZfWrXBToh 8+CBFf6IUu+Jap6RecJw+TnTmAoRqAV/unfwokpnk85Cd2U+OKVesvbOfoqh02sOP8+M xEIg== 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=bxzAHxBZXjRxHAL9jtG/FK0HAvx9UzeP0h5va0TWUB0=; b=GwEcF6HTw0ODn9jD7sbnMaHYrXfZAUrBUUzWwY+jyO7VcwuvNZuBfNIa0ynD8YdSQG pGpU1AwliPPJ7+HUMh9lDyiU0e5qp+U/eo0rnYWW4lWj03ChNHlsRwxrb+g8boxIVaps PKBbijsOwOFZBimBJ6QGNI0+1/FcEjhtPuzqIRG082dTlimGoNjUF5XA+wIdLT/rTkx8 Vux5Y3zCx+T5BU5AOYode9D8InR34yczBfqKKr28F4tT6tW/CFvaVLTxrb7QfxjVl4IE jbfbIGZx+p1+4luLt6PQZzeT6VHPB5lTV47JbCJ3y0zyODzLaNKy8QDDRXWWZ/I14/cl 58Xw== X-Gm-Message-State: AOUpUlGjMuqarxweSHfGgdfY6lieEeHxmKQfxrlNkasystDGAcwJ4Hh+ MQF+76HjNP6CvfLoleYGqlS85A== X-Received: by 2002:adf:9304:: with SMTP id 4-v6mr442888wro.48.1533888353574; Fri, 10 Aug 2018 01:05:53 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:05:52 -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 11/29] ARM: davinci: mityomapl138: add nvmem cells lookup entries Date: Fri, 10 Aug 2018 10:05:08 +0200 Message-Id: <20180810080526.27207-12-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-mityomapl138.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 37b3e48a21d1..48a9bae76e4a 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -160,6 +161,25 @@ static void read_factory_config(struct nvmem_device *nvmem, void *context) mityomapl138_cpufreq_init(partnum); } +static struct nvmem_cell_lookup mityomapl138_nvmem_cells[] = { + { + .info = { + .name = "factory-config", + .offset = 0x0, + .bytes = sizeof(struct factory_config), + }, + .nvmem_name = "1-00500", + }, + { + .info = { + .name = "mac-address", + .offset = 0x64, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", + } +}; + static struct at24_platform_data mityomapl138_fd_chip = { .byte_len = 256, .page_size = 8, @@ -534,6 +554,8 @@ static void __init mityomapl138_init(void) if (ret) pr_warn("spi 1 registration failed: %d\n", ret); + nvmem_add_lookup_table(mityomapl138_nvmem_cells, + ARRAY_SIZE(mityomapl138_nvmem_cells)); mityomapl138_config_emac(); ret = da8xx_register_rtc(); -- 2.18.0