From patchwork Fri Mar 4 22:58:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 592245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D61A2140291 for ; Sat, 5 Mar 2016 09:58:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=cogentembedded-com.20150623.gappssmtp.com header.i=@cogentembedded-com.20150623.gappssmtp.com header.b=oe7L+q1i; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760128AbcCDW61 (ORCPT ); Fri, 4 Mar 2016 17:58:27 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:33489 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759947AbcCDW60 (ORCPT ); Fri, 4 Mar 2016 17:58:26 -0500 Received: by mail-lb0-f172.google.com with SMTP id k15so77395549lbg.0 for ; Fri, 04 Mar 2016 14:58:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:organization:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=HcxUNLBJ4OQsQDYuaS8bYx7GBOhTZm0dvegtFwYjFYc=; b=oe7L+q1iNyW6bNUC8QqGPAxWI+L7NRWV6gA0jiq8KzWcZhjsE0mJ29ju2k0aCoudZq kHuxVnDC9NPkDYYEKLxP/zGJoQMD0nK9PtgFKvAlLeL0+VsktKrxhEkrSWKTtbHihluU 6+iiPweiJFnvEuGSM16CJWRaxfJ3DzneHEwdJ9dzk8p7z2zBW1Eq5BkxaYFXzBG7FqMp 12kmlYAOvT6LafUUjBARXSFDB7FEjw5IkQrPfCfwnszUlgIdFwsXEg1nu5UjEMXVblzD Vh/ILVmuTXUwfHT0RjCADuEcUzKMFhGjagatiWmQUWe/FRFRETqqrTuE2QbAEJ+yTYx/ PimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=HcxUNLBJ4OQsQDYuaS8bYx7GBOhTZm0dvegtFwYjFYc=; b=XTLYrJcXiJZ0T6dE/5GRBeKpwEsCCjw8kRSvF5MMUg6vyagHeZK8K9Wngd9vy6Ltqw D8cQAkmf1zQmIvN36hlIWXlvG6uo748/oxb2qBp8pcdHtqwgFWZKfjMMtPgfXlcPjqN9 ZfHoJb/hiFD508I/be3cF/yVM7gF4Ao8i1pzDAmFGSKfLHSWGkvX8vPdIbUVO13NPGe0 JjkcPbdGdeSwRsgZXo71jPTvwhA5rqstCY9BD81eVnLA0Xx9E/2YY4TpgdQnnWQC/nQM cpa83si2eB7sR9O4coWDXh/mJZ+RyfdSCH/512ibTinQpDEho8WBzJpPcIYyVAQo66Ze +nDg== X-Gm-Message-State: AD7BkJKqXHPShA4cSvh9ro/Oxpk3R1Tb7Qs3sQ5lRZkAgwweq9fVW1oq45PhH38vtIfG1w== X-Received: by 10.112.147.5 with SMTP id tg5mr4194590lbb.120.1457132305070; Fri, 04 Mar 2016 14:58:25 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.80.3]) by smtp.gmail.com with ESMTPSA id kb2sm900346lbc.29.2016.03.04.14.58.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2016 14:58:23 -0800 (PST) From: Sergei Shtylyov To: linus.walleij@linaro.org, linux-renesas-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-gpio@vger.kernel.org, geert+renesas@glider.be Subject: [PATCH] pinctrl: sh-pfc: core: only call pinctrl_provide_dummies() on SuperH Date: Sat, 05 Mar 2016 01:58:22 +0300 Message-ID: <14300712.5chtEzsjIN@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.3.6-201.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <1501145.5ro9yfox2Z@wasted.cogentembedded.com> References: <1501145.5ro9yfox2Z@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The 'ravb' Ethernet driver couldn't connect to the PHY as the MDIO bus appeared empty on the Renesas R-Car boards. The bug hunt finally pointed at the commit adding the "init" pintcrl state: it tries to switch to non- default state before the driver probe which should fail but doesn't as the PFC pinctrl driver happens to call pinctrl_provide_dummies() which makes all state lookups succeed, even though the state doesn't really exist. That feature is only relevant to non-DT systems and all the ARM boards that use the PFC driver have been converted to the DT boot, so limiting it to the SuperH architecture seems The Right Thing... Fixes: ef0eebc05130 ("drivers/pinctrl: Add the concept of an "init" state") Signed-off-by: Sergei Shtylyov CC: stable@vger.kernel.org --- The patch is against the 'fixes' branch of Linus W.'s 'linux-pinctrl.git' repo. As the bug only seems to happen to the hardware that's not pre-configured by U-Boot, this patch can wait till 4.6 in principle... drivers/pinctrl/sh-pfc/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pinctrl/drivers/pinctrl/sh-pfc/core.c =================================================================== --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/core.c +++ linux-pinctrl/drivers/pinctrl/sh-pfc/core.c @@ -545,7 +545,8 @@ static int sh_pfc_probe(struct platform_ return ret; } - pinctrl_provide_dummies(); + if (IS_ENABLED(CONFIG_SUPERH)) + pinctrl_provide_dummies(); ret = sh_pfc_init_ranges(pfc); if (ret < 0)