All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: Regression with 6cfcd5563b4f on BeagleBoard Rev C2
Date: Fri, 4 Jun 2021 09:35:15 +0300	[thread overview]
Message-ID: <YLnJowBaoJPyZWOk@atomide.com> (raw)
In-Reply-To: <5037cd3e-9c4f-0028-ceef-8315d297f2bc@bitmer.com>

Hi,

* Jarkko Nikula <jarkko.nikula@bitmer.com> [210602 18:21]:
> Hi
> 
> On 6/2/21 8:30 AM, Tony Lindgren wrote:
> > Sounds like the beagleboard timer errata handling is either picking
> > a wrong clockevent timer, or later on ti-sysc misdetects the active
> > timer for clockevent and idles it.
> > 
> > What does dmesg say in the beginning for clockevent and clocksource
> > timers?
> > 
> I attached logs from commit 6cfcd5563b4f and commit 30c66fc30ee7 before
> it. Perhaps this is relevant difference between them?
> 
> +ti-sysc: probe of 49032000.target-module failed with error -16
> +ti-sysc: probe of 48304000.target-module failed with error -16

Yeah so it seems. We now attempt to ignore the system timer instances
while it seems we need also block idling at least for timer12 that is
used for the beagle timer.

Can you test the following patch and see if it helps?

Regards,

Tony

8< ------------------------
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -100,6 +100,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
  * @cookie: data used by legacy platform callbacks
  * @name: name if available
  * @revision: interconnect target module revision
+ * @reserved: target module is reserved and already in use
  * @enabled: sysc runtime enabled status
  * @needs_resume: runtime resume needed on resume from suspend
  * @child_needs_resume: runtime resume needed for child on resume from suspend
@@ -130,6 +131,7 @@ struct sysc {
 	struct ti_sysc_cookie cookie;
 	const char *name;
 	u32 revision;
+	unsigned int reserved:1;
 	unsigned int enabled:1;
 	unsigned int needs_resume:1;
 	unsigned int child_needs_resume:1;
@@ -3045,8 +3047,8 @@ static int sysc_probe(struct platform_device *pdev)
 		return error;
 
 	error = sysc_check_active_timer(ddata);
-	if (error)
-		return error;
+	if (error == -EBUSY)
+		ddata->reserved = true;
 
 	error = sysc_get_clocks(ddata);
 	if (error)
@@ -3082,11 +3084,15 @@ static int sysc_probe(struct platform_device *pdev)
 	sysc_show_registers(ddata);
 
 	ddata->dev->type = &sysc_device_type;
-	error = of_platform_populate(ddata->dev->of_node, sysc_match_table,
-				     pdata ? pdata->auxdata : NULL,
-				     ddata->dev);
-	if (error)
-		goto err;
+
+	if (!ddata->reserved) {
+		error = of_platform_populate(ddata->dev->of_node,
+					     sysc_match_table,
+					     pdata ? pdata->auxdata : NULL,
+					     ddata->dev);
+		if (error)
+			goto err;
+	}
 
 	INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle);
 

  reply	other threads:[~2021-06-04  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 13:56 Regression with 6cfcd5563b4f on BeagleBoard Rev C2 Jarkko Nikula
2021-06-02  5:30 ` Tony Lindgren
2021-06-02 18:21   ` Jarkko Nikula
2021-06-04  6:35     ` Tony Lindgren [this message]
2021-06-04 15:41       ` Jarkko Nikula
2021-06-05  5:13         ` Tony Lindgren

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=YLnJowBaoJPyZWOk@atomide.com \
    --to=tony@atomide.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=linux-omap@vger.kernel.org \
    /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.