All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Cc: Mark Brown <broonie@debian.org>,
	linux-samsung-soc@vger.kernel.org, 823552@bugs.debian.org
Subject: Re: Endless "supply vcc not found, using dummy regulator"
Date: Tue, 24 May 2016 17:53:34 +0200	[thread overview]
Message-ID: <574478FE.4070800@samsung.com> (raw)
In-Reply-To: <20160524152638.GA20341@sesse.net>

On 05/24/2016 05:26 PM, Steinar H. Gunderson wrote:
> On Tue, May 24, 2016 at 05:06:43PM +0200, Krzysztof Kozlowski wrote:
>> I looked quickly through the thread and I am not sure what is exactly
>> your problem.
> 
> My immediate problem is that the repeated (deferred) probing is causing so
> much logging that the system doesn't actually boot. The root causes are a bit
> more complex and muddy (see my previous email for a breakdown).

Ah, I got it.

> 
>> I understood that the Exynos dwc3 driver is leaking the
>> PHY. That is a good catch but your patch is not sufficient. You should
>> clean up starting from devm_clk_get() error. Unless you are fixing
>> this for different kernel version.
> 
> I have zero idea how all of this is supposed to be connected, much less how
> DWC3 works or what the driver is supposed to do. I'm just an end user trying
> to figure out why my system didn't boot. :-)
> 
> Which devm_clk_get() error are you talking about? The one with susp_clk?

Now I saw your original report on Debian bugzilla. Let's stick to v4.5.
The platform_device_alloc() is done in dwc3_exynos_register_phys(). So
on error paths you have clean up starting from next error:

       ret = dwc3_exynos_register_phys(exynos);
        if (ret) {
                dev_err(dev, "couldn't register PHYs\n");
                return ret;
        }

        exynos->dev     = dev;

        exynos->clk = devm_clk_get(dev, "usbdrd30");
        if (IS_ERR(exynos->clk)) {
+		// On each error path since here we need to
+		// revert work done by dwc3_exynos_register_phys()
                dev_err(dev, "couldn't get clock\n");
                return -EINVAL;
        }
        clk_prepare_enable(exynos->clk);


> That's an interesting case because a) nothing actually uses susp_clk
> (it's dead code, presumably waiting for further patches),

It does not look like dead code because it is enabled.

> and b) there was a
> commit not too long ago (42f69a02) upgrading the message from dev_dbg to
> dev_info for reasons I don't understand, making the problem worse.
> (The commit message had an argument that I could accept for changing _to_
> dbg, but not the other way round.

I don't get the rationale behind that change neither...


>> Please send an appropriate separate patch for fixing this. Your email
>> did not reach people, I think.
> 
> I only sent one patch so far, namely the leak fix.

Yeah, but you did not send it to appropriate people. get_maintainer.pl
will point you (Felipe Balbi handles the patches for this driver).

> 
>> What other problems exactly do you have? Late binding of S2MPS11
>> regulator driver? That does not look like a problem. If it is built as
>> a module then it should be loaded, probably from initramfs because
>> these are regulators.
> 
> In this specific case, Debian's initramfs has neglected to include the i2c
> driver in the initramfs, so the regulator doesn't come up until the boot is
> out of the initramfs. That's probably a bug in its own right, and fixing it
> reduces the amount of messages by a _lot_, but even so, it sounds to me like
> the kernel should be able to boot without that fix.

Apparently the s2mps11 regulator driver can be built as module... but is
not a commonly tested configuration. In our testing configs (exynos and
multi_v7) it is built-in. Actually most of PMICs are built in.

Additionally, if you look at the driver, its init was moved earlier from
module_init() to subsys_initcall(). This is kind of manual probe
ordering, used mostly because some depending drivers did not support
probe deferral.

Best regards,
Krzysztof

  parent reply	other threads:[~2016-05-24 15:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160515173900.GC21194@sesse.net>
2016-05-21 14:43 ` Endless "supply vcc not found, using dummy regulator" Steinar H. Gunderson
2016-05-23 13:47   ` Steinar H. Gunderson
2016-05-23 14:40     ` Steinar H. Gunderson
2016-05-23 16:24       ` Mark Brown
2016-05-23 17:06         ` Steinar H. Gunderson
2016-05-23 17:46           ` Steinar H. Gunderson
2016-05-23 18:56             ` Mark Brown
2016-05-23 18:44           ` Mark Brown
2016-05-24 15:06           ` Krzysztof Kozlowski
2016-05-24 15:26             ` Steinar H. Gunderson
2016-05-24 15:45               ` Mark Brown
2016-05-24 15:53               ` Krzysztof Kozlowski [this message]
2016-05-24 16:44                 ` Steinar H. Gunderson
     [not found]                 ` <574478FE.4070800-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-05-24 19:24                   ` [PATCH] " Steinar H. Gunderson
2016-05-24 18:13                     ` [PATCH v2] dwc3-exynos: Fix deferred probing storm Steinar H. Gunderson
2016-05-24 18:13                     ` [PATCH] " Steinar H. Gunderson
2016-05-25  7:54                       ` Krzysztof Kozlowski
2016-05-27  9:53                       ` Vivek Gautam
2016-05-27 11:46                         ` Steinar H. Gunderson
2016-05-27 13:13                           ` Krzysztof Kozlowski
     [not found]                             ` <5748480D.8000501-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-05-27 13:12                               ` Felipe Balbi
     [not found]                                 ` <87bn3rprtw.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-05-27 13:25                                   ` Steinar H. Gunderson
2016-05-27 13:26                                     ` Felipe Balbi
2016-05-30 17:46                                       ` Steinar H. Gunderson
2016-05-25 12:16                     ` [PATCH] Re: Endless "supply vcc not found, using dummy regulator" Anand Moon
2016-05-25 17:52                       ` Steinar H. Gunderson
2016-05-26 12:57                         ` Steinar H. Gunderson
     [not found]                           ` <20160526125757.GA23797-gdzBep0Ce9heoWH0uzbU5w@public.gmane.org>
2016-05-27  9:32                             ` Vivek Gautam
     [not found]                               ` <CAFp+6iE_QW0BDO-Z1Ce5zrUJiToWD_8UtnCFnfKLeaYyys7U8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-27  9:39                                 ` Steinar H. Gunderson
     [not found]                                   ` <20160527093919.GA34987-gdzBep0Ce9heoWH0uzbU5w@public.gmane.org>
2016-05-27  9:43                                     ` Vivek Gautam
2016-05-24 15:39             ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574478FE.4070800@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=823552@bugs.debian.org \
    --cc=broonie@debian.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sgunderson@bigfoot.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.