From patchwork Fri Jun 29 09:40:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10495957 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 DCE376022E for ; Fri, 29 Jun 2018 09:41:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5C7529829 for ; Fri, 29 Jun 2018 09:41:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6D522983F; Fri, 29 Jun 2018 09:41: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 5A79729829 for ; Fri, 29 Jun 2018 09:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935747AbeF2Jk7 (ORCPT ); Fri, 29 Jun 2018 05:40:59 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:45988 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754793AbeF2Jkx (ORCPT ); Fri, 29 Jun 2018 05:40:53 -0400 Received: by mail-wr0-f194.google.com with SMTP id u7-v6so8202406wrn.12 for ; Fri, 29 Jun 2018 02:40:52 -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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=U+sAWmvNuSrgbDC6BrFdeoaZ4hyFWBfqcGBPACt4D858L3dP5g6pjLquMX3gZb0gXl /b2I9Kctj0DMA6DEVzpcFAczMrDC1z23hLmFCyiT09qE+gb3lGuP4OBa4CSh8tFFceHB 0ps4fDMOdN8yfbxN3TFFKQ/DciZc0+Sb7XZzv51M2K3zckjW3HVPaeGGLfuaSqE+ytdW 5hP4+pB0umzi7QrvV7Q6HLo0Nx+o/Q5qRX8xiuevqfhhrAV8xOF1IZEORK5mTH9xq7/4 dzip8EMi1Bxm6PmXEhVbWjiEKxEORRvxTsPYRQAWnxwb8Ywi1qMHgktRLjMh1yjQ5rXd FHWw== 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=+RU0zhV5JnY9YYfpoe84W+S+N50VABMSZ3/deF1RX7Y=; b=qkwma/v2ou5DcV7qjjiOKEruZh8fiKQ85R8XZaLIKhMfL5zHd+7GjJgGJY/8Hwv7xw NR7maNpJUdVeIcFWvFucJH4xdulYNnv4gcGsEVev6W6iy7jAfYOrQUPXQGbnjRczpxTV EaSWs3qQtDL3H99sErwhkedNVAOZdhiZPKiC5YNxuAGW9h4IgXMQOVBgdroaIPFWN2Na PU9rirwvNIrFoL3XNm0PA+Z2tZbAI22UK60bK19IxMMmMKRGCW++4kuUHPM5UE0F2Wfz t3LRHJ1M609BO1rMrbM1in5PbGromV2ZQtOidLk1iJAIZ7kzGtvCDlR7kSekjfCeSHKW kcmw== X-Gm-Message-State: APt69E0lVHKObHk7l7Gn4cr2N8fN+ti8z9oteCJXbLwQIDYvgqS1aKhw 5dEAje9qGjivXXBRjYELS9JXkQ== X-Google-Smtp-Source: AAOMgpcQLYxARCCDDtLyUrBAdXY7rPJDbg/vv7on3yIx5vG8hnF0KNxPLQC7yRKkGWR5mELm1Oz4+A== X-Received: by 2002:adf:86ae:: with SMTP id 43-v6mr10691949wrx.281.1530265251847; Fri, 29 Jun 2018 02:40:51 -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 d102-v6sm1386394wma.10.2018.06.29.02.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:40:51 -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 , Jonathan Corbet 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 v4 06/18] ARM: davinci: da830-evm: use nvmem lookup for mac address Date: Fri, 29 Jun 2018 11:40:27 +0200 Message-Id: <20180629094039.7543-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-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-da830-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 14a6fc061744..4a2fe8142a2f 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -409,6 +410,15 @@ static inline void da830_evm_init_lcdc(int mux_mode) static inline void da830_evm_init_lcdc(int mux_mode) { } #endif +static struct nvmem_cell_lookup da830_evm_mac_address_cell = { + .info = { + .name = "mac-address", + .offset = 0x7f00, + .bytes = ETH_ALEN, + }, + .nvmem_name = "1-00500", +}; + static struct at24_platform_data da830_evm_i2c_eeprom_info = { .byte_len = SZ_256K / 8, .page_size = 64, @@ -618,6 +628,8 @@ static __init void da830_evm_init(void) pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret); regulator_has_full_constraints(); + + nvmem_add_lookup_table(&da830_evm_mac_address_cell, 1); } #ifdef CONFIG_SERIAL_8250_CONSOLE