- //don't use this quirk stuff here!?
-#if 0
- u32 wait=0;
- while(!read32(OHCI0_HC_CTRL_CURRENT_ED)) {
- }
- while(read32(OHCI0_HC_CTRL_CURRENT_ED));
- printf("+++++++++++++++++++++++++++++\n");
- printf("wait: %d\n", wait);
- udelay(1000000);
-#else
- while(!read32(OHCI0_HC_CTRL_CURRENT_ED)) {
- }
- udelay(100000);
- u32 current = read32(OHCI0_HC_CTRL_CURRENT_ED);
- printf("current: 0x%08X\n", current);
- printf("+++++++++++++++++++++++++++++\n");
- udelay(1000000);
-#endif
+ /* poll until edhead->headp is null */
+ do {
+ sync_before_read(edhead, sizeof(struct endpoint_descriptor));
+ printf("edhead->headp: 0x%08X\n", LE(edhead->headp));
+ } while(LE(edhead->headp)&~0xf);