From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbbJWFnh (ORCPT ); Fri, 23 Oct 2015 01:43:37 -0400 Received: from mx18-05.smtp.antispamcloud.com ([207.244.64.174]:41989 "EHLO mx18-05.smtp.antispamcloud.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbbJWFng convert rfc822-to-8bit (ORCPT ); Fri, 23 Oct 2015 01:43:36 -0400 Subject: Re: [PATCH] pinctrl-zynq: Initialize early To: =?UTF-8?Q?S=c3=b6ren_Brinkmann?= References: <1445513420-23527-1-git-send-email-mike.looijmans@topic.nl> <20151022160733.GH5257@xsjsorenbubuntu> <5629C62D.8030804@topic.nl> CC: , , From: Mike Looijmans Organization: TOPIC Message-ID: <5629C8F3.2080004@topic.nl> Date: Fri, 23 Oct 2015 07:43:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5629C62D.8030804@topic.nl> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT X-Originating-IP: [192.168.80.121] X-EXCLAIMER-MD-CONFIG: 9833cda7-5b21-4d34-9a38-8d025ddc3664 X-EXCLAIMER-MD-BIFURCATION-INSTANCE: 0 X-Filter-ID: s0sct1PQhAABKnZB5plbIbbvfIHzQjPVmPLZeVYSu3xU9luQrU+8/8qthi+0Jd/W6KAUC/fjyuDn NXFr4uarw5gY+O3aL+EdLlH6kLhY3+pTVeCf9Dlilg38rS7sFqgKp8tR9Qc/0LQNXTAZOm0rKhSC siCItiPYybFK+F6khApmtfv+FqJdBAzMzmkl3RebcexTaeFKdYZBFts8coHNyYC/tOVjI4dWyTvf TQXGjT+aEfC5mTBtCltny75g3MKuTeCfDHBmvtpIbRmmQ+BJci53HP6m27+exnZ8kW5vMhIlqdbN T1W60jp3fWcMEExd0pYBALdboKj0LvzZwtNAeSG7X+t1TW39Ja77LGPpOwAoFFGehu/LjH1dgy1A 6CWEjwsD088NtsGHV99RTGFzjhZeQYHXdMcG3xNMo40KqiAhEWyJzIkwSFAW0Pw8uiKeSfwEntQd IVrxCCuXDwWnGCrn4AewWnpS5DUxt4NS/udzmGKvPRvC08RKufiNuNl/92PNDpgLsd6Ddd/s7VM5 3iu8T/iw/hWryOzpe3vaR/z3uFL8N7VKh/CG+lj0Rj1mdfvusPD6mLi4Bm+7u7WSpLH600st9eU/ nkJwwvEP/eiRVYKU9W9tbmVXJBqdHHDmFmZOz2bO4w7flXGSMbAWocG0WCljDbUTmCn27mgGERKB gwNZt6OqE37gGsPxkW2/mWxgBaaPt9++LWwpCu5NcYjZXQ7W+MICam90hBzYtU+wmp6WbGq2WiyE aRKgPJmR4BLWBCTIfTZffy9vaKhxKgeYUOp7A73HI6oJg7w/Vocoj314LCI9p5lp3mOOFxuXbEJg 55zXsh/n3EN/No6gSg== X-Report-Abuse-To: spam@mx99.antispamcloud.com X-Filter-Fingerprint: IFrWXGses7OKB5S5G8/dJUb3OPwsHaH0Fvg5oXltHd/JUWjZ8+qhjyB23tbDuyLOYL8Ff78gYsez 4Rl08xudmXi4esCQ0R1MchVjt7wblGlvhFgW0MjUMRkF5sMCDfftTXNFDzN17hnrWeZYOJvLq0Ic WjZ+XcEjj/7Pkld0zkmvziDInX9WdMov2kn2yXjdwv61T+KDYyYtREgszdyFwv8IxCB3p/oCKvxr eyISh3JGb7OS5oVgiO+kDxZrVPLz3MmEGC2PrUKqLq5WmHK+Nw== X-Originating-IP: 88.159.208.100 X-Spampanel-Domain: topic.nl X-Spampanel-Username: 88.159.208.100 Authentication-Results: antispamcloud.com; auth=pass smtp.auth=88.159.208.100@topic.nl X-Spampanel-Outgoing-Class: ham X-Spampanel-Outgoing-Evidence: Combined (0.00) X-Recommended-Action: accept Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23-10-15 07:31, Mike Looijmans wrote: > On 22-10-15 18:07, Sören Brinkmann wrote: >> Hi Mike, >> >> On Thu, 2015-10-22 at 01:30PM +0200, Mike Looijmans wrote: >>> Supplying pinmux configuration for e.g. gpio pins leads to deferred >>> probes because the pinctrl device is probed much later than gpio. >>> Move the init call to a much earlier stage so it probes before the >>> devices that may need it. >>> >>> Signed-off-by: Mike Looijmans >> >> in general, the change should be OK, but neither on zc702 nor zc706 do I >> see a difference in respect to deferred probes. With and without the >> patch I see: >> root@zynq:~# dmesg | grep -i defer >> [ 0.097021] zynq-gpio e000a000.gpio: could not find pctldev for node >> /amba/slcr@f8000000/pinctrl@700/gpio0-default, deferring probe >> root@zynq:~# >> >> If you have a case this patch improves things though, feel free to add my >> Tested-by: Sören Brinkmann >> > > On the Florida boards there are i2c controlled clocks, power supplies and > reset signals. Replacing the Cadence I2C controller with a GPIO-bitbang > controller solved the I2C problems but caused a storm of dozens of deferred > probes because of the pinmux driver arriving even after the first probe > attempt of the i2c bus driver. Moving the pinmux driver to an earlier stage > solved that problem neatly, now the "zynq-pinctrl 700.pinctrl: zynq pinctrl > initialized" message appears after the OCM driver. > Judging from your comment the GPIO driver still probes earlier (I don't have > any GPIO-only pinmuxes yet), so maybe we should amend the patch to probe even > earlier. The pinmux driver doesn't depend on anything, so it can potentially > probe very early. What do you think? Minor addition: The gpio-zynq driver probes at "postcore_initcall", so to beat that, the zynq-pinmux driver should move to "core_initcall" (instead of "arch_initcall"). That would make the gpio deferral go away. An alternative would be to move the gpio driver to "arch", then "postcore" would be enough for the pinmux. If the gpio probe gets deferred, it apparently has already been moved to below "subsys" already, with aparently no ill effects. Mike. Kind regards, Mike Looijmans System Expert TOPIC Embedded Products Eindhovenseweg 32-C, NL-5683 KH Best Postbus 440, NL-5680 AK Best Telefoon: +31 (0) 499 33 69 79 Telefax: +31 (0) 499 33 69 70 E-mail: mike.looijmans@topicproducts.com Website: www.topicproducts.com Please consider the environment before printing this e-mail Visit us at : Aerospace Electrical Systems Expo Europe which will be held from 17.11.2015 till 19.11.2015, Findorffstrasse 101 Bremen, Germany, Hall 5, stand number C65 http://www.aesexpo.eu