Merge branch 'master' of git://www.denx.de/git/u-boot-at91
[oweals/u-boot.git] / cpu / arm920t / at91rm9200 / usb.c
index 7b83f23eb380eb069b30f02774d7cbe7c2a2ecd9..c121de6328ed8cac480ce097b395092bbae4bb9d 100644 (file)
 
 #include <common.h>
 
-#if defined(CONFIG_USB_OHCI) && defined(CFG_USB_OHCI_CPU_INIT)
+#if defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT)
 # ifdef CONFIG_AT91RM9200
 
 #include <asm/arch/hardware.h>
 
-int usb_cpu_init()
+int usb_cpu_init(void)
 {
        /* Enable USB host clock. */
        *AT91C_PMC_SCER = AT91C_PMC_UHP;        /* 48MHz clock enabled for UHP */
@@ -36,12 +36,18 @@ int usb_cpu_init()
        return 0;
 }
 
-int usb_cpu_stop()
+int usb_cpu_stop(void)
 {
        /* Initialization failed */
        *AT91C_PMC_PCDR = 1 << AT91C_ID_UHP;    /* Peripheral Clock Disable Register */
        *AT91C_PMC_SCDR = AT91C_PMC_UHP;        /* 48MHz clock disabled for UHP */
        return 0;
 }
+
+int usb_cpu_init_fail(void)
+{
+       return usb_cpu_stop();
+}
+
 # endif /* CONFIG_AT91RM9200 */
 #endif /* defined(CONFIG_USB_OHCI) && defined(CFG_USB_OHCI_CPU_INIT) */