Changeset 68414f4a in mainline for uspace/drv/pciintel/pci.h
- Timestamp:
- 2011-02-13T20:03:45Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bab6388
- Parents:
- 8b1e15ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/pciintel/pci.h
r8b1e15ac r68414f4a 1 1 /* 2 2 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 45 46 46 47 typedef struct pci_fun_data { 48 function_t *fnode; 49 47 50 int bus; 48 51 int dev; … … 51 54 int device_id; 52 55 hw_resource_list_t hw_resources; 53 } pci_fun_ data_t;56 } pci_fun_t; 54 57 55 extern void create_pci_match_ids(function_t *); 58 typedef struct pciintel_bus { 59 /** DDF device node */ 60 device_t *dnode; 61 uint32_t conf_io_addr; 62 void *conf_data_port; 63 void *conf_addr_port; 64 fibril_mutex_t conf_mutex; 65 } pci_bus_t; 56 66 57 extern uint8_t pci_conf_read_8(function_t *, int); 58 extern uint16_t pci_conf_read_16(function_t *, int); 59 extern uint32_t pci_conf_read_32(function_t *, int); 60 extern void pci_conf_write_8(function_t *, int, uint8_t); 61 extern void pci_conf_write_16(function_t *, int, uint16_t); 62 extern void pci_conf_write_32(function_t *, int, uint32_t); 67 extern void pci_fun_create_match_ids(pci_fun_t *); 63 68 64 extern void pci_add_range(function_t *, uint64_t, size_t, bool); 65 extern int pci_read_bar(function_t *, int); 66 extern void pci_read_interrupt(function_t *); 67 extern void pci_add_interrupt(function_t *, int); 69 extern uint8_t pci_conf_read_8(pci_fun_t *, int); 70 extern uint16_t pci_conf_read_16(pci_fun_t *, int); 71 extern uint32_t pci_conf_read_32(pci_fun_t *, int); 72 extern void pci_conf_write_8(pci_fun_t *, int, uint8_t); 73 extern void pci_conf_write_16(pci_fun_t *, int, uint16_t); 74 extern void pci_conf_write_32(pci_fun_t *, int, uint32_t); 68 75 69 extern void pci_bus_scan(device_t *, int); 76 extern void pci_add_range(pci_fun_t *, uint64_t, size_t, bool); 77 extern int pci_read_bar(pci_fun_t *, int); 78 extern void pci_read_interrupt(pci_fun_t *); 79 extern void pci_add_interrupt(pci_fun_t *, int); 70 80 71 extern pci_fun_ data_t *create_pci_fun_data(void);72 extern void init_pci_fun_data(pci_fun_data_t *, int, int, int);73 extern void delete_pci_fun_data(pci_fun_data_t *);74 extern void create_pci_fun_name(function_t *);81 extern pci_fun_t *pci_fun_new(void); 82 extern void pci_fun_init(pci_fun_t *, int, int, int); 83 extern void pci_fun_delete(pci_fun_t *); 84 extern void pci_fun_create_name(pci_fun_t *); 75 85 76 extern bool pci_alloc_resource_list(function_t *); 77 extern void pci_clean_resource_list(function_t *); 86 extern void pci_bus_scan(pci_bus_t *, int); 78 87 79 extern void pci_read_bars(function_t *); 88 extern bool pci_alloc_resource_list(pci_fun_t *); 89 extern void pci_clean_resource_list(pci_fun_t *); 90 91 extern void pci_read_bars(pci_fun_t *); 80 92 extern size_t pci_bar_mask_to_size(uint32_t); 81 93
Note:
See TracChangeset
for help on using the changeset viewer.