Changeset 679 for GPL/trunk/include/linux/pci.h
- Timestamp:
- Mar 18, 2021, 8:57:36 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-linux-3.2.102 (added) merged: 611-614 /GPL/branches/uniaud32-next (added) merged: 615-678
- Property svn:mergeinfo changed
-
GPL/trunk/include/linux/pci.h
r604 r679 16 16 #define LINUX_PCI_H 17 17 18 #include <linux/mod_devicetable.h> 19 18 20 #include <linux/types.h> 19 21 #include <linux/list.h> 22 #include <linux/kobject.h> 23 #include <linux/device.h> 24 #include <linux/pm.h> 25 #include <linux/io.h> 26 20 27 #pragma pack(1) //!!! by vladest 21 28 /* … … 302 309 #define pci_choose_state(pci,state) ((state) ? PCI_D3hot : PCI_D0) 303 310 304 typedef struct device { 305 struct pci_dev *pci; /* for PCI and PCI-SG types */ 306 struct device * parent; 307 struct bus_type * bus; /* type of bus device is on */ 308 char bus_id[BUS_ID_SIZE]; /* position on parent bus */ 309 void (*release)(struct device * dev); 310 unsigned int flags; /* GFP_XXX for continous and ISA types */ 311 #ifdef CONFIG_SBUS 312 struct sbus_dev *sbus; /* for SBUS type */ 313 #endif 314 void *private_data; 315 void *platform_data; 316 317 struct device_driver *driver; 318 struct pm_dev *pm_dev; 319 char bus_id[20]; 320 } device; 311 struct dev_pm_info2 { 312 unsigned int async_suspend:1; 313 bool is_prepared:1; /* Owned by the PM core */ 314 u32 power_state; 315 u8 * saved_state; 316 atomic_t pm_users; 317 struct device * pm_parent; 318 struct list_head entry; 319 }; 321 320 322 321 /* … … 334 333 struct proc_dir_entry *procent; /* device entry in /proc/bus/pci */ 335 334 336 struct device dev; 337 335 struct device dev; 336 unsigned int class; /* 3 bytes: (base,sub,prog-if) */ 337 u8 revision; /* PCI revision, low byte of class word */ 338 338 unsigned int devfn; /* encoded device & function index */ 339 339 unsigned short vendor; … … 341 341 unsigned short subsystem_vendor; 342 342 unsigned short subsystem_device; 343 unsigned int _class; /* 3 bytes: (base,sub,prog-if) */344 343 u8 hdr_type; /* PCI header type (`multi' flag masked out) */ 345 344 u8 rom_base_reg; /* Which config register controls the ROM */ … … 369 368 370 369 void *driver_data; 371 unsigned long dma_mask; 370 u64 dma_mask; /* Mask of the bits of bus address this 371 device implements. Normally this is 372 0xffffffff. You only need to change 373 this if your device has broken DMA 374 or supports 64-bit transfers. */ 375 unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */ 372 376 373 377 int (*prepare)(struct pci_dev *dev); … … 378 382 //DAZ unsigned int apicirq; 379 383 unsigned long hAdapter; 380 unsigned long hDevice;384 //AT unsigned long hDevice; 381 385 void *pcidriver; 382 386 #endif … … 579 583 unsigned long driver_data; 580 584 }; 581 #if 0 585 582 586 struct pci_driver { 583 struct list_head node; 584 char *name; 585 const struct pci_device_id *id_table; 586 int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); 587 void (*remove)(struct pci_dev *dev); 588 void (*suspend)(struct pci_dev *dev, u32 state); 589 void (*resume)(struct pci_dev *dev); 587 struct list_head node; 588 struct pci_dev *dev; 589 char *name; 590 const struct pci_device_id *id_table; /* NULL if wants all devices */ 591 int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ 592 void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ 593 int (*suspend)(struct pci_dev *dev, u32 stgate); /* Device suspended */ 594 int (*resume)(struct pci_dev *dev); /* Device woken up */ 595 void (*shutdown) (struct pci_dev *dev); 596 struct device_driver driver; 590 597 }; 591 #else592 struct pci_driver {593 struct list_head node;594 struct pci_dev *dev;595 char *name;596 const struct pci_device_id *id_table; /* NULL if wants all devices */597 int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */598 void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */599 int (*suspend)(struct pci_dev *dev, u32 stgate); /* Device suspended */600 int (*resume)(struct pci_dev *dev); /* Device woken up */601 };602 #endif603 598 604 599 /* … … 651 646 * 652 647 */ 653 const struct pci_device_id *pci_match_ device(const struct pci_device_id *ids, struct pci_dev *dev);648 const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); 654 649 unsigned long pci_get_size (struct pci_dev *dev, int n_base); 655 650 … … 686 681 #define pci_get_device pci_find_device 687 682 #define pci_dev_put(x) 683 684 #define to_pci_dev(n) container_of(n, struct pci_dev, dev) 688 685 689 686 #pragma pack() //!!! by vladest … … 728 725 const struct pci_device_id _table[] __devinitdata 729 726 727 /** 728 * module_pci_driver() - Helper macro for registering a PCI driver 729 * @__pci_driver: pci_driver struct 730 * 731 * Helper macro for PCI drivers which do not do anything special in module 732 * init/exit. This eliminates a lot of boilerplate. Each module may only 733 * use this macro once, and calling it replaces module_init() and module_exit() 734 */ 735 #define module_pci_driver(__pci_driver) \ 736 module_driver(__pci_driver, pci_register_driver, \ 737 pci_unregister_driver) 738 739 static inline bool pci_dev_run_wake(struct pci_dev *dev) { return 0; } 740 741 /* If you want to know what to call your pci_dev, ask this function. 742 * Again, it's a wrapper around the generic device. 743 */ 744 static inline const char *pci_name(struct pci_dev *pdev) 745 { 746 return dev_name(&pdev->dev); 747 } 748 749 /** 750 * PCI_DEVICE_SUB - macro used to describe a specific pci device with subsystem 751 * @vend: the 16 bit PCI Vendor ID 752 * @dev: the 16 bit PCI Device ID 753 * @subvend: the 16 bit PCI Subvendor ID 754 * @subdev: the 16 bit PCI Subdevice ID 755 * 756 * This macro is used to create a struct pci_device_id that matches a 757 * specific device with subsystem information. 758 */ 759 #define PCI_DEVICE_SUB(vend, dev, subvend, subdev) \ 760 .vendor = (vend), .device = (dev), \ 761 .subvendor = (subvend), .subdevice = (subdev) 762 763 int pci_status_get_and_clear_errors(struct pci_dev *pdev); 764 #define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \ 765 PCI_STATUS_SIG_SYSTEM_ERROR | \ 766 PCI_STATUS_REC_MASTER_ABORT | \ 767 PCI_STATUS_REC_TARGET_ABORT | \ 768 PCI_STATUS_SIG_TARGET_ABORT | \ 769 PCI_STATUS_PARITY) 770 730 771 #endif /* LINUX_PCI_H */
Note:
See TracChangeset
for help on using the changeset viewer.