blob: bdf1484e255f16bfd8094838347b715efdb7d63b [file] [log] [blame]
Googlera8fd56b2024-10-24 14:04:51 +08001/*
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
14int 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
32int usb_cpu_stop(void)
33{
34 return 0;
35}
36
37int usb_cpu_init_fail(void)
38{
39 return 0;
40}
41
42#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */