Signed-off-by: Mathias Kresin <[email protected]>
---
 ...x200-add-gphy-clk-src-device-tree-binding.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 
target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch

diff --git 
a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
 
b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
new file mode 100644
index 0000000..7a4d239
--- /dev/null
+++ 
b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -0,0 +1,26 @@
+--- a/arch/mips/lantiq/xway/sysctrl.c
++++ b/arch/mips/lantiq/xway/sysctrl.c
+@@ -426,6 +426,8 @@ static void clkdev_add_clkout(void)
+ /* bring up all register ranges that we need for basic system control */
+ void __init ltq_soc_init(void)
+ {
++      int ret;
++      u32 phy_clk_src, ifcc;
+       struct resource res_pmu, res_cgu, res_ebu;
+       struct device_node *np_pmu =
+                       of_find_compatible_node(NULL, NULL, "lantiq,pmu-xway");
+@@ -608,4 +610,14 @@ void __init ltq_soc_init(void)
+ 
+       if (of_machine_is_compatible("lantiq,vr9"))
+               xbar_fpi_burst_disable();
++
++      if (np_cgu) {
++              ret = of_property_read_u32(np_cgu, "lantiq,phy-clk-src",
++                                         &phy_clk_src);
++
++              if (!ret) {
++                      ifcc = ltq_cgu_r32(ifccr) & ~(0x1c);
++                      ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr);
++              }
++      }
+ }
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to