]> git.sur5r.net Git - u-boot/commitdiff
PXA USB OHCI: "usb stop" implementation.
authorRodolfo Giometti <giometti@enneenne.com>
Mon, 15 Oct 2007 09:59:17 +0000 (11:59 +0200)
committerWolfgang Denk <wd@denx.de>
Mon, 15 Oct 2007 10:57:41 +0000 (12:57 +0200)
Some USB keys need to be switched off before loading the kernel
otherwise they can remain in an undefined status which prevents them
to be correctly recognized by the kernel.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
cpu/pxa/usb.c

index 65f457fe59d5240e4297d3785763e79eeca2142f..3c11d4de44fe43d098f8da623644c9e6e62fbe8a 100644 (file)
@@ -67,6 +67,22 @@ int usb_cpu_init()
 
 int usb_cpu_stop()
 {
+       UHCHR |= UHCHR_FHR;
+       udelay(11);
+       UHCHR &= ~UHCHR_FHR;
+
+       UHCCOMS |= 1;
+       udelay(10);
+
+#if defined(CONFIG_CPU_MONAHANS)
+       UHCHR |= UHCHR_SSEP0;
+#endif
+#if defined(CONFIG_PXA27X)
+       UHCHR |= UHCHR_SSEP2;
+#endif
+       UHCHR |= UHCHR_SSEP1;
+       UHCHR |= UHCHR_SSE;
+
        return 0;
 }