mirror of https://github.com/Qortal/Brooklyn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
798 B
31 lines
798 B
/* SPDX-License-Identifier: GPL-2.0 */ |
|
/* |
|
* Copyright IBM Corp. 2020 |
|
* |
|
* Author(s): |
|
* Pierre Morel <[email protected]> |
|
* |
|
*/ |
|
|
|
int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops); |
|
void zpci_bus_device_unregister(struct zpci_dev *zdev); |
|
|
|
void zpci_release_device(struct kref *kref); |
|
static inline void zpci_zdev_put(struct zpci_dev *zdev) |
|
{ |
|
kref_put(&zdev->kref, zpci_release_device); |
|
} |
|
|
|
int zpci_alloc_domain(int domain); |
|
void zpci_free_domain(int domain); |
|
int zpci_setup_bus_resources(struct zpci_dev *zdev, |
|
struct list_head *resources); |
|
|
|
static inline struct zpci_dev *get_zdev_by_bus(struct pci_bus *bus, |
|
unsigned int devfn) |
|
{ |
|
struct zpci_bus *zbus = bus->sysdata; |
|
|
|
return (devfn >= ZPCI_FUNCTIONS_PER_BUS) ? NULL : zbus->function[devfn]; |
|
} |
|
|
|
|