2 * Copyright (C) 2012 Sughosh Ganu <urwithsughosh@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
17 #include <asm/arch/da8xx-usb.h>
19 int usb_cpu_init(void)
21 /* enable psc for usb2.0 */
22 lpsc_on(DAVINCI_LPSC_USB20);
24 /* enable psc for usb1.0 */
25 lpsc_on(DAVINCI_LPSC_USB11);
27 /* start the on-chip usb phy and its pll */
34 int usb_cpu_stop(void)
38 /* turn off the usb clock and assert the module reset */
39 lpsc_disable(DAVINCI_LPSC_USB11);
40 lpsc_disable(DAVINCI_LPSC_USB20);
45 int usb_cpu_init_fail(void)
47 return usb_cpu_stop();