From patchwork Wed Jan 9 22:05:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1022630 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43Zjqg5Ljtz9sMQ for ; Thu, 10 Jan 2019 09:05:31 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id BFDCCC21FD1; Wed, 9 Jan 2019 22:05:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C5FA1C21F17; Wed, 9 Jan 2019 22:05:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8FC30C21F31; Wed, 9 Jan 2019 22:05:23 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 34A37C21F17 for ; Wed, 9 Jan 2019 22:05:23 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 43ZjqK62Vyz1qtPc; Wed, 9 Jan 2019 23:05:17 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 43ZjqK57sMz1qsnb; Wed, 9 Jan 2019 23:05:17 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Kzoue9rMwTAO; Wed, 9 Jan 2019 23:05:16 +0100 (CET) X-Auth-Info: jzTjglF/ZakTV/fP2prhlr80B5Z18hhJlFu2dNGpWQo= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 9 Jan 2019 23:05:16 +0100 (CET) From: Lukasz Majewski To: Tom Rini , Stefano Babic , Fabio Estevam , Fabio Estevam Date: Wed, 9 Jan 2019 23:05:02 +0100 Message-Id: <20190109220502.5992-1-lukma@denx.de> X-Mailer: git-send-email 2.11.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89. As reported by Alex Kiernan the above optimization introduces a regression in the below use case where: 1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node) 2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux pins are NOT probed/configured in MLO/SPL). 3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't configure pins (as it thinks that those were initialized in MLO/SPL). As we are very close to release - please revert this commit. Reported-by: Alex Kiernan Signed-off-by: Lukasz Majewski Reviewed-by: Simon Glass --- drivers/pinctrl/pinctrl-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 29c910c55f..6db0445067 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -117,9 +117,9 @@ static int pinconfig_post_bind(struct udevice *dev) int ret; dev_for_each_subnode(node, dev) { - if (pre_reloc_only ^ ofnode_pre_reloc(node)) + if (pre_reloc_only && + !ofnode_pre_reloc(node)) continue; - /* * If this node has "compatible" property, this is not * a pin configuration node, but a normal device. skip.