From patchwork Mon Jun 25 15:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10486879 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0ADED601D5 for ; Mon, 25 Jun 2018 15:56:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4E4E285A0 for ; Mon, 25 Jun 2018 15:56:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D980A285B6; Mon, 25 Jun 2018 15:56:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81667285A0 for ; Mon, 25 Jun 2018 15:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752961AbeFYP4E (ORCPT ); Mon, 25 Jun 2018 11:56:04 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51548 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752865AbeFYPvX (ORCPT ); Mon, 25 Jun 2018 11:51:23 -0400 Received: by mail-wm0-f65.google.com with SMTP id w137-v6so4529697wmw.1 for ; Mon, 25 Jun 2018 08:51:22 -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=YUevR5Ixj5eTkRIhfoVHLcI/JheqdImeN8VTMJbrIx0=; b=iI5vob+d3DZ49qbdm43iiIqPW14jjwcKjoFWAlLO6uaf//hoD0/nYlpv6i3m2iZTfY CTnKfS7Fh2XxgcYbfp9ww+0iQNCtg20ZcZYCoFQol23tq98NVUog02B2i0FdY3Z4IznC ODBkBJqLwgt3DMRZ8wi6GYXqrLTiXH0/s1wLUQwyUMA+feFsJ7wdUXgRTazQ4oVsfbMM 6niVKxCKCnUOEu0Q+ekI0ZsDGcXxRGM+2p5qTp1oARMVy5b+EOrVLzUMsSk0qHm4DByv ErMq4mx8eepJe1PMjMFbqoAZzX0zDy7sG8HtVWskNAsMibOYQgNcb9s2E5haPEnTVzlG 9dvA== 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=YUevR5Ixj5eTkRIhfoVHLcI/JheqdImeN8VTMJbrIx0=; b=jwub3wi8Khy+qDyXJZltadEehE4bpQ6fipYhqUyb6Xg5+J8PgPe+WGO5i6YkwxA7cU q5qQRLchFWP1ZQmgVC+ZMTDALsmcjSvugRGzZekP0DASS6RIt36xw8jRHPs0ALLaiTBk NbzkHkotII1zuX0Vd/hzRJiynCf6OO7HnlGMcdGaxSgsx5NxWreqlVs8ln9IuytqU1QJ w5rPtVmlb+Ss4VRkGSip86yugxNhVFoID6VOmAdi0t2Ob/PKEQJK+JRmmqkDUTUO3PM/ m9vKzFsql0WL8Il9WBhL45+3e882vSwBIq1GTmUQvKJ7vOZWWvZ1HxHy7Q7rkcGy+KxG eWzQ== X-Gm-Message-State: APt69E08HmCTn8dpRmC9foLfa/U6uCeU6qLRpy2RsMqrMvw2zg286bF2 AONJtsaoMKFQkYtuj+toDV6mhOd+r10= X-Google-Smtp-Source: AAOMgpe6NqkMzb9Kfx+00MZxZPbJ3Lu6BShfOB/R1x6ZnU1p87pJdP+lETpyefrOoi+6C/EVgYm/Vg== X-Received: by 2002:a1c:8f50:: with SMTP id r77-v6mr1527008wmd.77.1529941882166; Mon, 25 Jun 2018 08:51:22 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id x16-v6sm3523737wro.13.2018.06.25.08.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 08:51:21 -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 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 03/14] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:14 +0200 Message-Id: <20180625155025.12567-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625155025.12567-1-brgl@bgdev.pl> References: <20180625155025.12567-1-brgl@bgdev.pl> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-dm644x-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 48436f74fd71..adbe8630ef19 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -476,6 +477,15 @@ static struct pcf857x_platform_data pcf_data_u35 = { * - ... newer boards may have more */ +static struct nvmem_cell_lookup dm6446evm_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, @@ -828,6 +838,8 @@ static __init void davinci_evm_init(void) phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, davinci_phy_fixup); } + + nvmem_register_lookup(&dm6446evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")