Changeset 5cbccd4 in mainline for uspace/drv/bus/usb/xhci
- Timestamp:
- 2017-06-15T17:26:44Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 48197c1
- Parents:
- f4eb6c93
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/Makefile
rf4eb6c93 r5cbccd4 30 30 31 31 LIBS = \ 32 $(LIBUSBHOST_PREFIX)/libusbhost.a \ 32 33 $(LIBUSB_PREFIX)/libusb.a \ 33 34 $(LIBDRV_PREFIX)/libdrv.a … … 35 36 EXTRA_CFLAGS += \ 36 37 -I$(LIBUSB_PREFIX)/include \ 38 -I$(LIBUSBHOST_PREFIX)/include \ 37 39 -I$(LIBDRV_PREFIX)/include 38 40 … … 40 42 41 43 SOURCES = \ 44 hc.c \ 45 debug.c \ 42 46 trb_ring.c \ 43 47 main.c -
uspace/drv/bus/usb/xhci/hw_struct/context.h
rf4eb6c93 r5cbccd4 67 67 #define XHCI_EP_TR_DPTR(ctx) XHCI_DWORD_EXTRACT((ctx).data[2], 63, 4) 68 68 69 } ep_ctx_t ;69 } ep_ctx_t __attribute__((packed)); 70 70 71 71 /** … … 93 93 #define XHCI_SLOT_SLOT_STATE(ctx) XHCI_DWORD_EXTRACT((ctx).data[3], 31, 27) 94 94 95 } xhci_slot_ctx_t ;95 } xhci_slot_ctx_t __attribute__((packed)); 96 96 97 97 /** … … 108 108 typedef struct xhci_stream_ctx { 109 109 uint64_t data [2]; 110 } xhci_stream_ctx_t ;110 } xhci_stream_ctx_t __attribute__((packed)); 111 111 112 112 #endif -
uspace/drv/bus/usb/xhci/main.c
rf4eb6c93 r5cbccd4 39 39 #include <io/logctl.h> 40 40 #include <usb/debug.h> 41 #include <usb/host/ddf_helpers.h> 42 43 #include "hc.h" 41 44 42 45 #define NAME "xhci" 43 46 47 static int xhci_driver_init(hcd_t *, const hw_res_list_parsed_t *, bool); 48 static void xhci_driver_fini(hcd_t *); 49 50 static const ddf_hc_driver_t xhci_ddf_hc_driver = { 51 .hc_speed = USB_SPEED_SUPER, 52 .irq_code_gen = xhci_hc_gen_irq_code, 53 .init = xhci_driver_init, 54 .fini = xhci_driver_fini, 55 .name = "XHCI-PCI", 56 .ops = { 57 .schedule = xhci_hc_schedule, 58 .irq_hook = xhci_hc_interrupt, 59 .status_hook = xhci_hc_status, 60 } 61 }; 62 63 static int xhci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq) 64 { 65 usb_log_info("Initializing"); 66 return ENOTSUP; 67 } 68 69 static void xhci_driver_fini(hcd_t *hcd) 70 { 71 usb_log_info("Finishing"); 72 assert(hcd); 73 } 44 74 45 75 /** Initializes a new ddf driver instance of XHCI hcd. … … 50 80 static int xhci_dev_add(ddf_dev_t *device) 51 81 { 52 usb_log_info(" Requested to adddevice %s", ddf_dev_get_name(device));53 return ENOTSUP;82 usb_log_info("Adding device %s", ddf_dev_get_name(device)); 83 return hcd_ddf_add_hc(device, &xhci_ddf_hc_driver); 54 84 } 55 85 … … 76 106 { 77 107 log_init(NAME); 78 logctl_set_log_level(NAME, LVL_DEBUG );108 logctl_set_log_level(NAME, LVL_DEBUG2); 79 109 return ddf_driver_main(&xhci_driver); 80 110 }
Note:
See TracChangeset
for help on using the changeset viewer.
