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

« back to all changes in this revision

Viewing changes to roms/u-boot/arch/powerpc/cpu/mpc5xxx/usb.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
 * (C) Copyright 2007
 
3
 * Markus Klotzbuecher, DENX Software Engineering <mk@denx.de>
 
4
 *
 
5
 * SPDX-License-Identifier:     GPL-2.0+
 
6
 */
 
7
 
 
8
#include <common.h>
 
9
 
 
10
#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
 
11
 
 
12
#include <mpc5xxx.h>
 
13
 
 
14
int usb_cpu_init(void)
 
15
{
 
16
        /* Set the USB Clock                                                 */
 
17
        *(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
 
18
 
 
19
#ifdef CONFIG_PSC3_USB /* USB is using the alternate configuration */
 
20
        /* remove all PSC3 USB bits first before ORing in ours */
 
21
        *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00804f00;
 
22
#else
 
23
        /* remove all USB bits first before ORing in ours */
 
24
        *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
 
25
#endif
 
26
        /* Activate USB port                                                 */
 
27
        *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;
 
28
 
 
29
        return 0;
 
30
}
 
31
 
 
32
int usb_cpu_stop(void)
 
33
{
 
34
        return 0;
 
35
}
 
36
 
 
37
int usb_cpu_init_fail(void)
 
38
{
 
39
        return 0;
 
40
}
 
41
 
 
42
#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */