At the moment, the clk driver is not clever enough to automatically
enable parent clocks like Linux. Enable the STDMAC clock explicitly
if USB is enabled.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
#include <linux/io.h>
#include "../init.h"
+#include "../sc64-regs.h"
#include "../sg-regs.h"
void uniphier_ld11_clk_init(void)
writel(3, SG_ETPHYPSHUT);
writel(7, SG_ETPHYCNT);
}
+
+#ifdef CONFIG_USB_EHCI
+ {
+ /* FIXME: the current clk driver can not handle parents */
+ u32 tmp;
+ tmp = readl(SC_CLKCTRL4);
+ tmp |= SC_CLKCTRL4_MIO | SC_CLKCTRL4_STDMAC;
+ writel(tmp, SC_CLKCTRL4);
+ }
+#endif
}
#define SC_CLKCTRL (SC_BASE_ADDR | 0x2100)
#define SC_CLKCTRL3 (SC_BASE_ADDR | 0x2108)
#define SC_CLKCTRL4 (SC_BASE_ADDR | 0x210c)
+#define SC_CLKCTRL4_MIO (1 << 10)
+#define SC_CLKCTRL4_STDMAC (1 << 8)
#define SC_CLKCTRL4_PERI (1 << 7)
#define SC_CLKCTRL4_ETHER (1 << 6)
#define SC_CLKCTRL4_NAND (1 << 0)