Re: [PATCH v2 2/4] ARM: rpi: move clk support to a separate driver and enable deep-probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux