Merge with git://www.denx.de/git/u-boot-testing
[oweals/u-boot.git] / cpu / ppc4xx / usb_ohci.c
index ab852c525cf73403483cf0159e1ff18e75324d0b..c71a6a9d85a7adabecaab0306b275e3c3c7b147d 100644 (file)
@@ -76,7 +76,7 @@
 #define m16_swap(x) swap_16(x)
 #define m32_swap(x) swap_32(x)
 
-#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
+#if defined(CONFIG_405EZ) || defined(CONFIG_440EP) || defined(CONFIG_440EPX)
 #define ohci_cpu_to_le16(x) (x)
 #define ohci_cpu_to_le32(x) (x)
 #else
@@ -1601,7 +1601,7 @@ int usb_lowlevel_init(void)
        gohci.irq = -1;
 #if defined(CONFIG_440EP)
        gohci.regs = (struct ohci_regs *)(CFG_PERIPHERAL_BASE | 0x1000);
-#elif defined(CONFIG_440EPX)
+#elif defined(CONFIG_440EPX) || defined(CFG_USB_HOST)
        gohci.regs = (struct ohci_regs *)(CFG_USB_HOST);
 #endif
 
@@ -1625,8 +1625,10 @@ int usb_lowlevel_init(void)
        ohci_inited = 1;
        urb_finished = 1;
 
+#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
        /* init the device driver */
        usb_dev_init();
+#endif
 
        return 0;
 }