Re: [PATCH v2 3/8] ARM: OMAP2+: hwmod: reorganize and document the setup process

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

On 4/19/2012 11:49 AM, Paul Walmsley wrote:
Hi Benoît,

On Thu, 19 Apr 2012, Cousson, Benoit wrote:

On 4/19/2012 10:17 AM, Paul Walmsley wrote:

   static int __init omap_hwmod_setup_all(void)
-	int r;
-	if (!mpu_oh) {
-		pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet
-		       __func__, MPU_INITIATOR_NAME);
-		return -EINVAL;
-	}
-	r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
-	r = omap_hwmod_for_each(_init_clocks, NULL);
-	     "omap_hwmod: %s: _init_clocks failed\n", __func__);
+	_ensure_mpu_hwmod_is_setup(NULL);

+	omap_hwmod_for_each(_init, NULL);
   	omap_hwmod_for_each(_setup, NULL);

Does it make sense to iterate twice? Cannot we just iterate over a _init +
_setup single call?

It's a good idea but I don't think we can do that until we add the code to
walk the hwmod data in dependency order.  The DSS custom reset function
accesses registers in another hwmod, which won't have its clocks
initialized yet if _init() and setup() are combined.

Outch, that's unfortunate!

I'm wondering if the whole automatic reset management at hwmod level does make sense for such IP.

In the case of the DSS, having some reset support in the driver model should allow potentially a reset done at parent level to be broadcasted to every children.


linux-arm-kernel mailing list

[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter