Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp590317imm; Fri, 29 Jun 2018 03:08:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfwT03l78PU3C8RawCrQt1oIRSTQ/dpAQ/b03nUGpZLzgs7GjYSpp1Rrb94WgZIaRNGVZo/ X-Received: by 2002:a62:c61d:: with SMTP id m29-v6mr13897011pfg.26.1530266903917; Fri, 29 Jun 2018 03:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530266903; cv=none; d=google.com; s=arc-20160816; b=jdOh7h8I2iYmaN5C6s0ts9SRbnH4M3AZXSvNc630M4L09+oWXQMbjRF+K+O3GN8b1v kmXmGAvu1KbRs/8v7qD/L8/c7F98XBn6sRyt5JMruK6eNVNz1tEP7FEWC90erRZYVwP5 fYbLdJaqJOoZYFK8lwKg06l+M/sG01VK/F3c9rrthwd/EorSIyxbREQ02Tm+dq9rKMcv WxP/98Q6APXt3ngqc3fdP1CEjIOM2rX0YWlI6OEG7PO6nUB7C0H5jCAVxOojhMNAHv7y TL+6GJaHy9RRCEBA3rBLg+JAoUgsfV39BstujlWPHzmDoDSa2fLgf4ki+zfqSjrnGLrZ 2mSg== 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=uc9DsLvuo9YkRZ27l37cWzXamU3JMdrZofUpXwWBSEI=; b=VZ/9xX6mXdgR4vh8+PGCfxuVMBnEg+8Bl/u/ZqyNWuCn4ua+m72SDff6DpHhio8BXd JZ2PVet0Z6E0PLJeKfdkRZxg51PJOl57YV5UHTznSzNOF/gxPLXK5sSs5TjIvECHa6J1 4N0Tu0dKLQcqxMm6OHiRq4399or1xl9/EpnCgckMycCahGa9TYZ5gSrCcrryUKfyhUcp rxC4FDFPw7MmU/98+ZTI/AHDpMGSQSMy+1LL9YAmNHaA2RT+cjJvLVDykLGNqugGUTqm Wu7k0NNzv2KkCAtp+wxYRy8A0IHAHhzIBGG8hJo7lOXwLAPPZtGxhlVk4TGaoT7zkOmx /dwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Jb1VdHdd; 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 y187-v6si3764493pfy.101.2018.06.29.03.08.09; Fri, 29 Jun 2018 03:08:23 -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=Jb1VdHdd; 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 S1753194AbeF2JpW (ORCPT + 99 others); Fri, 29 Jun 2018 05:45:22 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34102 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754811AbeF2Jky (ORCPT ); Fri, 29 Jun 2018 05:40:54 -0400 Received: by mail-wm0-f44.google.com with SMTP id l15-v6so1508238wmc.1 for ; Fri, 29 Jun 2018 02:40:53 -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=uc9DsLvuo9YkRZ27l37cWzXamU3JMdrZofUpXwWBSEI=; b=Jb1VdHddxa2cEaIYOj+354E/9cRqqwGGzz1zmS8ndA3iU1XHbliWlMd5Ew96AoHjwI PRgenGAuhMMTupbBxxpSMRa4BLXvYFF1dMuL1Zvd45JIEL2/qkzbvWTr4yp63vIZbeZY k5kxmP098Jo0QfYeWmram+1QR5FVZAsv31K5/BHaDm1HE+dMdG0gt4BiIHpfk/n+J3Pj 33WbBUoE4KmPFMfW6LwRQsKkQrwQvkFkhurZ1Bs/0qS2fw8bSd0rYuXn8JMa3oWPdAMF mPjH9euUXR3GV+Di15FsuOfkIiuEOySohGmxqzl8yrvMoF8QRjnfsBfQob9ZhgYLPeiU 5Isw== 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=uc9DsLvuo9YkRZ27l37cWzXamU3JMdrZofUpXwWBSEI=; b=RnYWttzpXYJtF3vZe2JCl0gdDM6e0Da7MT3xqIhbAT19MwwUDsXDeVss7JM8N6lNjb uzzafqTMz8vfg+yc5RwdGvdy6ttIRtM8w3vjLGRYxCK8o4WHl7zVNp6cfwNCPyFHfs/6 VfzRkP3KOxBNORInxKvYs2luTxQQACEjMvUlplgrUCxR0AnQsR9xHEm/VVxVluh/r+3L NPhQH8lAiz8vK64eKvWgLf20Wiys4umqDsiO2Is4hhj+x3eItuFfBjVcy0513bndE2DY ICGXtjb54r0XS0pOkEsxiT4W+b275Oh1ZwH/3o9YD3bjrE2JJ0J2txSrDTzvbMMdtP3u Et9w== X-Gm-Message-State: APt69E2bDYFgtXyxxXeWKaZtuYOLlaZf+LzN+g/BkfePMssDweKofby7 WPXvjpBC3pQXH7WuhYURorCkbw== X-Received: by 2002:a1c:8893:: with SMTP id k141-v6mr1221248wmd.133.1530265253213; Fri, 29 Jun 2018 02:40:53 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-55-10.w2-15.abo.wanadoo.fr. [2.15.147.10]) by smtp.gmail.com with ESMTPSA id d102-v6sm1386394wma.10.2018.06.29.02.40.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:52 -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 v4 07/18] ARM: davinci: mityomapl138: add nvmem cells lookup entries Date: Fri, 29 Jun 2018 11:40:28 +0200 Message-Id: <20180629094039.7543-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-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..b5be51c0451e 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -21,6 +21,7 @@ #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.17.1