Lines Matching refs:bus
48 #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn))
49 /* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */
54 struct pci_bus *bus; /* The bus this slot is on */
55 struct list_head list; /* node in list of slots on this bus */
66 /* File state for mmap()s on /proc/bus/pci/X/Y */
133 * the pci device. If some PCI bus between here and the pci device
252 struct list_head bus_list; /* node in per-bus list */
253 struct pci_bus *bus; /* bus this device is on */
254 struct pci_bus *subordinate; /* bus this device bridges to */
257 struct proc_dir_entry *procent; /* device entry in /proc/bus/pci */
278 u64 dma_mask; /* Mask of the bits of bus address this
387 struct pci_dev *pci_alloc_dev(struct pci_bus *bus);
400 resource_size_t offset; /* bus address + offset = CPU address */
405 struct pci_bus *bus; /* root bus */
419 * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
443 struct pci_bus *parent; /* parent bus this bridge is on */
445 struct list_head devices; /* list of devices on this bus */
447 struct list_head slots; /* list of slots on this bus */
449 struct list_head resources; /* address space routed to this bus */
450 struct resource busn_res; /* bus numbers routed to this bus */
455 struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */
457 unsigned char number; /* bus number */
471 struct bin_attribute *legacy_io; /* legacy I/O for this bus */
479 * Returns true if the PCI bus is root (behind host-PCI bridge),
482 * Some code assumes that "bus->self == NULL" means that bus is a root bus.
484 * virtfn_add_bus()) have "bus->self == NULL" but are not root buses.
507 if (pci_is_root_bus(dev->bus))
510 return dev->bus->self;
562 int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val);
563 int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val);
568 * PCI bus scan and created pci_bus structures.
570 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
572 int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
589 * will be notified of PCI bus errors, and will be driven to recovery
615 /* PCI bus error event callbacks */
617 /* PCI bus error detected on this device */
726 void pcie_bus_configure_settings(struct pci_bus *bus);
745 void pcibios_resource_survey_bus(struct pci_bus *bus);
746 void pcibios_add_bus(struct pci_bus *bus);
747 void pcibios_remove_bus(struct pci_bus *bus);
764 void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region,
766 void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res,
770 void pci_bus_add_devices(const struct pci_bus *bus);
771 struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,
773 struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
774 struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
777 int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax);
780 struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
785 void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
790 int pci_scan_slot(struct pci_bus *bus, int devfn);
791 struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
792 void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
793 unsigned int pci_scan_child_bus(struct pci_bus *bus);
806 void pci_stop_root_bus(struct pci_bus *bus);
807 void pci_remove_root_bus(struct pci_bus *bus);
808 void pci_setup_cardbus(struct pci_bus *bus);
810 #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
836 struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
837 struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus,
839 static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
842 return pci_get_domain_bus_and_slot(0, bus, devfn);
847 int pci_bus_read_config_byte(struct pci_bus *bus, unsigned int devfn,
849 int pci_bus_read_config_word(struct pci_bus *bus, unsigned int devfn,
851 int pci_bus_read_config_dword(struct pci_bus *bus, unsigned int devfn,
853 int pci_bus_write_config_byte(struct pci_bus *bus, unsigned int devfn,
855 int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn,
857 int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn,
859 struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
863 return pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
867 return pci_bus_read_config_word(dev->bus, dev->devfn, where, val);
872 return pci_bus_read_config_dword(dev->bus, dev->devfn, where, val);
876 return pci_bus_write_config_byte(dev->bus, dev->devfn, where, val);
880 return pci_bus_write_config_word(dev->bus, dev->devfn, where, val);
885 return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val);
983 int pci_probe_reset_bus(struct pci_bus *bus);
984 int pci_reset_bus(struct pci_bus *bus);
985 int pci_try_reset_bus(struct pci_bus *bus);
1027 void pci_pme_wakeup_bus(struct pci_bus *bus);
1050 int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap);
1052 unsigned int pci_rescan_bus(struct pci_bus *bus);
1060 /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
1062 void pci_bus_assign_resources(const struct pci_bus *bus);
1063 void pci_bus_size_bridges(struct pci_bus *bus);
1067 void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
1068 void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus);
1084 /* drivers/pci/bus.c */
1085 struct pci_bus *pci_bus_get(struct pci_bus *bus);
1086 void pci_bus_put(struct pci_bus *bus);
1091 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags);
1092 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
1093 void pci_bus_remove_resources(struct pci_bus *bus);
1095 #define pci_bus_for_each_resource(bus, res, i) \
1097 (res = pci_bus_resource_n(bus, i)) || i < PCI_BRIDGE_RESOURCE_NUM; \
1100 int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
1117 pcibios_resource_to_bus(pdev->bus, ®ion, &pdev->resource[bar]);
1153 int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
1159 unsigned char pci_bus_max_busnr(struct pci_bus *bus);
1160 void pci_setup_bridge(struct pci_bus *bus);
1161 resource_size_t pcibios_window_alignment(struct pci_bus *bus,
1301 static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
1302 static inline int pci_proc_domain(struct pci_bus *bus) { return 0; }
1312 static inline int pci_domain_nr(struct pci_bus *bus)
1314 return bus->domain_nr;
1316 void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent);
1318 static inline void pci_bus_assign_domain_nr(struct pci_bus *bus,
1423 static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,
1426 static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
1430 static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
1825 void pci_set_bus_of_node(struct pci_bus *bus);
1826 void pci_release_bus_of_node(struct pci_bus *bus);
1829 struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus);
1837 static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
1839 return bus ? bus->dev.of_node : NULL;
1845 static inline void pci_set_bus_of_node(struct pci_bus *bus) { }
1846 static inline void pci_release_bus_of_node(struct pci_bus *bus) { }