Changeset 42dbb26 in mainline
- Timestamp:
- 2011-03-20T18:36:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7bc999
- Parents:
- b8e9acb
- Location:
- uspace/drv/ohci
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/ohci_hc.c
rb8e9acb r42dbb26 48 48 { 49 49 assert(instance); 50 ohci_rh_init(&instance->rh, regs, reg_size); 50 int ret = pio_enable((void*)regs, reg_size, (void**)&instance->registers); 51 if (ret != EOK) { 52 usb_log_error("Failed to gain access to device registers.\n"); 53 return ret; 54 } 55 56 ohci_rh_init(&instance->rh, instance->registers); 51 57 /* TODO: implement */ 52 58 /* TODO: register root hub */ -
uspace/drv/ohci/ohci_hc.h
rb8e9acb r42dbb26 45 45 46 46 #include "batch.h" 47 #include "ohci_regs.h" 47 48 #include "ohci_rh.h" 48 49 49 typedef struct ohci_regs {50 } regs_t;51 52 53 50 typedef struct ohci_hc { 51 ohci_regs_t *registers; 54 52 usb_address_t rh_address; 55 53 ohci_rh_t rh; -
uspace/drv/ohci/ohci_rh.c
rb8e9acb r42dbb26 35 35 #include <errno.h> 36 36 #include <str_error.h> 37 #include <stdio.h>38 37 39 38 #include <usb/debug.h> … … 42 41 43 42 /** Root hub initialization 44 * @param[in] instance RH structure to initialize45 * @param[in] fun DDF function representing UHCI root hub46 * @param[in] reg_addr Address of root hub status and control registers.47 * @param[in] reg_size Size of accessible address space.48 43 * @return Error code. 49 44 */ 50 int ohci_rh_init(ohci_rh_t *instance, uintptr_t reg_addr, size_t reg_size)45 int ohci_rh_init(ohci_rh_t *instance, ohci_regs_t *regs) 51 46 { 52 47 assert(instance); 53 48 instance->address = 0; 49 instance->registers = regs; 50 51 usb_log_info("OHCI root hub with %d ports.\n", regs->rh_desc_a & 0xff); 52 54 53 /* TODO: implement */ 55 54 return EOK; -
uspace/drv/ohci/ohci_rh.h
rb8e9acb r42dbb26 38 38 #include <usb/usb.h> 39 39 40 #include "ohci_regs.h" 40 41 #include "batch.h" 41 42 42 43 typedef struct ohci_rh { 44 ohci_regs_t *registers; 43 45 usb_address_t address; 44 46 } ohci_rh_t; 45 47 46 int ohci_rh_init(ohci_rh_t *instance, uintptr_t reg_addr, size_t reg_size);48 int ohci_rh_init(ohci_rh_t *instance, ohci_regs_t *regs); 47 49 48 50 void ohci_rh_request(ohci_rh_t *instance, batch_t *request);
Note:
See TracChangeset
for help on using the changeset viewer.