Thread (207 messages) 207 messages, 25 authors, 2010-10-01
STALE5719d

[PATCH 35/74] ST SPEAr: Enabling clocks before amba device registeration

From: Russell King - ARM Linux <hidden>
Date: 2010-09-02 10:02:47

On Mon, Aug 30, 2010 at 04:08:59PM +0530, Viresh KUMAR wrote:

No description, so I'm going to have to guess about this.
+static inline void
+spear_amba_device_register(struct amba_device **devices, u32 count)
+{
+	u32 i;
+
+	for (i = 0; i < count; i++) {
+		struct clk *clk = clk_get_sys(devices[i]->dev.init_name, NULL);
+		if (IS_ERR(clk))
+			continue;
+
+		clk_enable(clk);
+		amba_device_register(devices[i], &iomem_resource);
+		clk_disable(clk);
My guess is that you're doing this to work around the fact that your
SoC enables/disables both the bus clock and the functional clock to
each primecell, and so you're finding that you need to enable the
clock to access the device registers.

We've fixed this in the generic code by introducing an 'apb_pclk' clock
which the core bus code controls (and eventually drivers.)  See discussion
earlier this month/last month on this list about this.

That makes this patch redundant.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help