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: 10496089 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 B4841601C7 for ; Fri, 29 Jun 2018 10:03:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9285128A78 for ; Fri, 29 Jun 2018 10:03:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8554F292D9; Fri, 29 Jun 2018 10:03:34 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 308B028A78 for ; Fri, 29 Jun 2018 10:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SeDo8KscLgNW9Hri8/Kp3sLbupU1wuEFhKP9k8nZ7yo=; b=sWx6xi4VZ19EIh8iJYiNwtm+Ah RIzE+CIFX9mTpu+B8fdRfTSmeyUqbAxR2slEXTTmsbkgdtdkFB8XZOVs4Zm8CWFi42sScaYQgiS2G dcI90Ayc9xbDsmtra3krwpq57bOsCK3t767qoypxS0ezfsY6t5RBXqWpK8TfCaYEhl+2NEXpZe/rf AoBux7UxQL1PkuwKP8siLI+Whwn6K4fmEzcCmkCRtVAHdTCyX/685ZtjEj1t2/G0LaIr8JrkTkKYP 0Vmq5DAdXMEm+UyCzo+yIGxEp3vWz/vwbMsLmXTvvBxf3OeIdwuID3mIidx9V7C/0P+Gsw+NeTG2j SZPB1EkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYqFX-0007UO-23; Fri, 29 Jun 2018 10:03:31 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYpto-0000fD-Bi for linux-arm-kernel@lists.infradead.org; Fri, 29 Jun 2018 09:41:09 +0000 Received: by mail-wr0-x241.google.com with SMTP id w16-v6so465064wrn.5 for ; Fri, 29 Jun 2018 02:40:53 -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=qklWWGXRgmSNLtFpOPpLU9/RxS4RfwGBpjOJf5u2NfBAmWcsHyg+i8bJQMpv8H/YgM kAgf7DfAaPpyWPikLpLfy1ggnjDWEPdv1VSu/xJnCWnmGYRxuA6hQydDZmJWupTm/7+4 o9bxed6NWL5rCZQERRQuWqHEzInNzOaOeDImcNHJSL1Fc5pnaXbh46ndjOCAzJGn5V2b eU+jQgiOOU+7/ZBGDl7ETvl80K1H1xWpSI7fu/sqQJq7Hj3UooryqqgSjK3CH+tYaIfX A1wpqbF6cCgwlO6BfjicP4kycM4MGTz81a5XLHlgHhjg2IXyFBxlEFPbTO9xlcbXoA5K Cvlw== X-Gm-Message-State: APt69E0MtjL/yJeVBTovXOvLRUe/2475n0lDpyDvE90rgP/N9oyx2Osg zUPCWlndNUYeNUV7vFq+Iu64CQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180629_024104_983531_D9EF7DAA X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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