08e45dfaec3828e26d4884dc31213bf27ff06724
[openwrt.git] / target / linux / imx6 / patches-3.12 / 0006-ARM-imx6q-clock-and-Kconfig-update-for-PCIe-support.patch
1 From 74b8031307c5d33d36742c26dd0921991bd5a255 Mon Sep 17 00:00:00 2001
2 From: Sean Cross <xobs@kosagi.com>
3 Date: Thu, 26 Sep 2013 10:45:35 +0800
4 Subject: [PATCH] ARM: imx6q: clock and Kconfig update for PCIe support
5
6 Update imx6q clock initialization and Kconfig for PCIe support.
7
8 Signed-off-by: Sean Cross <xobs@kosagi.com>
9 Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
10 ---
11  arch/arm/mach-imx/Kconfig     | 2 ++
12  arch/arm/mach-imx/clk-imx6q.c | 4 ++++
13  2 files changed, 6 insertions(+)
14
15 diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
16 index e017915..270f786 100644
17 --- a/arch/arm/mach-imx/Kconfig
18 +++ b/arch/arm/mach-imx/Kconfig
19 @@ -802,6 +802,8 @@ config SOC_IMX6Q
20         select HAVE_IMX_SRC
21         select HAVE_SMP
22         select MFD_SYSCON
23 +       select MIGHT_HAVE_PCI
24 +       select PCI_DOMAINS if PCI
25         select PINCTRL
26         select PINCTRL_IMX6Q
27         select PL310_ERRATA_588369 if CACHE_PL310
28 diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
29 index e8e5bad..07bc0d8 100644
30 --- a/arch/arm/mach-imx/clk-imx6q.c
31 +++ b/arch/arm/mach-imx/clk-imx6q.c
32 @@ -623,6 +623,10 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
33         if (ret)
34                 pr_warn("failed to set up CLKO: %d\n", ret);
35  
36 +       /* All existing boards with PCIe use LVDS1 */
37 +       if (IS_ENABLED(CONFIG_PCI_IMX6))
38 +               clk_set_parent(clk[lvds1_sel], clk[sata_ref]);
39 +
40         /* Set initial power mode */
41         imx6q_set_lpm(WAIT_CLOCKED);
42  
43 -- 
44 1.8.4.1
45