From 6b076b355602ae5c0b23b37ded839d01c6b38b03 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Wed, 25 Jan 2006 17:56:54 +0000 Subject: [PATCH] added header file that was not included in r16086 commit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16089 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/bus_managers/pci/pci_controller.h | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/add-ons/kernel/bus_managers/pci/pci_controller.h diff --git a/src/add-ons/kernel/bus_managers/pci/pci_controller.h b/src/add-ons/kernel/bus_managers/pci/pci_controller.h new file mode 100644 index 0000000000..0c39c35106 --- /dev/null +++ b/src/add-ons/kernel/bus_managers/pci/pci_controller.h @@ -0,0 +1,47 @@ +/* + * Copyright 2006, Marcus Overhagen. All rights reserved. + * + * Distributed under the terms of the MIT License. + */ +#ifndef __PCI_CONTROLLER_H +#define __PCI_CONTROLLER_H + +#include + +typedef struct pci_controller +{ + // read PCI config space + status_t (*read_pci_config)(void *cookie, + uint8 bus, uint8 device, uint8 function, + uint8 offset, uint8 size, uint32 *value); + + // write PCI config space + status_t (*write_pci_config)(void *cookie, + uint8 bus, uint8 device, uint8 function, + uint8 offset, uint8 size, uint32 value); + + status_t (*get_max_bus_devices)(void *cookie, int32 *count); + + status_t (*read_pci_irq)(void *cookie, + uint8 bus, uint8 device, uint8 function, + uint8 pin, uint8 *irq); + + status_t (*write_pci_irq)(void *cookie, + uint8 bus, uint8 device, uint8 function, + uint8 pin, uint8 irq); + +} pci_controller; + + +#ifdef __cplusplus +extern "C" { +#endif + +status_t pci_controller_init(void); +status_t pci_controller_add(pci_controller *controller, void *cookie); + +#ifdef __cplusplus +} +#endif + +#endif