summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/usb.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-01-03 09:46:55 -0600
committerJon Loeliger <jdl@freescale.com>2008-01-03 09:46:55 -0600
commit2c3536425d987bf079258973e2acebaaef3e16b6 (patch)
tree659d06dd33eca4888e1f6d01d046507b76dc2d27 /cpu/ppc4xx/usb.c
parentf743931f9b4d4e15c9bdfe726bef033ea1f1402c (diff)
parentce37422d0002e10490e268392e0c4e3028e52cec (diff)
downloadu-boot-imx-2c3536425d987bf079258973e2acebaaef3e16b6.zip
u-boot-imx-2c3536425d987bf079258973e2acebaaef3e16b6.tar.gz
u-boot-imx-2c3536425d987bf079258973e2acebaaef3e16b6.tar.bz2
Merge commit 'wd/master'
Diffstat (limited to 'cpu/ppc4xx/usb.c')
-rw-r--r--cpu/ppc4xx/usb.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/cpu/ppc4xx/usb.c b/cpu/ppc4xx/usb.c
index 272ed8c..cb8d5c7 100644
--- a/cpu/ppc4xx/usb.c
+++ b/cpu/ppc4xx/usb.c
@@ -25,25 +25,41 @@
#if defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT)
+#ifdef CONFIG_4xx_DCACHE
+#include <asm/mmu.h>
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
#include "usbdev.h"
int usb_cpu_init(void)
{
+#ifdef CONFIG_4xx_DCACHE
+ /* disable cache */
+ change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, TLB_WORD2_I_ENABLE);
+#endif
#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
usb_dev_init();
#endif
-
return 0;
}
int usb_cpu_stop(void)
{
+#ifdef CONFIG_4xx_DCACHE
+ /* enable cache */
+ change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0);
+#endif
return 0;
}
int usb_cpu_init_fail(void)
{
+#ifdef CONFIG_4xx_DCACHE
+ /* enable cache */
+ change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0);
+#endif
return 0;
}