[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00e47cf9-b444-4fcf-0d1a-11ff61edf008@linaro.org>
Date: Tue, 12 Feb 2019 10:08:29 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Tony Lindgren <tony@...mide.com>, linux-kernel@...r.kernel.org
Cc: linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
"H . Nikolaus Schaller" <hns@...delico.com>,
Keerthy <j-keerthy@...com>,
Ladislav Michl <ladis@...ux-mips.org>,
Pavel Machek <pavel@....cz>,
Sebastian Reichel <sre@...nel.org>,
Tero Kristo <t-kristo@...com>,
Thierry Reding <thierry.reding@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH 1/3] clocksource: timer-ti-dm: Fix pwm dmtimer usage of
fck reparenting
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@...libre.com>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Cc: H. Nikolaus Schaller <hns@...delico.com>
> Cc: Keerthy <j-keerthy@...com>
> Cc: Ladislav Michl <ladis@...ux-mips.org>
> Cc: Pavel Machek <pavel@....cz>
> Cc: Sebastian Reichel <sre@...nel.org>
> Cc: Tero Kristo <t-kristo@...com>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Reported-by: H. Nikolaus Schaller <hns@...delico.com>
> Signed-off-by: Tony Lindgren <tony@...mide.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
Powered by blists - more mailing lists