2007-07-11 18:11:07 +00:00
|
|
|
/*
|
2007-06-06 09:49:43 +00:00
|
|
|
* (C) Copyright 2007
|
|
|
|
* Markus Klotzbuecher, DENX Software Engineering <mk@denx.de>
|
2007-07-11 18:11:07 +00:00
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2007-07-11 18:11:07 +00:00
|
|
|
*/
|
|
|
|
|
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-07-11 18:11:07 +00:00
|
|
|
|
2007-11-09 14:37:23 +00:00
|
|
|
#ifdef CONFIG_4xx_DCACHE
|
|
|
|
#include <asm/mmu.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
#endif
|
|
|
|
|
2007-08-14 14:36:29 +00:00
|
|
|
int usb_cpu_init(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
2007-11-09 14:37:23 +00:00
|
|
|
#ifdef CONFIG_4xx_DCACHE
|
|
|
|
/* disable cache */
|
|
|
|
change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, TLB_WORD2_I_ENABLE);
|
|
|
|
#endif
|
2007-06-06 09:49:43 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-08-14 14:36:29 +00:00
|
|
|
int usb_cpu_stop(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
2007-11-09 14:37:23 +00:00
|
|
|
#ifdef CONFIG_4xx_DCACHE
|
|
|
|
/* enable cache */
|
|
|
|
change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0);
|
|
|
|
#endif
|
2007-06-06 09:49:43 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2007-07-11 18:11:07 +00:00
|
|
|
|
2007-08-14 14:36:29 +00:00
|
|
|
int usb_cpu_init_fail(void)
|
2007-06-06 09:49:43 +00:00
|
|
|
{
|
2007-11-09 14:37:23 +00:00
|
|
|
#ifdef CONFIG_4xx_DCACHE
|
|
|
|
/* enable cache */
|
|
|
|
change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0);
|
|
|
|
#endif
|
2007-06-06 09:49:43 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2007-07-11 18:11:07 +00:00
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
|