Files
cubelinux-kernel/arch/um/drivers/virt-pci.h
T
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

42 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __UM_VIRT_PCI_H
#define __UM_VIRT_PCI_H
#include <linux/pci.h>
struct um_pci_device {
const struct um_pci_ops *ops;
/* for now just standard BARs */
u8 resptr[PCI_STD_NUM_BARS];
int irq;
};
struct um_pci_ops {
unsigned long (*cfgspace_read)(struct um_pci_device *dev,
unsigned int offset, int size);
void (*cfgspace_write)(struct um_pci_device *dev, unsigned int offset,
int size, unsigned long val);
unsigned long (*bar_read)(struct um_pci_device *dev, int bar,
unsigned int offset, int size);
void (*bar_write)(struct um_pci_device *dev, int bar,
unsigned int offset, int size, unsigned long val);
void (*bar_copy_from)(struct um_pci_device *dev, int bar, void *buffer,
unsigned int offset, int size);
void (*bar_copy_to)(struct um_pci_device *dev, int bar,
unsigned int offset, const void *buffer, int size);
void (*bar_set)(struct um_pci_device *dev, int bar,
unsigned int offset, u8 value, int size);
};
int um_pci_device_register(struct um_pci_device *dev);
void um_pci_device_unregister(struct um_pci_device *dev);
int um_pci_platform_device_register(struct um_pci_device *dev);
void um_pci_platform_device_unregister(struct um_pci_device *dev);
#endif /* __UM_VIRT_PCI_H */