Changeset 3b5d1535 in mainline for uspace/drv/pciintel/pci.h
- Timestamp:
- 2011-02-23T10:28:21Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb48f61
- Parents:
- e936e8e (diff), eb1a2f4 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/pciintel/pci.h
re936e8e r3b5d1535 1 1 /* 2 2 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 36 37 #define PCI_H_ 37 38 38 #include <stdlib.h> 39 #include <driver.h> 40 #include <malloc.h> 41 39 #include <ddf/driver.h> 42 40 #include "pci_regs.h" 43 41 44 42 #define PCI_MAX_HW_RES 8 45 43 46 typedef struct pci_dev_data { 44 typedef struct pciintel_bus { 45 /** DDF device node */ 46 ddf_dev_t *dnode; 47 uint32_t conf_io_addr; 48 void *conf_data_port; 49 void *conf_addr_port; 50 fibril_mutex_t conf_mutex; 51 } pci_bus_t; 52 53 typedef struct pci_fun_data { 54 pci_bus_t *busptr; 55 ddf_fun_t *fnode; 56 47 57 int bus; 48 58 int dev; … … 51 61 int device_id; 52 62 hw_resource_list_t hw_resources; 53 } pci_ dev_data_t;63 } pci_fun_t; 54 64 55 extern void create_pci_match_ids(device_t *);65 extern void pci_fun_create_match_ids(pci_fun_t *); 56 66 57 extern uint8_t pci_conf_read_8( device_t *, int);58 extern uint16_t pci_conf_read_16( device_t *, int);59 extern uint32_t pci_conf_read_32( device_t *, int);60 extern void pci_conf_write_8( device_t *, int, uint8_t);61 extern void pci_conf_write_16( device_t *, int, uint16_t);62 extern void pci_conf_write_32( device_t *, int, uint32_t);67 extern uint8_t pci_conf_read_8(pci_fun_t *, int); 68 extern uint16_t pci_conf_read_16(pci_fun_t *, int); 69 extern uint32_t pci_conf_read_32(pci_fun_t *, int); 70 extern void pci_conf_write_8(pci_fun_t *, int, uint8_t); 71 extern void pci_conf_write_16(pci_fun_t *, int, uint16_t); 72 extern void pci_conf_write_32(pci_fun_t *, int, uint32_t); 63 73 64 extern void pci_add_range( device_t *, uint64_t, size_t, bool);65 extern int pci_read_bar( device_t *, int);66 extern void pci_read_interrupt( device_t *);67 extern void pci_add_interrupt( device_t *, int);74 extern void pci_add_range(pci_fun_t *, uint64_t, size_t, bool); 75 extern int pci_read_bar(pci_fun_t *, int); 76 extern void pci_read_interrupt(pci_fun_t *); 77 extern void pci_add_interrupt(pci_fun_t *, int); 68 78 69 extern void pci_bus_scan(device_t *, int); 79 extern pci_fun_t *pci_fun_new(pci_bus_t *); 80 extern void pci_fun_init(pci_fun_t *, int, int, int); 81 extern void pci_fun_delete(pci_fun_t *); 82 extern char *pci_fun_create_name(pci_fun_t *); 70 83 71 extern pci_dev_data_t *create_pci_dev_data(void); 72 extern void init_pci_dev_data(pci_dev_data_t *, int, int, int); 73 extern void delete_pci_dev_data(pci_dev_data_t *); 74 extern void create_pci_dev_name(device_t *); 84 extern void pci_bus_scan(pci_bus_t *, int); 75 85 76 extern bool pci_alloc_resource_list( device_t *);77 extern void pci_clean_resource_list( device_t *);86 extern bool pci_alloc_resource_list(pci_fun_t *); 87 extern void pci_clean_resource_list(pci_fun_t *); 78 88 79 extern void pci_read_bars( device_t *);89 extern void pci_read_bars(pci_fun_t *); 80 90 extern size_t pci_bar_mask_to_size(uint32_t); 81 91
Note:
See TracChangeset
for help on using the changeset viewer.