Changeset e42dd32 in mainline for uspace/drv/ohci/hw_struct


Ignore:
Timestamp:
2011-04-08T23:28:52Z (15 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1be95c8
Parents:
b854e56
Message:

OCHI structures fixed, setup control transfer

Location:
uspace/drv/ohci/hw_struct
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    rb854e56 re42dd32  
    4141
    4242#include "utils/malloc32.h"
     43#include "transfer_descriptor.h"
    4344
    4445#include "completion_codes.h"
     
    4950#define ED_STATUS_FA_SHIFT (0)
    5051#define ED_STATUS_EN_MASK (0xf)    /* USB endpoint address */
    51 #define ED_STATUS_EN_SHIFT (6)
     52#define ED_STATUS_EN_SHIFT (7)
    5253#define ED_STATUS_D_MASK (0x3)     /* direction */
    53 #define ED_STATUS_D_SHIFT (10)
     54#define ED_STATUS_D_SHIFT (11)
    5455#define ED_STATUS_D_IN (0x1)
    5556#define ED_STATUS_D_OUT (0x2)
     
    8081void ed_init(ed_t *instance, endpoint_t *ep);
    8182
    82 static inline void ed_add_tds(ed_t *instance, uint32_t head, uint32_t tail)
     83static inline void ed_add_tds(ed_t *instance, td_t *head, td_t *tail)
    8384{
    8485        assert(instance);
    85         instance->td_head = head & ED_TDHEAD_PTR_MASK;
    86         instance->td_tail = tail & ED_TDTAIL_PTR_MASK;
     86        instance->td_head = addr_to_phys(head) & ED_TDHEAD_PTR_MASK;
     87        instance->td_tail = addr_to_phys(tail) & ED_TDTAIL_PTR_MASK;
    8788}
    8889
  • uspace/drv/ohci/hw_struct/transfer_descriptor.h

    rb854e56 re42dd32  
    3636
    3737#include <stdint.h>
     38#include "utils/malloc32.h"
    3839
    3940#include "completion_codes.h"
     
    5556#define TD_STATUS_T_MASK (0x3)  /* data toggle 1x = use ED toggle carry */
    5657#define TD_STATUS_T_SHIFT (24)
    57 #define TD_STATUS_T_0 (0x0)
    58 #define TD_STATUS_T_1 (0x1)
    59 #define TD_STATUS_T_USE_EP (0x1)
     58#define TD_STATUS_T_0 (0x2)
     59#define TD_STATUS_T_1 (0x3)
    6060#define TD_STATUS_EC_MASK (0x3) /* error count */
    6161#define TD_STATUS_EC_SHIFT (26)
     
    7474    td_t *instance, usb_direction_t dir, void *buffer, size_t size, int toggle);
    7575
    76 inline static void td_set_next(td_t *instance, uint32_t next)
     76inline static void td_set_next(td_t *instance, td_t *next)
    7777{
    7878        assert(instance);
    79         instance->next = next & TD_NEXT_PTR_MASK;
     79        instance->next = addr_to_phys(next) & TD_NEXT_PTR_MASK;
    8080}
    8181#endif
Note: See TracChangeset for help on using the changeset viewer.