From patchwork Tue Jun 26 10:22:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10488685 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 2389E601A0 for ; Tue, 26 Jun 2018 10:30:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D0EC2886E for ; Tue, 26 Jun 2018 10:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3A402887D; Tue, 26 Jun 2018 10:30:32 +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 A1BB22886E for ; Tue, 26 Jun 2018 10:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934478AbeFZK3L (ORCPT ); Tue, 26 Jun 2018 06:29:11 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:40418 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934686AbeFZKXR (ORCPT ); Tue, 26 Jun 2018 06:23:17 -0400 Received: by mail-wr0-f193.google.com with SMTP id g18-v6so16656740wro.7 for ; Tue, 26 Jun 2018 03:23:17 -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=bY5wxFVyqwHaOjbXPlhOk1H0UiWc3tfSm2OWnzGLb+UFSLAUh0FV5E/Woj68o7DIM5 nezpXaKVXEqQPUL0SD8mDoEkt3OKGzdw2azcvySel0WFThzn6748B4JNRunIMWiQxysu nnEc1e106YjcujFL3cqdClwzT7IqRQfAtjgWLF8/9UgiNiAH4so47Td7vhcqXNtnS9/r EwP0yhe6D9WogE2Q68ApENihtnBv8zDgJDXZCg+bP3QI9T1GR/8rtz984ReFgdf4VvwF S52w7+lJTzmfukeTT07GbSt24tltWkip4OjylvIxLIPMUWYJdHtrX/JxhJaSGUdJ2UGK g9/Q== 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=kJ0O07ReJZmrfL0zLg5pUaMVhFp9XC5KTG3ztNRrirHUAGSAlEw4G6ejzMZf4Ouobg LblWou63i8qlyUnz0YGYiR7RzewuM61HCGMLYKK+QPoVA9bsMZcNHDs5L08j88EfQfmB 6F+zYVxECnx0SjBIT7/VFaLbkji7jRrYr9AnX9Vo6ZNUsIVlBRCgI/gsxUfkkhsFyGXb yjnXPltb04lDHJtYsIXNT9Itp9oKiy6B89TVEX4hB7ygFCpscjtnGS5Ai5gyrsY0r8iG q6herudG9MK/l+2KRUXFp20l8QUKfPxWBWsf+k1HQEslmhzuxe3a+78KxwqBFru4zMFG vQgA== X-Gm-Message-State: APt69E3zOr7vJG0fNEm9Alm/GIXQpCltCUPWPZCm6R57NPVe1cKNsDTv sQg6Th4Ykev+by7tJM5CWgWMPxF5JWs= X-Google-Smtp-Source: AAOMgpfhH8bJjirJCvX49I+t3EDUbx4GXq7IyeUCo5rzHwVa2ba2GgvL1jep2yzBMyfCa3zwEyqSqw== X-Received: by 2002:adf:8747:: with SMTP id 7-v6mr876432wrz.117.1530008596305; Tue, 26 Jun 2018 03:23:16 -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.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:23:15 -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 02/15] ARM: davinci: dm365-evm: use nvmem lookup for mac address Date: Tue, 26 Jun 2018 12:22:32 +0200 Message-Id: <20180626102245.30711-3-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-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")