mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/4] ARM: rpi: move clk support to a separate driver and enable deep-probe
Date: Mon, 31 Jan 2022 10:35:10 +0100	[thread overview]
Message-ID: <20220131093510.GY23490@pengutronix.de> (raw)
In-Reply-To: <20220128082317.2410427-3-o.rempel@pengutronix.de>

On Fri, Jan 28, 2022 at 09:23:15AM +0100, Oleksij Rempel wrote:
> To make deep-probe work properly, we need clock support be registered as
> driver to related device.
> 
> To avoid regression, deep-probe is enabled in the same patch.

Is this really needed?

> +static int bcm2835_cprman_probe(struct device_d *dev)
> +{
> +	struct device_node *mbox_node;
> +	struct clk *clk_cs;
> +	int ret;
> +
> +	mbox_node = of_find_compatible_node(NULL, NULL, "brcm,bcm2835-mbox");
> +	if (!mbox_node) {
> +		pr_err("Missing mbox node\n");
> +		return -ENOENT;
> +	}
> +
> +	ret = of_device_ensure_probed(mbox_node);
> +	if (ret) {
> +		pr_err("Can't probe mbox node. %i\n", ret);
> +		return ret;
> +	}
> +
> +	clks[BCM2835_CLOCK_EMMC] =
> +		rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_EMMC,
> +					 "bcm2835_mci0");
> +	if (IS_ERR(clks[BCM2835_CLOCK_EMMC]))
> +		return PTR_ERR(clks[BCM2835_CLOCK_EMMC]);
> +
> +	clkdev_add_physbase(clks[BCM2835_CLOCK_EMMC], 0x20300000, NULL);
> +	clkdev_add_physbase(clks[BCM2835_CLOCK_EMMC], 0x3f300000, NULL);

You shouldn't need these calls anymore because the consumers are now
connected to the clock provider by the device tree binding.

Sascha

-- 
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:[~2022-01-31  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  8:23 [PATCH v2 0/4] refactore rpi board code Oleksij Rempel
2022-01-28  8:23 ` [PATCH v2 1/4] ARM: rpi: convert board code to a driver Oleksij Rempel
2022-01-28  8:23 ` [PATCH v2 2/4] ARM: rpi: move clk support to a separate driver and enable deep-probe Oleksij Rempel
2022-01-31  9:35   ` Sascha Hauer [this message]
2022-01-28  8:23 ` [PATCH v2 3/4] ARM: rpi: validate devicetree compatible instead of changing model name Oleksij Rempel
2022-01-28  8:23 ` [PATCH v2 4/4] ARM: rpi: set host name based on DT compatible Oleksij Rempel

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=20220131093510.GY23490@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@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