1 // SPDX-License-Identifier: GPL-2.0+
4 * Sergey Kostanbaev < sergey.kostanbaev <at> fairwaves.ru >
10 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
12 #include <asm/arch/ep93xx.h>
14 int usb_cpu_init(void)
16 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
17 unsigned long pwr = readl(&syscon->pwrcnt);
18 writel(pwr | SYSCON_PWRCNT_USH_EN, &syscon->pwrcnt);
23 int usb_cpu_stop(void)
25 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
26 unsigned long pwr = readl(&syscon->pwrcnt);
27 writel(pwr & ~SYSCON_PWRCNT_USH_EN, &syscon->pwrcnt);
32 int usb_cpu_init_fail(void)
34 return usb_cpu_stop();
37 #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */