mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
f036956e1f
This adds USB initialization fixes for Danube, Amazon SE and xrx300 and should fix the clock on at least Danube which hopefully closes FS#351. The xrx200 usb driver now uses more memory for the dwc2 fifos, this was increased in the chip compared to ar9. This is based in part on the vendor documentation and the vendor code base as a reference. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
31 lines
731 B
Diff
31 lines
731 B
Diff
--- a/arch/mips/lantiq/xway/sysctrl.c
|
|
+++ b/arch/mips/lantiq/xway/sysctrl.c
|
|
@@ -442,6 +442,20 @@ static void clkdev_add_clkout(void)
|
|
}
|
|
}
|
|
|
|
+static void set_phy_clock_source(struct device_node *np_cgu)
|
|
+{
|
|
+ u32 phy_clk_src, ifcc;
|
|
+
|
|
+ if (!np_cgu)
|
|
+ return;
|
|
+
|
|
+ if (of_property_read_u32(np_cgu, "lantiq,phy-clk-src", &phy_clk_src))
|
|
+ return;
|
|
+
|
|
+ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c);
|
|
+ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr);
|
|
+}
|
|
+
|
|
/* bring up all register ranges that we need for basic system control */
|
|
void __init ltq_soc_init(void)
|
|
{
|
|
@@ -628,4 +642,6 @@ void __init ltq_soc_init(void)
|
|
if (of_machine_is_compatible("lantiq,vr9"))
|
|
xbar_fpi_burst_disable();
|
|
usb_set_clock();
|
|
+
|
|
+ set_phy_clock_source(np_cgu);
|
|
}
|