From patchwork Mon Nov 23 13:28:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 7681941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F31D0BF90C for ; Mon, 23 Nov 2015 13:31:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10F2220704 for ; Mon, 23 Nov 2015 13:31:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3636E20555 for ; Mon, 23 Nov 2015 13:31:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a0rBr-0005eZ-IC; Mon, 23 Nov 2015 13:29:55 +0000 Received: from mail.kernel.org ([198.145.29.136]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a0rBS-0005Mn-D8 for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2015 13:29:32 +0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 144AE20704; Mon, 23 Nov 2015 13:29:09 +0000 (UTC) Received: from tiger (unknown [58.209.139.145]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE82E205D1; Mon, 23 Nov 2015 13:29:06 +0000 (UTC) Date: Mon, 23 Nov 2015 21:28:38 +0800 From: Shawn Guo To: Andrew Lunn Subject: Re: VF610 broken by pinctrl: freescale: imx: allow mux_reg offset zero Message-ID: <20151123132838.GM13744@tiger> References: <20151115024409.GB2194@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20151115024409.GB2194@lunn.ch> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151123_052930_679531_4E30A749 X-CRM114-Status: GOOD ( 24.06 ) X-Spam-Score: -4.8 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , Adrian Alonso , linux ARM , stefan@agner.ch 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 Hi Andrew, On Sun, Nov 15, 2015 at 03:44:09AM +0100, Andrew Lunn wrote: > Hi Adrian > > Your patch > > commit e7b37a522aa92da5f47106aa07b6c1fc58bfd922 > Author: Adrian Alonso > Date: Fri Sep 25 16:05:59 2015 -0500 > > pinctrl: freescale: imx: allow mux_reg offset zero > > Allow mux_reg offset zero to be a valid pin_id, on imx7d > mux_conf reg offset is zero for iomuxc-lspr controller > > has broken VF610. > > It looks like you partially reverted > > commit 3dac1918a4912cea9375e76cb3916b751cef22db > Author: Stefan Agner > Date: Sat Sep 6 18:25:04 2014 +0200 > > pinctrl: imx: detect uninitialized pins > > The pinctrl driver initialized the register offsets for the pins > with 0. On Vybrid an offset of 0 is a valid offset for the pinctrl > mux register. So far, this was solved using the ZERO_OFFSET_VALID > flag which allowed offsets of 0. However, this does not allow to > verify whether a pins struct imx_pmx_func was initialized or not. > > Use signed offset values for register offsets and initialize those > with -1 in order to detect uninitialized offset values reliable. > > and in the process you have broken VF610, which also uses offset 0. > > What i don't yet understand is why you needed to make this change. If > VF610 can already use mux_reg, why cannot imx7d? > > Anyway, it looks like -rc1 is going to be broken on VF610 for some > boards, because this pin is the Ethernet clock input/output. Please > can you get it fixed for -rc2? Can you please try the following change to see if it fixes your problem? Shawn Acked-by: Stefan Agner diff --git a/drivers/pinctrl/freescale/pinctrl-vf610.c b/drivers/pinctrl/freescale/pinctrl-vf610.c index 37a037543d29..587d1ff6210e 100644 --- a/drivers/pinctrl/freescale/pinctrl-vf610.c +++ b/drivers/pinctrl/freescale/pinctrl-vf610.c @@ -299,7 +299,7 @@ static const struct pinctrl_pin_desc vf610_pinctrl_pads[] = { static struct imx_pinctrl_soc_info vf610_pinctrl_info = { .pins = vf610_pinctrl_pads, .npins = ARRAY_SIZE(vf610_pinctrl_pads), - .flags = SHARE_MUX_CONF_REG, + .flags = SHARE_MUX_CONF_REG | ZERO_OFFSET_VALID, }; static const struct of_device_id vf610_pinctrl_of_match[] = {