mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: imx6sx: use correct clocks for GPT
@ 2018-06-05 15:08 Lucas Stach
  2018-06-07  9:23 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2018-06-05 15:08 UTC (permalink / raw)
  To: barebox

This is a stop gap solution until the upstream DT is fixed. In Linux this isn't
an issue as the driver prefers the "osc_per" clock, falling back to "per" and
then doing different things based on the SoC type and if the input clock rate
matches 3MHz. As this isn't really how the hardware works, but a fragile mix of
the clock driver exposing a clock with a faked frequency and system knowledge in
the GPT driver I prefer not to replicate this horrors in the Barebox driver,
but instead just use the system clock source.

Fixes: 2ebda864f837
       (ARM: imx: clocksource: Use per clock for determining parent freq)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/dts/imx6sx.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/imx6sx.dtsi b/arch/arm/dts/imx6sx.dtsi
index 5a8ee464460a..52424199f47c 100644
--- a/arch/arm/dts/imx6sx.dtsi
+++ b/arch/arm/dts/imx6sx.dtsi
@@ -10,3 +10,7 @@
 		pwm7 = &pwm8;
 	};
 };
+
+&gpt {
+	clocks = <&clks IMX6SX_CLK_GPT_BUS>, <&clks IMX6SX_CLK_GPT_SERIAL>;
+};
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: imx6sx: use correct clocks for GPT
  2018-06-05 15:08 [PATCH] ARM: imx6sx: use correct clocks for GPT Lucas Stach
@ 2018-06-07  9:23 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-06-07  9:23 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Tue, Jun 05, 2018 at 05:08:02PM +0200, Lucas Stach wrote:
> This is a stop gap solution until the upstream DT is fixed. In Linux this isn't
> an issue as the driver prefers the "osc_per" clock, falling back to "per" and
> then doing different things based on the SoC type and if the input clock rate
> matches 3MHz. As this isn't really how the hardware works, but a fragile mix of
> the clock driver exposing a clock with a faked frequency and system knowledge in
> the GPT driver I prefer not to replicate this horrors in the Barebox driver,
> but instead just use the system clock source.
> 
> Fixes: 2ebda864f837
>        (ARM: imx: clocksource: Use per clock for determining parent freq)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm/dts/imx6sx.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/dts/imx6sx.dtsi b/arch/arm/dts/imx6sx.dtsi
> index 5a8ee464460a..52424199f47c 100644
> --- a/arch/arm/dts/imx6sx.dtsi
> +++ b/arch/arm/dts/imx6sx.dtsi
> @@ -10,3 +10,7 @@
>  		pwm7 = &pwm8;
>  	};
>  };
> +
> +&gpt {
> +	clocks = <&clks IMX6SX_CLK_GPT_BUS>, <&clks IMX6SX_CLK_GPT_SERIAL>;
> +};
> -- 
> 2.17.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-07  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 15:08 [PATCH] ARM: imx6sx: use correct clocks for GPT Lucas Stach
2018-06-07  9:23 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox