2007-06-06 09:49:43 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007
|
|
|
|
* Markus Klotzbuecher, DENX Software Engineering <mk@denx.de>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2007-06-06 09:49:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
|
2007-06-06 09:49:43 +00:00
|
|
|
|
|
|
|
#include <mpc5xxx.h>
|
|
|
|
|
2007-08-21 10:40:34 +00:00
|
|
|
int usb_cpu_init(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
|
|
|
/* Set the USB Clock */
|
|
|
|
*(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
|
|
|
|
|
2009-08-13 13:32:37 +00:00
|
|
|
#ifdef CONFIG_PSC3_USB /* USB is using the alternate configuration */
|
|
|
|
/* remove all PSC3 USB bits first before ORing in ours */
|
|
|
|
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00804f00;
|
|
|
|
#else
|
2007-06-06 09:49:43 +00:00
|
|
|
/* remove all USB bits first before ORing in ours */
|
|
|
|
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
|
2009-08-13 13:32:37 +00:00
|
|
|
#endif
|
2007-06-06 09:49:43 +00:00
|
|
|
/* Activate USB port */
|
|
|
|
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-08-21 10:40:34 +00:00
|
|
|
int usb_cpu_stop(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-08-21 10:40:34 +00:00
|
|
|
int usb_cpu_init_fail(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
|