Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp593294imm; Fri, 29 Jun 2018 03:11:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI7FKOA65dKepWEm9zzmyH7eeVJRWK/fjsEEhkhhJryZFLQEUkpPuIXiXVk4RF85HHH3/35 X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr11995057pgq.250.1530267100204; Fri, 29 Jun 2018 03:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530267100; cv=none; d=google.com; s=arc-20160816; b=R4psUrfYtisC1u+86D1xzQ/Pf+pBFkZyWtfTOP8UqRg5xsVbauQ6txqQQYZEzQeGT5 Fz21Fge+MMGqzhtLj/hXZUMhtTA9IqFU0v6/cmtVkxbYngqYad4HWdw/WoM/T0tqO7WX qAcyfRvGbK1WR1uUpj9jj/kF2vSjm8yHTTTZfDzJfbTdbKZeQxeqfTseNAjuEmFmlzV7 LKm3awZojxe9MbQXetwy+Di7QKMH+7ebCfHNq1Qe1Qs9H/FXzS1wBD9JXVz3YgbPa/07 O9pn1TvG2aHaXTZ1QNjwUQHAu4WkB+uNiFlHioKG9iMf4RgfcxBgPPqtBB7zNAGP7p6X OgKQ== 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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=VDnnqnMjBMQQpRvXSIrFZGFueF/5LcF2xegQv0WkcyFf8Uy5HUBEBq9LRTYi3Vu9FC z6zv6aNT/rgfne5QgAmqJqjd9jCeShzNBqPPX548+p50Ze9GXwFN5ypGkhMbR/e6dOgJ jrB+wt6+gRkj7iLVC2mnX83lV9PctAuj+M7iehBcu0d2sKka69vGH1k6Zxr4OXERuhiS nGjSvT78VCLKemkBbXJ0msVXrQvbdvlQR65DOPeAS640XMHtMrpTDVrd7/PkbMTEFQ4b AHeIfiSk1oL1ISKY3TQm4G8/Fs9u4yvriqwF2TqmRK7fmsssVVdEQrABW8vx34MoulVK GEZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=AUQcx8MS; 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 t5-v6si5804405plz.286.2018.06.29.03.11.25; Fri, 29 Jun 2018 03:11:40 -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=AUQcx8MS; 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 S1753955AbeF2Jq4 (ORCPT + 99 others); Fri, 29 Jun 2018 05:46:56 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:42485 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754637AbeF2Jks (ORCPT ); Fri, 29 Jun 2018 05:40:48 -0400 Received: by mail-wr0-f195.google.com with SMTP id p1-v6so8209754wrs.9 for ; Fri, 29 Jun 2018 02:40:48 -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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=AUQcx8MSzvEVx8ntynYLAJtPX8iUcOhCeWYtwDHS3SSx4CYQShmQrZWhnqLS6xvc4P pjYsadgXaEe6c8KhwSIH/csBXbYLxRi5BmoiM8BTIX+B/g6uuEEAeYZSIIiDhhyYDiVJ NWr4hWwsu1BHI7qap/QjZmGwdy4G9t/cr7Kj0zPwoBRHMShlcQV0m+qy1z0QNFUvvNjl HivVRB0fO4HCCp/hTKKKBT0Ho7Yf07KhoMb0sxw9Ug+fG5CDwNOH28MXTdJOEdFapTa2 sNOxsbC999XRVJnB90/GmpSvRBrFM+BzPEhJ//wrc6wztUDVkvhnGxhtcPG2Di0a5mTi xeUg== 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=NOzx46Z/qbsyhPpgprf9QNULjx54ex463sUBqP8VjUc=; b=k8fKbn0GxsNXxk+yPqt47hDNVOTcK/ZKDgZJv3uwDZnJQW0Qsxl5N8D6kguFh3YukI biQB6vNvW17b6xogVzfKRQqExaJkk/EeWJnbGsEZ7IE4MAKTPmR1JStyU/Awg+dE0i6x HLsrb7Qmb++ml+1UvdaiWce8pWY4OUfj6A3qqrh1UV7E4WQslB5YDWlQCGwogqFM8D3k BKLJinVfAY7T6+Pxby+za5k2pFpgnHAqcDI9VuSW6RSAhebwD8M783LrgFVR9WhBP6xS Sa4kkhpW9STEDAWUkNCqJCX5cza9FOsEa3UXYqxGrohG/imumqpz3x2fTCnsqgTdsPUh xumw== X-Gm-Message-State: APt69E3cOKSsOzdD6trONsjJZf6udayXwQMxbSs6hqjOaOy1C26imZah RFdAlh54btUCdcjNV8cW53iy/A== X-Received: by 2002:adf:a963:: with SMTP id u90-v6mr11131948wrc.248.1530265247510; Fri, 29 Jun 2018 02:40:47 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:46 -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 03/18] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:24 +0200 Message-Id: <20180629094039.7543-4-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-dm365-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 435f7ec7d9af..cb0ac92a278e 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,15 @@ static struct platform_device davinci_nand_device = { }, }; +static struct nvmem_cell_lookup dm365evm_mac_address_cell = { + .info = { + .name = "mac-address", + .offset = 0x7f00, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", +}; + static struct at24_platform_data eeprom_info = { .byte_len = (256*1024) / 8, .page_size = 64, @@ -769,6 +779,8 @@ static __init void dm365_evm_init(void) dm365_init_spi0(BIT(0), dm365_evm_spi_info, ARRAY_SIZE(dm365_evm_spi_info)); + + nvmem_add_lookup_table(&dm365evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") -- 2.17.1