arm: vf610: fix double iomux configuration for vf610twr board
[u-boot/qq2440-u-boot.git] / drivers / usb / host / ohci-da8xx.c
blob9816628065a6a7b4b1b0845aa6eada2620277d38
1 /*
2 * Copyright (C) 2012 Sughosh Ganu <urwithsughosh@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
5 */
7 #include <common.h>
9 #include <asm/arch/da8xx-usb.h>
11 int usb_cpu_init(void)
13 /* enable psc for usb2.0 */
14 lpsc_on(DAVINCI_LPSC_USB20);
16 /* enable psc for usb1.0 */
17 lpsc_on(DAVINCI_LPSC_USB11);
19 /* start the on-chip usb phy and its pll */
20 if (usb_phy_on())
21 return 0;
23 return 1;
26 int usb_cpu_stop(void)
28 usb_phy_off();
30 /* turn off the usb clock and assert the module reset */
31 lpsc_disable(DAVINCI_LPSC_USB11);
32 lpsc_disable(DAVINCI_LPSC_USB20);
34 return 0;
37 int usb_cpu_init_fail(void)
39 return usb_cpu_stop();