From patchwork Mon Jun 25 15:50:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10486877 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 B090A601D5 for ; Mon, 25 Jun 2018 15:56:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97AB6285A0 for ; Mon, 25 Jun 2018 15:56:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C187285B6; Mon, 25 Jun 2018 15:56:06 +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 358E3285A0 for ; Mon, 25 Jun 2018 15:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755128AbeFYP4D (ORCPT ); Mon, 25 Jun 2018 11:56:03 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38499 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752955AbeFYPvY (ORCPT ); Mon, 25 Jun 2018 11:51:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id 69-v6so10570115wmf.3 for ; Mon, 25 Jun 2018 08:51:24 -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=CVC/eOoTlU/+PkIhjzQLRTpQV4C3GBqkw7jiGbnzbcc=; b=ms+hgwKVZsIIwcZ0lnDLW1Wuthnhzt6U71ETgeVlrk+hnAy81riPHeN11pQ2qVmgHD M6GVxPwROTHcPBzYbgZVFJ2uxYktTn9JenIsG6AzhVVCBsDteAEGGyjVcziy7qS7xB70 k2ZZcEEOzyL49Y4f6DwJlafMDozI2NTVNollu5QrnAuwl1IX+7foI6rwbBEc95mhItTC 44wycrrPKkygOdqLclwx4VUsj9xtsIuWlVA80+KztvGZHSST+vVOinA9QruX0TtzEOvp gO6J5jt4neljzmnXfQjhCx/l/7GKxStx9Z43Jw0YDSWYGN7Xs0CsB/ZZxHexfgYiXwrL ytqA== 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=CVC/eOoTlU/+PkIhjzQLRTpQV4C3GBqkw7jiGbnzbcc=; b=CRGfB7iklAwxaiFuLaokBEikBkaO61b+7Ssm6Zu39FbaZm92XtmlPTGr/U7TT7T6dO mHaFg7RkRwtTdIFeyjFMDChDmhPwg8aqD3wIwEMDfoEJrZ4vLtZWqCduxa7OgdqS0Kcn E1el09KqNqaeNYbqRAdA/ruD4QES+5nRYaffdbxmaf9UIHuddOf9TGX+Sc5F8NrMmNG1 mDXVCfsQjcFnOcKcRsPQuEdBjyMpk3Ho3F/Ni/U6xamLWiRc0YeL7POJhMjK4EFcri4+ mMsJ5IyhxMHRH+3rDDE/OETTUrUAYRyefAOdz5TLc9CV5vqp49NFwdIGJccsHj/KA5HC SBmw== X-Gm-Message-State: APt69E0etm7gG30Asxwevo361DLISIMBnuszDImP0xq1jwIm3X8652AP zu9bzequoQ+zomeWfS7Qxm+hFw== X-Google-Smtp-Source: AAOMgpdfOLg1h1DnMJ+i1Q8DWd+Ch7dTFRRz2TM9MGhg6yYOnIg6cg9I/HjR2KS2VLRz/91gefP+lA== X-Received: by 2002:a1c:cb8e:: with SMTP id b136-v6mr1486661wmg.112.1529941883454; Mon, 25 Jun 2018 08:51:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 08:51:22 -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 04/14] ARM: davinci: dm646x-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:15 +0200 Message-Id: <20180625155025.12567-5-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-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..4c82d38033b6 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_register_lookup(&dm646x_evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")