]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Lantiq: Make use of new PCI clock helper
authorJohn Crispin <blogic@openwrt.org>
Sun, 22 Jul 2012 06:55:59 +0000 (08:55 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 17 Aug 2012 08:57:43 +0000 (10:57 +0200)
Make use of the new helper function that allows us to set the PCI clock
delay inside the PCI driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4115/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/pci/pci-lantiq.c

index 075d87acd12ac4158e090b7918250e958f0d8c05..dae4349e374e51fd2f5c61432ff4327e85dd106a 100644 (file)
@@ -98,7 +98,7 @@ static inline u32 ltq_calc_bar11mask(void)
 static int __devinit ltq_pci_startup(struct platform_device *pdev)
 {
        struct device_node *node = pdev->dev.of_node;
-       const __be32 *req_mask, *bus_clk;
+       const __be32 *req_mask, *bus_clk, *delay;
        u32 temp_buffer;
 
        /* get our clocks */
@@ -127,6 +127,11 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev)
        else
                clk_disable(clk_external);
 
+       /* pci ckl delay is a 6 bit value */
+       delay = of_get_property(node, "lantiq,delay", NULL);
+       if (delay)
+               ltq_pci_set_delay(*delay);
+
        /* setup reset gpio used by pci */
        reset_gpio = of_get_named_gpio(node, "gpio-reset", 0);
        if (gpio_is_valid(reset_gpio))