]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dove: Add pcie clock support
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 25 Sep 2012 00:02:13 +0000 (02:02 +0200)
committerJason Cooper <jason@lakedaemon.net>
Wed, 17 Oct 2012 17:19:47 +0000 (17:19 +0000)
As dove now has clock gating control ensure pcie ports grab their
clocks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/mach-dove/pcie.c

index bb15b26041cb7d6bd13a5ca4d5532cb66632e2cc..0ef4435b16570dccde5af41737bf25987051270d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/kernel.h>
 #include <linux/pci.h>
+#include <linux/clk.h>
 #include <video/vga.h>
 #include <asm/mach/pci.h>
 #include <asm/mach/arch.h>
@@ -188,6 +189,10 @@ static void __init add_pcie_port(int index, void __iomem *base)
 
        if (orion_pcie_link_up(base)) {
                struct pcie_port *pp = &pcie_port[num_pcie_ports++];
+               struct clk *clk = clk_get_sys("pcie", (index ? "1" : "0"));
+
+               if (!IS_ERR(clk))
+                       clk_prepare_enable(clk);
 
                printk(KERN_INFO "link up\n");