~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/drivers/usb/host/ohci-da8xx.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2012 Sughosh Ganu <urwithsughosh@gmail.com>
 
3
 *
 
4
 * SPDX-License-Identifier:     GPL-2.0+
 
5
 */
 
6
 
 
7
#include <common.h>
 
8
 
 
9
#include <asm/arch/da8xx-usb.h>
 
10
 
 
11
int usb_cpu_init(void)
 
12
{
 
13
        /* enable psc for usb2.0 */
 
14
        lpsc_on(DAVINCI_LPSC_USB20);
 
15
 
 
16
        /* enable psc for usb1.0 */
 
17
        lpsc_on(DAVINCI_LPSC_USB11);
 
18
 
 
19
        /* start the on-chip usb phy and its pll */
 
20
        if (usb_phy_on())
 
21
                return 0;
 
22
 
 
23
        return 1;
 
24
}
 
25
 
 
26
int usb_cpu_stop(void)
 
27
{
 
28
        usb_phy_off();
 
29
 
 
30
        /* turn off the usb clock and assert the module reset */
 
31
        lpsc_disable(DAVINCI_LPSC_USB11);
 
32
        lpsc_disable(DAVINCI_LPSC_USB20);
 
33
 
 
34
        return 0;
 
35
}
 
36
 
 
37
int usb_cpu_init_fail(void)
 
38
{
 
39
        return usb_cpu_stop();
 
40
}