mpc5xxx: Remove all references to MGT5100
[platform/kernel/u-boot.git] / cpu / mpc5xxx / usb_ohci.c
index 61a4e3f..7976e4d 100644 (file)
 #define m16_swap(x) swap_16(x)
 #define m32_swap(x) swap_32(x)
 
-#ifdef CONFIG_MPC5200
 #define ohci_cpu_to_le16(x) (x)
 #define ohci_cpu_to_le32(x) (x)
-#else
-#define ohci_cpu_to_le16(x) swap_16(x)
-#define ohci_cpu_to_le32(x) swap_32(x)
-#endif
 
 /* global ohci_t */
 static ohci_t gohci;
@@ -803,9 +798,7 @@ static td_t * dl_reverse_done_list (ohci_t *ohci)
                                } else
                                        td_list->ed->hwHeadP &= ohci_cpu_to_le32 (0xfffffff2);
                        }
-#ifdef CONFIG_MPC5200
                        td_list->hwNextTD = 0;
-#endif
                }
 
                td_list->next_dl_td = td_rev;
@@ -1576,9 +1569,13 @@ int usb_lowlevel_init(void)
        /* Set the USB Clock                                                 */
        *(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
 
+#ifdef CONFIG_PSC3_USB /* USB is using the alternate configuration */
+       /* remove all PSC3 USB bits first before ORing in ours */
+       *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00804f00;
+#else
        /* remove all USB bits first before ORing in ours */
        *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
-
+#endif
        /* Activate USB port                                                 */
        *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;