From patchwork Tue Jun 26 10:22:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10488593 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 D561460386 for ; Tue, 26 Jun 2018 10:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDAEF287DA for ; Tue, 26 Jun 2018 10:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C23542887F; Tue, 26 Jun 2018 10:23:24 +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 68554287DA for ; Tue, 26 Jun 2018 10:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934725AbeFZKXU (ORCPT ); Tue, 26 Jun 2018 06:23:20 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44783 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934710AbeFZKXT (ORCPT ); Tue, 26 Jun 2018 06:23:19 -0400 Received: by mail-wr0-f196.google.com with SMTP id p12-v6so15024992wrn.11 for ; Tue, 26 Jun 2018 03:23:18 -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=IZ2QM7D1PZpFeqpg95k6JaWjvanpXXHD15DDd9A8BESvDiPjpKTRykMmQDbxIBhizD v4JM9GLpFNVTIGTYeYyVg2UkTjY8+JOhhd7Eh4wtnT4ajYIztkZ2Syam18zEdhU8NYS2 +o35ZmCdMjYXiLVoZ6ImxT3LAhgwiQBfA1hIpWpTVrloMAP5En/rI6U1TVZELAe4j3cE 7oh5MLJeXnvTKSdLSw8MJwqUXYb9BeYwEcKyKfNKIqoO4dfqHTthYki/Hj//HhuWy2qQ LKRmXv4fdqgrkNYdGYyxk3gmnVQJoPEok4YT/ATpyOwUjLpXDCbooT0FEflcJ88Dn5tn LDVw== 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=lCmQ6Bi0a7FCTAY6TmTxvQaboVTktyBvl1QnEQnsnPI2Sy5GiIEMscn9yA9wPvlh4n oooWJFTzTI/NmBeOG/HVNEfBTwpsDxDBMQ0xZfLZoLD9M2iSHv4yaRXHF39u3bhsbCDr kDz3Tseg25Jsr4uyjS6NID4yVbHMOXP7zt12k+GY1F5NXF4VLyuaXWMdxlFg/zKJMGPU Ot46qHCVteSlJeofmFPATdaLGxapz0yt4XZno/GxVsfEzKWv2LDkBctrL9G27phb1Ccz ybzR0/SRUZnM+3T97gxxXv9m3UfoXh/AQTKYrvMMZLKm2yYV9eAsZSTUjRnLu4Ta/48k CM8g== X-Gm-Message-State: APt69E0PKRxLgJ0fPOHqXD3OTyInBs+SrLDMmuf6ybKb+BPQa58cJkLL UKe8sUuSRJf4qfzSu7WRRMACCw== X-Google-Smtp-Source: AAOMgpc1F5SGLq+8WdvlgkqVnwrWXa7ygk3EzZsTdv4CTlRUzskedQQr7Wv7yDHrCWocRVXh1kVhqQ== X-Received: by 2002:adf:e207:: with SMTP id j7-v6mr919175wri.205.1530008597600; Tue, 26 Jun 2018 03:23:17 -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 203-v6sm2573852wmp.23.2018.06.26.03.23.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:23:17 -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 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 v2 03/15] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Tue, 26 Jun 2018 12:22:33 +0200 Message-Id: <20180626102245.30711-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626102245.30711-1-brgl@bgdev.pl> References: <20180626102245.30711-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")