Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp971054imm; Wed, 8 Aug 2018 08:39:01 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwAqbM+yM6k7L8t3klt5GsWuPMAl03WaZvOTdWIeU1KK7Sgl6qk2oxXS6BpA5aFw8TSfPrP X-Received: by 2002:a17:902:6b4c:: with SMTP id g12-v6mr3010189plt.159.1533742741137; Wed, 08 Aug 2018 08:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742741; cv=none; d=google.com; s=arc-20160816; b=hlCSI90pSJ6bXteC4dS3LR7gfTMAm1GKdfQU1goLDZFjsIC3SbC+FEty91pV0HrB7K Se/PnonM25sb1UtQ1tHaGnC5SAAsaxnYMk/dQVGJ2w+2ar/CIXhOBRcbUifHpylaFa/7 wTpJuvUbi+wu7PBelnOuwMvXh3kL6nfsm6tkD2BC3UmWXnAQdnPQgVftm37m700lGjFH Hio9uj5XwjsKm/fk+A1bKnedGVvVImaBMtthO7IDthnqUF2ratH7f2nfNEG2qTCTEoqr qKFWzMGxCiJDb7BnBwPXIK9hCB+7rmUOzu2Q5WYFLy9IBhzBYJ3kmgqmXJiQRgcWJJFm CVuQ== 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=5gXeisQUg9CT/e0TVeNKIqgvnnNtiYjxB6KBG0kRtOg=; b=wQPNlu7e6LvLbv4qm7lvfK1S7CqAfNwlENHf5YlMbUWKgda5V+iPfmVM9nnd2imlZ+ 5wcROFkOGcMsRYDEWoL1n4CdzntaY6ONdEVfGCFkrnEHkB2A8JpzCrcJbEb1z2JDFkr5 0KmUHA5wViQh41dw2KBNfGPaxxLq6IaXI2E+yZf4DvQ7yfGEYhUkfvC/8m+KzM4995Jq Qandz2RFadxaC6z7Q1sEwe4IkfyrTIsSyfhbcYjd8DulKQilB4m5ONLcb+5Yd94kJ7L+ Jz/KGF9HckFodWafu5KlxNWzrZeXYnr0eYfZvqUtvGqezKHhknKa6bfSO4TERJ7LtRZF E42w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=QkqXrrSR; 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 y6-v6si4713646pfy.140.2018.08.08.08.38.46; Wed, 08 Aug 2018 08:39:01 -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=QkqXrrSR; 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 S1729036AbeHHRyB (ORCPT + 99 others); Wed, 8 Aug 2018 13:54:01 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33493 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728686AbeHHRx7 (ORCPT ); Wed, 8 Aug 2018 13:53:59 -0400 Received: by mail-wm0-f68.google.com with SMTP id r24-v6so957084wmh.0 for ; Wed, 08 Aug 2018 08:33:49 -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=5gXeisQUg9CT/e0TVeNKIqgvnnNtiYjxB6KBG0kRtOg=; b=QkqXrrSRt28avbRFzep8u9o6/pMPtCVFMth9MyQLeywkgPV8oV+NTVwVkzumsndxpi +VAvWKHMtM7vT4ZLp4l8fD4uW2WE6UMRN959AV0jA9BfDTAdocYUEmP5NIb+CVd3xCk7 2wjDVsIsY6gnK5vhsesri/PIO7HQbFuIWSqA2pFEDEgPJG5zVQptJYr8gxWvl6IUZGi8 3lpfQf6lmDMldihqejMTRbykRmG586A70Ol2XxJzuOwp02fwNCDjn8NXJH5hNMnXvqvJ gDWabQGU2oLKuOKuBhWjGw7ihf4UhS1zrOaty2BXAEXbVDOUnB64vNb61+mwLutOjIIP n2lA== 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=5gXeisQUg9CT/e0TVeNKIqgvnnNtiYjxB6KBG0kRtOg=; b=eae9Rbm1BnDoDYtV71HkRvHNMei+PTX2ZdC6bPU9HFk0QyCAUz7rP+nrZnWs1lBAvY Sqo7s6GYkm4F2xie4V93mEjPV5/RRvSo8vhVtz5krHfWioqh3l+SyVjNrHK2HxdfnyFv bPYby+GX68VG/S5E46TjKfzlvV9OhSUGXv7upY8BRtgV5TMcFuYRF04YLKYbv2QsqmqB OGbOTm+URFX6tYq5C99Av2aNfweJuVLw9mtLunapN6kVlkVDbqatp4x0pLSOx/dZ3Edk sq2SYCQ6yJDxRalSwXC119uj+jXCsS9mvg2zQZix2N4+/sIdQqX/5N1QQzRjP6dA7QH2 E9og== X-Gm-Message-State: AOUpUlECp1o4HNv5NZAttj4JLO3ndhkSE/oqEK6BQoUDUW8V1VUdZFH3 8YasTCOHn+B5OFzZ1kao+vbbHA== X-Received: by 2002:a7b:c013:: with SMTP id c19-v6mr1901158wmb.53.1533742428438; Wed, 08 Aug 2018 08:33:48 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:33:47 -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 11/28] ARM: davinci: mityomapl138: add nvmem cells lookup entries Date: Wed, 8 Aug 2018 17:31:33 +0200 Message-Id: <20180808153150.23444-12-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-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.18.0