linux-mips
[Top] [All Lists]

[PATCH 3/5] MIPS: lantiq: make use of new PCI clock helper

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 3/5] MIPS: lantiq: make use of new PCI clock helper
From: John Crispin <blogic@openwrt.org>
Date: Sun, 22 Jul 2012 08:55:59 +0200
Cc: linux-mips@linux-mips.org, John Crispin <blogic@openwrt.org>
In-reply-to: <1342940161-1421-1-git-send-email-blogic@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1342940161-1421-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
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>
---
 arch/mips/pci/pci-lantiq.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 075d87a..dae4349 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -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))
-- 
1.7.9.1


<Prev in Thread] Current Thread [Next in Thread>