From patchwork Mon Jun 25 15:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10487025 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 509F76023A for ; Mon, 25 Jun 2018 17:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 384282858E for ; Mon, 25 Jun 2018 17:18:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A8F228592; Mon, 25 Jun 2018 17:18:04 +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 9751C2858E for ; Mon, 25 Jun 2018 17:18:03 +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=VvnKp5V88JW2ppve0sE0/tfbejCxcsoTzWCYjxQEq88=; b=H5kM2Ih3nklFdm8ex0Hi6z149K LRGNB3Qi6yXDFilhA32Iy2wS7+V7kN6idf6MNcUNB2zS2Z1OVWeQ7fYk8/SeVkiG8eu20dBS/BMbP zwTV4eYtBeKh/ch7XU3S8xUjW1Re58/2TKJ/5BpumVKYMMYt3obviKH4oLuNgan5S6hu9XDgf9iMQ Zm22HxQK+Lqp4i6mc5ifwaBjtbzH9jiwO2nMHClJVzWT/XnDCEy+xLrNeliUr4zmHsEgUnMfBqwyc Jlfre0A/F2Pxwr/u1kLxcyyGl5xmTs9H8QxlUmsSLV1yux6QxVW2HhYsG/pQfIhH8vk8Vp19IGj34 EY+P9A/Q==; 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 1fXV7i-0007IK-9i; Mon, 25 Jun 2018 17:17:54 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXUvn-0006Ph-4d for linux-arm-kernel@bombadil.infradead.org; Mon, 25 Jun 2018 17:05:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YUevR5Ixj5eTkRIhfoVHLcI/JheqdImeN8VTMJbrIx0=; b=gk03PA9DtEG6VdIi4ObkvR0if lcDVhS3SFMHaCumZ9B+Ey9vpOCihCBLUo3iLAza3/jh1zLOXcNl/P3KbLDP7uQUfyEg9SSf5ZpqjB d/6If/APA7/2HVZCDSuzncRql9dPzb+5q8KiCwCyjmDFt2t45kf5bOEu4kjb0oRjH9/kefKMeRvJR QFStidnULutQkVzthwJ6ft5Un0SvUKyRwy/uoIpGi2Hlvpiv0XHTGhtOFA2sAkPV9mjQMy7yROZiN bE28vFFCeCi70hn+dzMWMC9zvPWJ2n/AsibBnlkVKiDfJRI4tggAkN6LmQxbDDSXoyzOT0ULyZUGH moTbYWS8A==; Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXTmC-0005EJ-8y for linux-arm-kernel@lists.infradead.org; Mon, 25 Jun 2018 15:51:37 +0000 Received: by mail-wm0-x243.google.com with SMTP id w137-v6so4529693wmw.1 for ; Mon, 25 Jun 2018 08:51:23 -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=YUevR5Ixj5eTkRIhfoVHLcI/JheqdImeN8VTMJbrIx0=; b=iI5vob+d3DZ49qbdm43iiIqPW14jjwcKjoFWAlLO6uaf//hoD0/nYlpv6i3m2iZTfY CTnKfS7Fh2XxgcYbfp9ww+0iQNCtg20ZcZYCoFQol23tq98NVUog02B2i0FdY3Z4IznC ODBkBJqLwgt3DMRZ8wi6GYXqrLTiXH0/s1wLUQwyUMA+feFsJ7wdUXgRTazQ4oVsfbMM 6niVKxCKCnUOEu0Q+ekI0ZsDGcXxRGM+2p5qTp1oARMVy5b+EOrVLzUMsSk0qHm4DByv ErMq4mx8eepJe1PMjMFbqoAZzX0zDy7sG8HtVWskNAsMibOYQgNcb9s2E5haPEnTVzlG 9dvA== 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=YUevR5Ixj5eTkRIhfoVHLcI/JheqdImeN8VTMJbrIx0=; b=sz0Y5lJInMvYc2Y5tL+kDPa8r5t50/ZKkDvApeCvYMCO9nqlyH11SCZmlydQiUOHBY T0OisqsdjBNWHCTyPZIKNc5hnndtPP19drj1NKFt+1tUgHIwx/POxsJKvDEdvZEtNy0i 0TjAuXuWMa/53AE063QWxZQTHecVBGdKkvr7gfv5v5pYVQJBpO1F+1HFruJp80TUehgj vYLVbexUfCh1zmBhNsrTAaGN4cMqBIuVHTa7iO05zcF9LibHpCU1KXTQ9fWncEOSl9i0 JSqXwavHL8gOy3JETwvdbCO9XdZWD3Pt/RKj1nDai7f/ynQtu3Wi5x+22z0tPZ0Xf5pS yGoA== X-Gm-Message-State: APt69E3nsJcNCg4siPjpgcpPWQ7LbKDMutZcFNkEpPuOCor9ijqrREyd M+giQTZNWSlVSVtZArchK+xUTg== X-Google-Smtp-Source: AAOMgpe6NqkMzb9Kfx+00MZxZPbJ3Lu6BShfOB/R1x6ZnU1p87pJdP+lETpyefrOoi+6C/EVgYm/Vg== X-Received: by 2002:a1c:8f50:: with SMTP id r77-v6mr1527008wmd.77.1529941882166; Mon, 25 Jun 2018 08:51:22 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 08:51:21 -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 Subject: [PATCH 03/14] ARM: davinci: dm644-evm: use nvmem lookup for mac address Date: Mon, 25 Jun 2018 17:50:14 +0200 Message-Id: <20180625155025.12567-4-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180625_115136_397463_05CF17C3 X-CRM114-Status: GOOD ( 15.89 ) 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-dm644x-evm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 48436f74fd71..adbe8630ef19 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -476,6 +477,15 @@ static struct pcf857x_platform_data pcf_data_u35 = { * - ... newer boards may have more */ +static struct nvmem_cell_lookup dm6446evm_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, @@ -828,6 +838,8 @@ static __init void davinci_evm_init(void) phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, davinci_phy_fixup); } + + nvmem_register_lookup(&dm6446evm_mac_address_cell, 1); } MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")