mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>,
	Steffen Trumtrar <str@pengutronix.de>
Subject: Re: [PATCH 3/3] driver: Call of_clk_set_defaults for each probed device
Date: Mon, 6 Apr 2020 08:01:19 +0200	[thread overview]
Message-ID: <0755ee61-3cd4-3e42-8d9c-cd57eb615ce6@pengutronix.de> (raw)
In-Reply-To: <20200213105803.32096-3-s.hauer@pengutronix.de>

Hello Sascha,

On 2/13/20 11:58 AM, Sascha Hauer wrote:
> So far we only honour the assigned-clocks and assigned-clock-rates
> device tree properties for the clock controller nodes. With this patch
> we also honour the properties for each device which is done by Linux
> as well.

This breaks the default barebox console on the i.MX7 sabresd.
The default UART, uart1, specifies assigned-clock-parents, which is now applied
and causes garbage to be output on the serial port.

&uart1 {
       /delete-property/ assigned-clocks;
       /delete-property/ assigned-clock-parents;
};

Fixes it, but I didn't dig deeper than that.

> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/base/driver.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/base/driver.c b/drivers/base/driver.c
> index eec2a2d8a2..247456a2c6 100644
> --- a/drivers/base/driver.c
> +++ b/drivers/base/driver.c
> @@ -36,6 +36,7 @@
>  #include <linux/err.h>
>  #include <complete.h>
>  #include <pinctrl.h>
> +#include <linux/clk/clk-conf.h>
>  
>  LIST_HEAD(device_list);
>  EXPORT_SYMBOL(device_list);
> @@ -86,6 +87,7 @@ int device_probe(struct device_d *dev)
>  	int ret;
>  
>  	pinctrl_select_state_default(dev);
> +	of_clk_set_defaults(dev->device_node, false);
>  
>  	list_add(&dev->active, &active);
>  
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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

  reply	other threads:[~2020-04-06  6:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 10:58 [PATCH 1/3] clk-conf.h: Add missing re-inclusion protection Sascha Hauer
2020-02-13 10:58 ` [PATCH 2/3] clk-conf.h: Add static inline wrapper for of_clk_set_defaults() Sascha Hauer
2020-02-13 10:58 ` [PATCH 3/3] driver: Call of_clk_set_defaults for each probed device Sascha Hauer
2020-04-06  6:01   ` Ahmad Fatoum [this message]
2020-04-14 10:02     ` Sascha Hauer
2020-04-15  9:57       ` Ahmad Fatoum

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=0755ee61-3cd4-3e42-8d9c-cd57eb615ce6@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=str@pengutronix.de \
    /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