Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp763189imm; Fri, 29 Jun 2018 06:05:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd554dGUbS/RkccBnL/0kImYjGtB/a2UHEfWL91h4qastiPXeqTDAlQoIubPkVZAjL+B0ZX X-Received: by 2002:a62:9c9c:: with SMTP id u28-v6mr14577290pfk.90.1530277543750; Fri, 29 Jun 2018 06:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530277543; cv=none; d=google.com; s=arc-20160816; b=jF2xACoK9f+m7OOo/s9eKSp5SSDX6oecLUeJ26lKZw6U7IaWn7izdPWEMfxFL4YBFP 35OVlFYFa9amOUZn4sfjj1PIqtLWsr6AF9Uhfv8GGs6XgkHrtR1z2DlwSuzgrQTgCntV fZDysoSs4pwSE2TS0pL9Mg/m2TOYGA7YqPzYDv78AhlVvyGJOulj9PWifbZsTyRFxpx0 Bech9fVEWVbWJbci4U6KRmDnwJX1D3ldggv+mGVXNIZiGVAokvq46V32gxU8juCZR3op uYGw1BkrKESD1RhgeZnLJTU6oZNdCN3OYnQ63iQ1FKfl66n55kYZ3e2aC7WA88+L0+mb gEWQ== 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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=RDZZTe3kQtZkNCT7mojbBsGtXMUyZzNDuFza8b3BrIVV0njkZlCZIDHRbSHMVr95H6 l/rjHc7lRTB+tmg3nGGWEbqpmClrmj/gamE7CYoIe1utsEZXLxu3Yy8UVMx6QzdRXEyF hS+CkjXjmVSgtkByHg7W/fcm4ra1JAhOlH5mEjesLU2jl/SNiQpeGYYxBcR3l0erQWeC 8lsSnqPzHxaAwK4xBOvkRTKyLiFOvnpf6/jonleY5PUXCoSbhU++69trbK9Fj54vJ+DI jvpng1EgOoBCmHf+R8YwLO49YDHs4vLgx8NoHDRfd9LEXkgxWoWSV9/FLsK+jJXHV05t kBpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=U+sAWmvN; 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 t69-v6si8097676pgd.271.2018.06.29.06.05.19; Fri, 29 Jun 2018 06:05:43 -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=U+sAWmvN; 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 S1753527AbeF2JpY (ORCPT + 99 others); Fri, 29 Jun 2018 05:45:24 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:46267 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754795AbeF2Jkx (ORCPT ); Fri, 29 Jun 2018 05:40:53 -0400 Received: by mail-wr0-f194.google.com with SMTP id t6-v6so8186706wrq.13 for ; Fri, 29 Jun 2018 02:40:52 -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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=U+sAWmvNuSrgbDC6BrFdeoaZ4hyFWBfqcGBPACt4D858L3dP5g6pjLquMX3gZb0gXl /b2I9Kctj0DMA6DEVzpcFAczMrDC1z23hLmFCyiT09qE+gb3lGuP4OBa4CSh8tFFceHB 0ps4fDMOdN8yfbxN3TFFKQ/DciZc0+Sb7XZzv51M2K3zckjW3HVPaeGGLfuaSqE+ytdW 5hP4+pB0umzi7QrvV7Q6HLo0Nx+o/Q5qRX8xiuevqfhhrAV8xOF1IZEORK5mTH9xq7/4 dzip8EMi1Bxm6PmXEhVbWjiEKxEORRvxTsPYRQAWnxwb8Ywi1qMHgktRLjMh1yjQ5rXd FHWw== 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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=jShHCJ2cuRfI/ApuUMgzVcmDJ2Gm3kF3JSxI5hVMk7j4cUjROpCsMEJLQtwxCEzXEV NzncwibpBq05s7MBROu7qyzgyRHAWp8gcvOlN+spsevt8i1p7UwQOCdDsmiAfyLN/o3s SioZvdsUurMMPjEmJVtPpLh0utZolHMw3PyiXy9MKbOyq2tEhGevTkBIFjwuxf9W678v Ku9koX9bznEypeEsYezJc8U0NAqd0Hi2zZC36Uxls3qDSlDF4+6LRmY02irUyfUcTxNS PTfiWhVhAUB1Z6dw5Dfg03jn0RICcCZ6EEvW5DZygbMZRdGY/dogR9aZjodODBHwLJto L48Q== X-Gm-Message-State: APt69E21dgQ6edcYns/fo0MaZdHzQdBmlzZCyRQHrsyg5bjiTAkH4Sin hpTrbLHvmkjDFCIZIUm/QIPV2A== X-Received: by 2002:adf:86ae:: with SMTP id 43-v6mr10691949wrx.281.1530265251847; Fri, 29 Jun 2018 02:40:51 -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.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:51 -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 06/18] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:27 +0200 Message-Id: <20180629094039.7543-7-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-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.17.1