From patchwork Thu Sep 20 16:33:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1486581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id CB42A3FD40 for ; Thu, 20 Sep 2012 16:35:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEjhE-0003is-18; Thu, 20 Sep 2012 16:33:48 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TEjh9-0003iQ-GE for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 16:33:45 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XN3R81dJcz3hhbC; Thu, 20 Sep 2012 18:33:40 +0200 (CEST) X-Auth-Info: hjUtiJR6ulo7jCGUKvGmYQ5udUVFNKTtyfXbx0GFjHc= Received: from mashiro.localnet (unknown [195.140.253.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTPSA id 3XN3R81DtKzbbcb; Thu, 20 Sep 2012 18:33:40 +0200 (CEST) From: Marek Vasut To: Maxime Ripard Subject: Re: [PATCH] ARM: mxs: m28evk: Disable OCOTP OUI loading Date: Thu, 20 Sep 2012 18:33:38 +0200 User-Agent: KMail/1.13.7 (Linux/3.4-trunk-amd64; KDE/4.8.4; x86_64; ; ) References: <1348007837-23187-1-git-send-email-marex@denx.de> <201209201510.24631.marex@denx.de> <505B1FC2.2090609@free-electrons.com> In-Reply-To: <505B1FC2.2090609@free-electrons.com> MIME-Version: 1.0 Message-Id: <201209201833.38960.marex@denx.de> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Fabio Estevam , Shawn Guo , Wolfram Sang , linux-arm-kernel@lists.infradead.org, wd@denx.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Dear Maxime Ripard, > Hi Marek, > > Le 20/09/2012 15:10, Marek Vasut a écrit : > >>> If barebox can't handle even basic DT fixup, it's broken. > >> > >> It can. It maybe was just not needed up to now, dunno. > > > > Fix it and send patch, so this problem doesn't spread. > > I'm sorry, but you still miss the point. > > If someone wants to use another bootloader than U-boot (or a possible > patched barebox), or none other than the bootlets to boot directly the > Linux (with an appended device tree), you will still have no way to get > the NIC from the OCOTP, and I'm sorry, but it is just wrong. > > The kernel shouldn't rely on a particular feature of a given bootloader. So what do you think about this patch (skip loading from OCOTP if it's already present in DT): Best regards, Marek Vasut diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 71d47f5..4f014ef 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -175,6 +175,10 @@ static void __init update_fec_mac_prop(enum mac_oui oui) np = of_find_compatible_node(from, NULL, "fsl,imx28-fec"); if (!np) return; + + if (of_get_property(np, "local-mac-address", NULL)) + continue; + from = np; newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);