Changeset 33fbe95 in mainline
- Timestamp:
- 2011-03-21T22:46:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 62ed5bc
- Parents:
- c01cd32
- Location:
- uspace/drv/uhci-hcd
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/Makefile
rc01cd32 r33fbe95 38 38 uhci.c \ 39 39 hc.c \ 40 uhci_rh.c \40 root_hub.c \ 41 41 uhci_struct/transfer_descriptor.c \ 42 42 pci.c \ -
uspace/drv/uhci-hcd/root_hub.c
rc01cd32 r33fbe95 39 39 #include <usb/debug.h> 40 40 41 #include " uhci_rh.h"41 #include "root_hub.h" 42 42 43 43 /** Root hub initialization … … 48 48 * @return Error code. 49 49 */ 50 int uhci_rh_init(51 uhci_rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size)50 int rh_init( 51 rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size) 52 52 { 53 53 assert(fun); -
uspace/drv/uhci-hcd/root_hub.h
rc01cd32 r33fbe95 39 39 #include <ops/hw_res.h> 40 40 41 typedef struct uhci_rh {41 typedef struct rh { 42 42 hw_resource_list_t resource_list; 43 43 hw_resource_t io_regs; 44 } uhci_rh_t;44 } rh_t; 45 45 46 int uhci_rh_init(47 uhci_rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size);46 int rh_init( 47 rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size); 48 48 49 49 #endif -
uspace/drv/uhci-hcd/uhci.c
rc01cd32 r33fbe95 120 120 { 121 121 assert(fun); 122 return &(( uhci_rh_t*)fun->driver_data)->resource_list;122 return &((rh_t*)fun->driver_data)->resource_list; 123 123 } 124 124 /*----------------------------------------------------------------------------*/ … … 128 128 }; 129 129 /*----------------------------------------------------------------------------*/ 130 static ddf_dev_ops_t uhci_rh_ops = {130 static ddf_dev_ops_t rh_ops = { 131 131 .interfaces[USB_DEV_IFACE] = &usb_iface, 132 132 .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface … … 223 223 "Failed(%d) to create root hub function.\n", ret); 224 224 225 ret = uhci_rh_init(&instance->rh, instance->rh_fun,225 ret = rh_init(&instance->rh, instance->rh_fun, 226 226 (uintptr_t)instance->hc.registers + 0x10, 4); 227 227 CHECK_RET_FINI_RETURN(ret, 228 228 "Failed(%d) to setup UHCI root hub.\n", ret); 229 229 230 instance->rh_fun->ops = & uhci_rh_ops;230 instance->rh_fun->ops = &rh_ops; 231 231 instance->rh_fun->driver_data = &instance->rh; 232 232 ret = ddf_fun_bind(instance->rh_fun); -
uspace/drv/uhci-hcd/uhci.h
rc01cd32 r33fbe95 39 39 40 40 #include "hc.h" 41 #include " uhci_rh.h"41 #include "root_hub.h" 42 42 43 43 typedef struct uhci { … … 46 46 47 47 hc_t hc; 48 uhci_rh_t rh;48 rh_t rh; 49 49 } uhci_t; 50 50
Note:
See TracChangeset
for help on using the changeset viewer.