blob: bdf1484e255f16bfd8094838347b715efdb7d63b [file] [log] [blame]
Markus Klotzbuecher72657572007-06-06 11:49:43 +02001/*
2 * (C) Copyright 2007
3 * Markus Klotzbuecher, DENX Software Engineering <mk@denx.de>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Markus Klotzbuecher72657572007-06-06 11:49:43 +02006 */
7
8#include <common.h>
9
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020010#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
Markus Klotzbuecher72657572007-06-06 11:49:43 +020011
12#include <mpc5xxx.h>
13
Martin Krause4a8527e2007-08-21 12:40:34 +020014int usb_cpu_init(void)
Markus Klotzbuecher72657572007-06-06 11:49:43 +020015{
16 /* Set the USB Clock */
17 *(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
18
Eric Millbrandt307ecb62009-08-13 08:32:37 -050019#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
Markus Klotzbuecher72657572007-06-06 11:49:43 +020023 /* remove all USB bits first before ORing in ours */
24 *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
Eric Millbrandt307ecb62009-08-13 08:32:37 -050025#endif
Markus Klotzbuecher72657572007-06-06 11:49:43 +020026 /* Activate USB port */
27 *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;
28
29 return 0;
30}
31
Martin Krause4a8527e2007-08-21 12:40:34 +020032int usb_cpu_stop(void)
Markus Klotzbuecher72657572007-06-06 11:49:43 +020033{
34 return 0;
35}
36
Martin Krause4a8527e2007-08-21 12:40:34 +020037int usb_cpu_init_fail(void)
Markus Klotzbuecher72657572007-06-06 11:49:43 +020038{
39 return 0;
40}
41
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020042#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */