so, the HC clears CLF (ControlListFilled bit of the register "Command Status") immedi...
authorBernhard Urban <lewurm@gmx.net>
Thu, 17 Sep 2009 23:10:53 +0000 (01:10 +0200)
committerBernhard Urban <lewurm@gmx.net>
Thu, 17 Sep 2009 23:10:53 +0000 (01:10 +0200)
the ohci specs says:
"This bit is used to indicate whether there are any TDs on the Control
list. It is set by HCD whenever it adds a TD to an ED in the Control
list." [so far so good]
"When HC begins to process the head of the Control list, it checks CLF.
As long as ControlListFilled is 0, HC will not start processing the
Control list. If CLF is 1, HC will start processing the Control list and
will set ControlListFilled to 0. If HC finds a TD on the list, then HC
will set ControlListFilled to 1 causing the Control list processing to
continue. If no TD is found on the Control list, and if the HCD does not
set ControlListFilled, then ControlListFilled will still be 0 when HC
completes processing the Control list and Control list processing will
stop."

What does it mean for us? HC don't find the TD?

usb/host/ohci.c

index a33bd427860b5eadde9fe009182c1d908059a3a4..db1b8bec0720d260d24109e7416361278070fdb1 100644 (file)
@@ -160,7 +160,9 @@ u8 hcdi_enqueue(usb_transfer_descriptor *td) {
                        "===========================\n");
        sync_before_read(&hcca_oh0, 256);
        printf("done head (nach sync): 0x%08X\n", ACCESS_LE(hcca_oh0.done_head));
-       printf("HCCA->frame_no: %d\nhcca->hccapad1: %d\n", ((ACCESS_LE(hcca_oh0.frame_no) & 0xffff0000)>>16), ACCESS_LE(hcca_oh0.frame_no)&0xffff );
+       printf("HCCA->frame_no: %d\nhcca->hccapad1: %d\n",
+                       ((ACCESS_LE(hcca_oh0.frame_no) & 0xffff0000)>>16),
+                       ACCESS_LE(hcca_oh0.frame_no)&0xffff );
        if(hcca_oh0.done_head) printf("WWWWWWWWOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOTTTTTTTTTTTT\n");
 
        struct general_td *tmptd = allocate_general_td(td->actlen);
@@ -218,8 +220,10 @@ u8 hcdi_enqueue(usb_transfer_descriptor *td) {
        u32 current = read32(OHCI0_HC_CTRL_CURRENT_ED);
        printf("current: 0x%08X\n", current);
        while(!current) {
-               udelay(10);
+               udelay(1000000);
                current = read32(OHCI0_HC_CTRL_CURRENT_ED);
+               printf("OHCI_CTRL_CLE: 0x%08X || ", read32(OHCI0_HC_CONTROL)&OHCI_CTRL_CLE);
+               printf("OHCI_CLF: 0x%08X\n", read32(OHCI0_HC_COMMAND_STATUS)&OHCI_CLF);
        }
 
        udelay(20000);