Changeset 9d9ffdd in mainline for uspace/lib/drv/include/pci_dev_iface.h
- Timestamp:
- 2011-03-11T15:42:43Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0bd4810c
- Parents:
- 60a228f (diff), a8def7d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/pci_dev_iface.h
r60a228f r9d9ffdd 1 1 /* 2 * Copyright (c) 201 0 Vojtech Horky2 * Copyright (c) 2011 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libusb 29 /** @addtogroup libdrv 30 * @addtogroup usb 30 31 * @{ 31 32 */ 32 33 /** @file 33 * @brief Common definitions for both HC driver and hub driver.34 * @brief PCI device interface definition. 34 35 */ 35 #ifndef LIBUSB_HCDHUBD_PRIVATE_H_36 #define LIBUSB_HCDHUBD_PRIVATE_H_37 36 38 # define USB_HUB_DEVICE_NAME "usbhub"39 #define USB_KBD_DEVICE_NAME "hid"37 #ifndef LIBDRV_PCI_DEV_IFACE_H_ 38 #define LIBDRV_PCI_DEV_IFACE_H_ 40 39 41 extern link_t hc_list; 42 extern usb_hc_driver_t *hc_driver; 40 #include "ddf/driver.h" 43 41 44 extern usbhc_iface_t usbhc_interface; 42 typedef enum { 43 IPC_M_CONFIG_SPACE_READ_8, 44 IPC_M_CONFIG_SPACE_READ_16, 45 IPC_M_CONFIG_SPACE_READ_32, 45 46 46 usb_address_t usb_get_address_by_handle(devman_handle_t); 47 int usb_add_hc_device(device_t *); 47 IPC_M_CONFIG_SPACE_WRITE_8, 48 IPC_M_CONFIG_SPACE_WRITE_16, 49 IPC_M_CONFIG_SPACE_WRITE_32 50 } pci_dev_iface_funcs_t; 48 51 49 /** lowest allowed usb address */ 50 extern int usb_lowest_address; 52 /** PCI device communication interface. */ 53 typedef struct { 54 int (*config_space_read_8)(ddf_fun_t *, uint32_t address, uint8_t *data); 55 int (*config_space_read_16)(ddf_fun_t *, uint32_t address, uint16_t *data); 56 int (*config_space_read_32)(ddf_fun_t *, uint32_t address, uint32_t *data); 51 57 52 /** highest allowed usb address */ 53 extern int usb_highest_address; 54 55 /** 56 * @brief initialize address list of given hcd 57 * 58 * This function should be used only for hcd initialization. 59 * It creates interval list of free addresses, thus it is initialized as 60 * list with one interval with whole address space. Using an address shrinks 61 * the interval, freeing an address extends an interval or creates a 62 * new one. 63 * 64 * @param hcd 65 * @return 66 */ 67 void usb_create_address_list(usb_hc_device_t * hcd); 68 69 70 71 58 int (*config_space_write_8)(ddf_fun_t *, uint32_t address, uint8_t data); 59 int (*config_space_write_16)(ddf_fun_t *, uint32_t address, uint16_t data); 60 int (*config_space_write_32)(ddf_fun_t *, uint32_t address, uint32_t data); 61 } pci_dev_iface_t; 72 62 73 63 … … 76 66 * @} 77 67 */ 68
Note:
See TracChangeset
for help on using the changeset viewer.