Changeset c95c00e in mainline
- Timestamp:
- 2013-01-06T02:46:00Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3848fec
- Parents:
- ea30cc1
- Location:
- uspace/drv/bus/usb/uhci
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/Makefile
rea30cc1 rc95c00e 31 31 LIBS = \ 32 32 $(LIBUSBHOST_PREFIX)/libusbhost.a \ 33 $(LIBUSBVIRT_PREFIX)/libusbvirt.a \ 33 34 $(LIBUSB_PREFIX)/libusb.a \ 34 35 $(LIBDRV_PREFIX)/libdrv.a … … 36 37 EXTRA_CFLAGS += \ 37 38 -I$(LIBUSB_PREFIX)/include \ 39 -I$(LIBUSBDEV_PREFIX)/include \ 38 40 -I$(LIBUSBHOST_PREFIX)/include \ 41 -I$(LIBUSBVIRT_PREFIX)/include \ 39 42 -I$(LIBDRV_PREFIX)/include 40 43 … … 49 52 uhci.c \ 50 53 uhci_batch.c \ 54 uhci_rh.c \ 51 55 hw_struct/transfer_descriptor.c 52 56 -
uspace/drv/bus/usb/uhci/hc.c
rea30cc1 rc95c00e 130 130 memcpy(cmds, uhci_irq_commands, sizeof(uhci_irq_commands)); 131 131 uhci_regs_t *registers = (uhci_regs_t *) regs; 132 cmds[0].addr = ®isters->usbsts;133 cmds[3].addr = ®isters->usbsts;132 cmds[0].addr = (void*)®isters->usbsts; 133 cmds[3].addr = (void*)®isters->usbsts; 134 134 135 135 return EOK; … … 242 242 } 243 243 (void)hc_debug_checker; 244 245 uhci_rh_init(&instance->rh, &instance->registers->ports[0]); 244 246 245 247 return EOK; … … 406 408 assert(instance); 407 409 assert(batch); 410 411 // if (batch->ep->address == uhci_rh_get_address(&instance->rh)) 412 // return uhci_rh_schedule(&instance->rh, batch); 413 408 414 uhci_transfer_batch_t *uhci_batch = uhci_transfer_batch_get(batch); 409 415 if (!uhci_batch) { -
uspace/drv/bus/usb/uhci/hc.h
rea30cc1 rc95c00e 37 37 38 38 #include <fibril.h> 39 #include <macros.h> 39 40 #include <usb/host/hcd.h> 41 #include "uhci_rh.h" 40 42 41 43 #include "transfer_list.h" … … 44 46 typedef struct uhci_regs { 45 47 /** Command register, controls HC behaviour */ 46 uint16_t usbcmd;48 ioport16_t usbcmd; 47 49 #define UHCI_CMD_MAX_PACKET (1 << 7) 48 50 #define UHCI_CMD_CONFIGURE (1 << 6) … … 55 57 56 58 /** Status register, 1 means interrupt is asserted (if enabled) */ 57 uint16_t usbsts;59 ioport16_t usbsts; 58 60 #define UHCI_STATUS_HALTED (1 << 5) 59 61 #define UHCI_STATUS_PROCESS_ERROR (1 << 4) … … 66 68 67 69 /** Interrupt enabled registers */ 68 uint16_t usbintr;70 ioport16_t usbintr; 69 71 #define UHCI_INTR_SHORT_PACKET (1 << 3) 70 72 #define UHCI_INTR_COMPLETE (1 << 2) … … 73 75 74 76 /** Register stores frame number used in SOF packet */ 75 uint16_t frnum;77 ioport16_t frnum; 76 78 77 79 /** Pointer(physical) to the Frame List */ 78 uint32_t flbaseadd;80 ioport32_t flbaseadd; 79 81 80 82 /** SOF modification to match external timers */ 81 uint8_t sofmod; 83 ioport8_t sofmod; 84 85 PADD8[3]; 86 ioport16_t ports[]; 82 87 } uhci_regs_t; 83 88 … … 90 95 /** Main UHCI driver structure */ 91 96 typedef struct hc { 97 uhci_rh_t rh; 92 98 /** Addresses of I/O registers */ 93 99 uhci_regs_t *registers; -
uspace/drv/bus/usb/uhci/uhci.c
rea30cc1 rc95c00e 161 161 ret = rh_init(device, (uintptr_t)hc->registers + 0x10, 4, 162 162 ddf_fun_get_handle(hc_fun)); 163 // ret = hcd_ddf_setup_root_hub(device, USB_SPEED_FULL); 163 164 CHECK_RET_FINI_RETURN(ret, 164 165 "Failed to setup UHCI root hub: %s.\n", str_error(ret));
Note:
See TracChangeset
for help on using the changeset viewer.