Changeset f98b8269 in mainline


Ignore:
Timestamp:
2011-04-08T15:15:34Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b6e3ed3
Parents:
6bec59b
Message:

Port transfer_list from UHCI

Location:
uspace/drv/ohci
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/Makefile

    r6bec59b rf98b8269  
    3333
    3434SOURCES = \
     35        batch.c \
     36        hc.c \
    3537        iface.c \
    36         batch.c \
    3738        main.c \
    38         hc.c \
    3939        ohci.c \
     40        pci.c \
    4041        root_hub.c \
    41         pci.c
     42        transfer_list.c
     43
    4244
    4345include $(USPACE_PREFIX)/Makefile.common
  • uspace/drv/ohci/batch.c

    r6bec59b rf98b8269  
    9393}
    9494/*----------------------------------------------------------------------------*/
     95bool batch_is_complete(usb_transfer_batch_t *instance)
     96{
     97        // TODO: implement
     98        return false;
     99}
     100/*----------------------------------------------------------------------------*/
    95101void batch_control_write(usb_transfer_batch_t *instance)
    96102{
     
    151157}
    152158/*----------------------------------------------------------------------------*/
     159ed_t * batch_ed(usb_transfer_batch_t *instance)
     160{
     161        return NULL;
     162}
     163/*----------------------------------------------------------------------------*/
    153164/** Helper function calls callback and correctly disposes of batch structure.
    154165 *
  • uspace/drv/ohci/batch.h

    r6bec59b rf98b8269  
    4141#include <usb/host/batch.h>
    4242
     43#include "hw_struct/endpoint_descriptor.h"
    4344
    4445usb_transfer_batch_t * batch_get(
     
    6566void batch_bulk_out(usb_transfer_batch_t *instance);
    6667
     68ed_t * batch_ed(usb_transfer_batch_t *instance);
    6769#endif
    6870/**
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    r6bec59b rf98b8269  
    3535#define DRV_OHCI_HW_STRUCT_ENDPOINT_DESCRIPTOR_H
    3636
     37#include <assert.h>
    3738#include <stdint.h>
     39
     40#include "utils/malloc32.h"
    3841
    3942#include "completion_codes.h"
     
    7174#define ED_NEXT_PTR_SHIFT (0)
    7275} __attribute__((packed)) ed_t;
     76
     77static inline void ed_init_dummy(ed_t *instance)
     78{
     79        assert(instance);
     80        bzero(instance, sizeof(ed_t));
     81        instance->status |= ED_STATUS_K_FLAG;
     82}
     83
     84static inline void ed_append_ed(ed_t *instance, ed_t *next)
     85{
     86        assert(instance);
     87        assert(next);
     88        uint32_t pa = addr_to_phys(next);
     89        assert((pa & ED_NEXT_PTR_MASK) << ED_NEXT_PTR_SHIFT == pa);
     90        instance->next = pa;
     91}
     92
    7393#endif
    7494/**
Note: See TracChangeset for help on using the changeset viewer.