Thread (138 messages) flat view 138 messages, 14 authors, 2012-05-24
STALE5198d

[PATCH] arm: Add basic support for new Marvell Armada SoC family

From: Thomas Petazzoni <hidden>
Date: 2012-05-15 15:39:54

Le Tue, 15 May 2012 16:36:03 +0100,
Ben Dooks [off-list ref] a ?crit :
I've tracked this down to the following:
arch/arm/mach-armada/time.c

    190          } else {
    191                  u32 clk;
    192                  of_property_read_u32(np, "clock-frequency",
&clk); 193                  WARN_ON(!clk);

The problem is the 'clk' variable is un-initialised and therefore
the fact my device-tree is missing a clock-frequency property is
causing the system to use what was in 'clk' which was around 16000
from the stack.

I suggest that any property that is necessary to a unit operation
should check that there was something to read. WARN_ON() is fine,
but they you should not carry on and initialise the unit anyway.

I have now gone and fixed my .dts file and the system now gets to
the point to try and mount an initrd.
Thanks for your report and investigation, you're obviously correct.
We'll fix that.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help