3 * Sergey Kostanbaev < sergey.kostanbaev <at> fairwaves.ru >
5 * SPDX-License-Identifier: GPL-2.0+
11 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
13 #include <asm/arch/ep93xx.h>
15 int usb_cpu_init(void)
17 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
18 unsigned long pwr = readl(&syscon->pwrcnt);
19 writel(pwr | SYSCON_PWRCNT_USH_EN, &syscon->pwrcnt);
24 int usb_cpu_stop(void)
26 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
27 unsigned long pwr = readl(&syscon->pwrcnt);
28 writel(pwr & ~SYSCON_PWRCNT_USH_EN, &syscon->pwrcnt);
33 int usb_cpu_init_fail(void)
35 return usb_cpu_stop();
38 #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */