Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp587611imm; Fri, 29 Jun 2018 03:05:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLR5KW+dy8coOeyfNbhQuinqPeyf4B1VzEPsq223hqWQTplRmMFOqjR7YPuIu/KatUiOsDP X-Received: by 2002:a65:42c3:: with SMTP id l3-v6mr11517976pgp.398.1530266737125; Fri, 29 Jun 2018 03:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530266737; cv=none; d=google.com; s=arc-20160816; b=aFybKSVC2h0t9+FdfPm2FyqTG+9oobEB2uh1CpS6hW1bkb9si+EbY6Pb+Jv1VLN2Ep fBQjQeZdB/tJ0etsXqjs1IdNR4wTpaWQ0Gw/ivOMKqLjMJAsQSODpj5v1DyUaxvBx+SR Mg7TBK6EQ3bDI+BDbWGm0z/T3Gun5Vg7QIthajm22fmuxVddiWyKC2arKtnKxYbvV4fs jn6yCV3NnwG12PvosgG7kZMllTmxD/oJS2b1yg2s5E2YLSzYYbdGnHoo0QbrFyIvCRRY 9kzkaGf4Fn7X0mZkSPOveNxWGQL7MNLWKT1v4l+1UkeR9cn9yT5k/U/bXdRJCg48VqwC VYXw== 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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=MqzzvEnUdPIYN1WgVPsF33qx/1Mb+zVPQixwB39dJU5/AGmWTacEwef6ct/o+9VMbq 36mxH4ZMlBywx7i0l2Df1Sh2q+QQyEM5NtmoHROCPulkdNZvLmYxPw/XHHFxMCKX1oal khSokVXni6XJTMXdjljihs9lEaU4NwFylY/OgFgMfwZTglBw31V5jbDDIkgP1Yd76b0H 3FOLab4VJS7KfXQkefTjrmnGg3QCFJ5I7jOjUgcxbyrizQz8QOn7i8vUElkNKcskBk+J 1EFquYC+W9NzCLfJWmDYYUJB/FRE37AeCPBq9QGKXbVx1KI+pGJQoy9iePdl94NEdIHu n4iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="IPzhrL/W"; 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 w75-v6si3509473pfi.88.2018.06.29.03.05.22; Fri, 29 Jun 2018 03:05:37 -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="IPzhrL/W"; 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 S935719AbeF2Jk6 (ORCPT + 99 others); Fri, 29 Jun 2018 05:40:58 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:56286 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754722AbeF2Jkw (ORCPT ); Fri, 29 Jun 2018 05:40:52 -0400 Received: by mail-wm0-f65.google.com with SMTP id v16-v6so1476545wmv.5 for ; Fri, 29 Jun 2018 02:40:51 -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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=IPzhrL/Wfl5EHcc2OjGi/1xooGj0EAxTifM32A3NSCR/y6LSMrO03YbiChhNBBt/Wp jijHgGa15QFHeDK0V5+ZyPp00D7V4aWXd4S8C86DfZADwkpnGbMPM2ThQK4v60Mj8jJs g/Y+/H4gm86pfaQcXOXyTQgKUqqGrxiDoU8qk41Wk8jrq+cmPtyNT5KrbpETQprE6oDC tfR3sQFkgG2D2YmyWx55QeoViUxzjJyaQYMrPp7gMp4WnMsBlAHRc3vZbusg5RzK76Xx vu3nR3+Py4jqg/h8yP0kr9H1NGDtBvyjLbwqlwITc8a9HoknKRg5pZOtpkOA3jeJRTFR 64oA== 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=UGz2gYHTeu1D++Ca38OeE+7ttdk0CFVrhyKKlCaVXXs=; b=Q2QbGlky7dF+33oldiVA4g62rhOJ23TGYnK75E4pYNvS36gwN44wSz1DgZC+KmKEiY lZkOc8WvNuIsmaK2P/qquKt/wk7DS24caX2HBKnqTJpwSjGd3K23HmtZsZg/pK3saoBc KZWlhMqWAUzJWcsWGX/bcmI52HWapc6JTr3vncBNf9D/WMHy6vLp/KB4gHOuwpY/pLXh ej3VsQsJSdK09QiHjlCfQVDUaNAxnVE2kS5LprCTQK68zUXUyRDvjZj0Ymw9+WFdOtJ1 ahJskfleRl5bVZRq6uhMJyXvR+U4cqs2bhNZmw0jYLpQPqMVU0XQZW3KU8hpTkEVOXQu N3Ag== X-Gm-Message-State: APt69E1oqACHNk44pk+WO863tnTxHfXV0Hr+X6dhI35FBjPVLr9bvsrc MI3jhFQrqcQUjGV24noCTprGXQ== X-Received: by 2002:a1c:8312:: with SMTP id f18-v6mr1253255wmd.127.1530265250476; Fri, 29 Jun 2018 02:40:50 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:49 -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 05/18] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:26 +0200 Message-Id: <20180629094039.7543-6-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-dm646x-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 584064fdabf5..5a9de47bc8a2 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -310,6 +311,15 @@ static struct pcf857x_platform_data pcf_data = { * - ... newer boards may have more */ +static struct nvmem_cell_lookup dm646x_evm_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, @@ -802,6 +812,8 @@ static __init void evm_init(void) davinci_init_ide(); soc_info->emac_pdata->phy_id = DM646X_EVM_PHY_ID; + + nvmem_add_lookup_table(&dm646x_evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") -- 2.17.1