mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Tony Lindgren <tony@atomide.com>, linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	"H . Nikolaus Schaller" <hns@goldelico.com>,
	Keerthy <j-keerthy@ti.com>, Ladislav Michl <ladis@linux-mips.org>,
	Pavel Machek <pavel@ucw.cz>, Sebastian Reichel <sre@kernel.org>,
	Tero Kristo <t-kristo@ti.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [PATCH 1/3] clocksource: timer-ti-dm: Fix pwm dmtimer usage of fck reparenting
Date: Tue, 12 Feb 2019 10:08:29 +0100	[thread overview]
Message-ID: <00e47cf9-b444-4fcf-0d1a-11ff61edf008@linaro.org> (raw)
In-Reply-To: <20190122175717.13428-2-tony@atomide.com>

On 22/01/2019 18:57, Tony Lindgren wrote:
> Commit 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe
> them with ti-sysc") moved some omap4 timers to probe with ti-sysc
> interconnect target module. Turns out this broke pwm-omap-dmtimer
> where we now try to reparent the clock to itself with the following:
> 
> omap_dm_timer_of_set_source: failed to set parent
> 
> With ti-sysc, we can now configure the clock sources in the dts
> with assigned-clocks and assigned-clock-parents. So we should be able
> to remove omap_dm_timer_of_set_source with clean-up patches later on.
> But for now, let's just fix it first by checking if parent and fck
> are the same and bail out of so.
> 
> Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe
> them with ti-sysc")
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Ladislav Michl <ladis@linux-mips.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: Tero Kristo <t-kristo@ti.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Do you want me to take it through my tree (1 et 3)?

>  drivers/clocksource/timer-ti-dm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
> --- a/drivers/clocksource/timer-ti-dm.c
> +++ b/drivers/clocksource/timer-ti-dm.c
> @@ -154,6 +154,10 @@ static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer)
>  	if (IS_ERR(parent))
>  		return -ENODEV;
>  
> +	/* Bail out if both clocks point to fck */
> +	if (clk_is_match(parent, timer->fclk))
> +		return 0;
> +
>  	ret = clk_set_parent(timer->fclk, parent);
>  	if (ret < 0)
>  		pr_err("%s: failed to set parent\n", __func__);
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  parent reply	other threads:[~2019-02-12  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 17:57 [PATCH 0/3] pwm-omap-dmtimer regression fixes Tony Lindgren
2019-01-22 17:57 ` [PATCH 1/3] clocksource: timer-ti-dm: Fix pwm dmtimer usage of fck reparenting Tony Lindgren
2019-01-26 18:40   ` Andreas Kemnade
2019-01-26 19:30     ` H. Nikolaus Schaller
2019-02-12  9:08   ` Daniel Lezcano [this message]
2019-02-12 15:29     ` Tony Lindgren
2019-01-22 17:57 ` [PATCH 2/3] bus: ti-sysc: Fix timer handling with drop pm_runtime_irq_safe() Tony Lindgren
2019-01-26 18:41   ` Andreas Kemnade
2019-01-26 19:31     ` H. Nikolaus Schaller
2019-01-22 17:57 ` [PATCH 3/3] ARM: dts: Configure clock parent for pwm vibra 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=00e47cf9-b444-4fcf-0d1a-11ff61edf008@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=hns@goldelico.com \
    --cc=j-keerthy@ti.com \
    --cc=ladis@linux-mips.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®