Thread (116 messages) 116 messages, 4 authors, 2012-06-22

[PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

flat view
STALE5232d SUPERSEDED

From: Mohammed, Afzal <hidden>
Date: 2012-06-12 06:53:06
Also in: linux-omap

Revision v5 of 10 in this series.

Revisions (10)
  1. v5
  2. v5
  3. v5 current
  4. v5
  5. v6 [diff vs current]
  6. v7 [diff vs current]
  7. v8 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v8 [diff vs current]
Hi Jon,

On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote:
quoted
+	pdev = omap_device_build(name, -1, oh, pdata,
+					sizeof(*pdata), NULL, 0, 0);
+	if (IS_ERR(pdev)) {
+		WARN(1, "Can't build omap_device for %s:%s.\n",
+						name, oh->name);
+		return PTR_ERR(pdev);
+	}
+
+	gpmc_l3_clk = clk_get(NULL, oh->main_clk);
+	if (IS_ERR(gpmc_l3_clk)) {
+		pr_err("Could not get GPMC clock\n");
+		return PTR_ERR(gpmc_l3_clk);
+	}
My preference would be to store gpmc_l3_clk in the pdata and pass to
probe via the pdata. The aim would be to remove the global gpmc_l3_clk
altogether.
For timing calculation by platform outside of driver, we need clk rate
Also we should attempt to get the clk before calling omap_device_build
which is registering the driver.
omap_device_build registers only device, but I agree that clk should
be obtained before it as driver can get probed at that point

Regards,
Afzal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help