From patchwork Mon Jun 25 15:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10486869 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 3F37C601D5 for ; Mon, 25 Jun 2018 15:55:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26758285A0 for ; Mon, 25 Jun 2018 15:55:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AE86285B9; Mon, 25 Jun 2018 15:55:27 +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 B7D2E285A0 for ; Mon, 25 Jun 2018 15:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbeFYPvZ (ORCPT ); Mon, 25 Jun 2018 11:51:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39503 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbeFYPvV (ORCPT ); Mon, 25 Jun 2018 11:51:21 -0400 Received: by mail-wm0-f67.google.com with SMTP id p11-v6so10553821wmc.4 for ; Mon, 25 Jun 2018 08:51:21 -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=SmGXMywFtJmXgDto4kP5pCXWN6wLcgjDNSMmo19B6+U=; b=Z+0LzQO08mSbq3zTMEDSBOE+54XLck3CBprHdNd2n+mdpaqymjDQ4J5bcsExopUWaA kcWniHrTS64F9FdvB+DLpTi0ZCZp1VkJuY6MyQ0b6SxYKoniYZJ8goai04burxVGpcMp WWEKzTuicCVSBFsJ5zShKaXqXWHmd33J8mu2Y7rGlb1UB/sJdK6kPhIVIjNp5BMKc3cd IU+JP42FyEHWPnnK/JVOzp1ERA+8nZ3Fc0XrQMet5rqKr65Drtfmo6rNt3bEfZadNesz xJBz1udU2qpUEUmYbkiyitTgvZMavz7GUVx7tP7jC8/VDVE2vspyebGRw/lnxPERXooR 0+UA== 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=SmGXMywFtJmXgDto4kP5pCXWN6wLcgjDNSMmo19B6+U=; b=TQz46Ma4G6Vi1tkFwQanGyaAQ0g/I0HvcnEKdqBm9LMXuTUW6xZmlA+VJZYJneDSA1 5YRZFtkYy7gEKtnybXAvgEa4gNgnFEe3mcvBMgYu94y0Z7qDOp6sSlVsiPLUJU3MdzLB 9ZI+8ZKJdx1ckSTIV9yjHHVMqGCjsD3eTf0l5eZlYSxHdH3Zl2E0iV9eN//3gBLPPWFA B5UOpCJPy6ebLjs8vLZZOPLXzZ9eA8pEjSBaDGoFi0/4rkCZ/lYCxOfR7YAWYhdUz+d6 kUWW/+a2fiEgrDRXYU6UifRt8dpsebuYIMeTlFjRYgGgUK/vjxqASsHbQm/HcaxRZz89 I88w== X-Gm-Message-State: APt69E09PN9kYwphhq7cACu2wRWVN9A4YomeVVb1L9uyD4SJ0R8Oo8lB +/A5QrDQynzvaXujuj/qb+ilfQ== X-Google-Smtp-Source: AAOMgpfEzMR+YTwvMarOkcDLn0fCADCwj+ZkjJmKpRC8YeBo0K5Ue52y/fCndFYOeQCRejSXv2uEFA== X-Received: by 2002:a1c:20ca:: with SMTP id g193-v6mr1387630wmg.4.1529941880681; Mon, 25 Jun 2018 08:51:20 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 08:51:20 -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 02/14] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:13 +0200 Message-Id: <20180625155025.12567-3-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-dm365-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 435f7ec7d9af..df640d977bfa 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,15 @@ static struct platform_device davinci_nand_device = { }, }; +static struct nvmem_cell_lookup dm365evm_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, @@ -769,6 +779,8 @@ static __init void dm365_evm_init(void) dm365_init_spi0(BIT(0), dm365_evm_spi_info, ARRAY_SIZE(dm365_evm_spi_info)); + + nvmem_register_lookup(&dm365evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")