Thread (1 message) 1 message, 1 author, 2012-03-07

[PATCH 14/14] ARM: kirkwood: use devicetree to init sata_mv

From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-03-07 18:40:09
Also in: linux-devicetree

On Wednesday 07 March 2012, Jason Cooper wrote:
quoted hunk
@@ -504,6 +504,16 @@ static int __init kirkwood_clock_gate(void)
                kirkwood_clk_ctrl |= CGC_USB0;
                of_node_put(np);
        }
+
+       np = of_find_compatible_node(NULL, NULL, "mrvl,orion-sata");
+       if (np && of_device_is_available(np)) {
+               int nr_ports;
+               kirkwood_clk_ctrl |= CGC_SATA0;
+               of_property_read_u32(np, "nr-ports", &nr_ports);
+               if (nr_ports > 1)
+                       kirkwood_clk_ctrl |= CGC_SATA1;
+               of_node_put(np);
+       }
 #endif
 
        /* For SATA: first shutdown the phy */
Is it guaranteed that it's always the first port that gets used if there
is only one? If not, this might turn on the wrong one.

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