Changeset 8790650 in mainline


Ignore:
Timestamp:
2011-04-09T20:44:50Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
501e5df
Parents:
ff0e354
Message:

More debug (still does not work)

Location:
uspace/drv/ohci
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/batch.c

    rff0e354 r8790650  
    227227        ed_init(data->ed, instance->ep);
    228228        ed_add_tds(data->ed, &data->tds[0], &data->tds[data->td_count - 1]);
    229         usb_log_debug("Created ED: %x:%x:%x:%x.\n", data->ed->status,
    230             data->ed->td_tail, data->ed->td_head, data->ed->next);
     229        usb_log_debug("Created ED(%p): %x:%x:%x:%x.\n", data->ed,
     230            data->ed->status, data->ed->td_tail, data->ed->td_head,
     231            data->ed->next);
    231232        int toggle = 0;
    232233        /* setup stage */
  • uspace/drv/ohci/hc.c

    rff0e354 r8790650  
    108108            ret, str_error(ret));
    109109
    110 
    111110        hc_gain_control(instance);
     111        ret = hc_init_memory(instance);
     112        CHECK_RET_RETURN(ret, "Failed to create OHCI memory structures:%s.\n",
     113            ret, str_error(ret));
     114        hc_init_hw(instance);
    112115
    113116        rh_init(&instance->rh, dev, instance->registers);
    114 
    115         hc_init_memory(instance);
    116         hc_init_hw(instance);
    117117
    118118        if (!interrupts) {
     
    122122        }
    123123
    124         /* TODO: implement */
    125124        return EOK;
    126125}
     
    141140        switch (batch->transfer_type) {
    142141        case USB_TRANSFER_CONTROL:
     142                instance->registers->control &= ~C_CLE;
    143143                instance->registers->command_status |= CS_CLF;
     144                usb_log_debug2("Set control transfer filled: %x.\n",
     145                        instance->registers->command_status);
     146                instance->registers->control |= C_CLE;
    144147                break;
    145148        case USB_TRANSFER_BULK:
    146149                instance->registers->command_status |= CS_BLF;
     150                usb_log_debug2("Set bulk transfer filled: %x.\n",
     151                        instance->registers->command_status);
    147152                break;
    148153        default:
     
    161166
    162167        usb_log_info("OHCI interrupt: %x.\n", status);
     168
    163169
    164170        LIST_INITIALIZE(done);
     
    328334{
    329335        assert(instance);
    330         /* init queues */
     336        /* Init queues */
    331337        hc_init_transfer_lists(instance);
    332338
    333         /* init HCCA */
     339        /*Init HCCA */
    334340        instance->hcca = malloc32(sizeof(hcca_t));
    335341        if (instance->hcca == NULL)
     
    337343        bzero(instance->hcca, sizeof(hcca_t));
    338344        instance->registers->hcca = addr_to_phys(instance->hcca);
    339 
    340         /* use queues */
     345        usb_log_debug2("OHCI HCCA initialized at %p(%p).\n",
     346            instance->hcca, instance->registers->hcca);
     347
     348        /* Use queues */
    341349        instance->registers->bulk_head = instance->transfers_bulk.list_head_pa;
     350        usb_log_debug2("Bulk HEAD set to: %p(%p).\n",
     351            instance->transfers_bulk.list_head,
     352            instance->transfers_bulk.list_head_pa);
     353
    342354        instance->registers->control_head =
    343355            instance->transfers_control.list_head_pa;
     356        usb_log_debug2("Control HEAD set to: %p(%p).\n",
     357            instance->transfers_control.list_head,
     358            instance->transfers_control.list_head_pa);
    344359
    345360        unsigned i = 0;
     
    348363                    instance->transfers_interrupt.list_head_pa;
    349364        }
     365        usb_log_debug2("Interrupt HEADs set to: %p(%p).\n",
     366            instance->transfers_interrupt.list_head,
     367            instance->transfers_interrupt.list_head_pa);
    350368
    351369        return EOK;
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.c

    rff0e354 r8790650  
    4242        bzero(instance, sizeof(ed_t));
    4343        if (ep == NULL) {
    44                 instance->status |= ED_STATUS_K_FLAG;
     44                instance->status = ED_STATUS_K_FLAG;
    4545                return;
    4646        }
  • uspace/drv/ohci/transfer_list.c

    rff0e354 r8790650  
    122122        usb_transfer_batch_t *first = list_get_instance(
    123123            instance->batch_list.next, usb_transfer_batch_t, link);
    124         usb_log_debug("Batch(%p) added to queue %s, first is %p.\n",
    125                 batch, instance->name, first);
     124        usb_log_debug("Batch(%p) added to list %s, first is %p(%p).\n",
     125                batch, instance->name, first, batch_ed(first));
     126        if (last_ed == instance->list_head) {
     127                usb_log_debug2("%s head ED: %x:%x:%x:%x.\n", instance->name,
     128                        last_ed->status, last_ed->td_tail, last_ed->td_head,
     129                        last_ed->next);
     130        }
    126131        fibril_mutex_unlock(&instance->guard);
    127132}
Note: See TracChangeset for help on using the changeset viewer.