Changeset 89e54124 in mainline
- Timestamp:
- 2012-03-15T12:03:13Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 698cb1cc
- Parents:
- 145d16f8
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/Makefile
r145d16f8 r89e54124 50 50 ohci_batch.c \ 51 51 ohci_endpoint.c \ 52 pci.c \52 res.c \ 53 53 root_hub.c \ 54 54 hw_struct/endpoint_descriptor.c \ -
uspace/drv/bus/usb/ohci/ohci.c
r145d16f8 r89e54124 42 42 43 43 #include "ohci.h" 44 #include " pci.h"44 #include "res.h" 45 45 #include "hc.h" 46 46 … … 180 180 int irq = 0; 181 181 182 ret = pci_get_my_registers(device, ®_base, ®_size, &irq);182 ret = get_my_registers(device, ®_base, ®_size, &irq); 183 183 CHECK_RET_DEST_FREE_RETURN(ret, 184 184 "Failed to get register memory addresses for %" PRIun ": %s.\n", … … 211 211 /* Try to enable interrupts */ 212 212 bool interrupts = false; 213 ret = pci_enable_interrupts(device);213 ret = enable_interrupts(device); 214 214 if (ret != EOK) { 215 215 usb_log_warning("Failed to enable interrupts: %s." -
uspace/drv/bus/usb/ohci/res.c
r145d16f8 r89e54124 38 38 #include <errno.h> 39 39 #include <assert.h> 40 #include <as.h>41 40 #include <devman.h> 42 #include <ddi.h>43 #include <libarch/ddi.h>44 41 #include <device/hw_res_parsed.h> 45 42 46 43 #include <usb/debug.h> 47 #include <pci_dev_iface.h>48 44 49 #include " pci.h"45 #include "res.h" 50 46 51 47 /** Get address of registers and IRQ for given device. … … 57 53 * @return Error code. 58 54 */ 59 int pci_get_my_registers(ddf_dev_t *dev,55 int get_my_registers(const ddf_dev_t *dev, 60 56 uintptr_t *mem_reg_address, size_t *mem_reg_size, int *irq_no) 61 57 { … … 98 94 * @return Error code. 99 95 */ 100 int pci_enable_interrupts(ddf_dev_t *device)96 int enable_interrupts(const ddf_dev_t *device) 101 97 { 102 98 async_sess_t *parent_sess = … … 106 102 return ENOMEM; 107 103 108 bool enabled = hw_res_enable_interrupt(parent_sess);104 const bool enabled = hw_res_enable_interrupt(parent_sess); 109 105 async_hangup(parent_sess); 110 106 -
uspace/drv/bus/usb/ohci/res.h
r145d16f8 r89e54124 32 32 * PCI related functions needed by OHCI driver. 33 33 */ 34 #ifndef DRV_OHCI_ PCI_H35 #define DRV_OHCI_ PCI_H34 #ifndef DRV_OHCI_RES_H 35 #define DRV_OHCI_RES_H 36 36 37 37 #include <ddf/driver.h> 38 38 39 int pci_get_my_registers(ddf_dev_t *, uintptr_t *, size_t *, int *); 40 int pci_enable_interrupts(ddf_dev_t *); 41 int pci_disable_legacy(ddf_dev_t *); 39 int get_my_registers(const ddf_dev_t *, uintptr_t *, size_t *, int *); 40 int enable_interrupts(const ddf_dev_t *); 42 41 43 42 #endif
Note:
See TracChangeset
for help on using the changeset viewer.