haiku/headers/os/drivers/bus/PCI.h
Axel Dörfler 368167ede8 * Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
  support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
  - legacy SATA and ISA IDE support is disabled, the drivers haven't been
    ported yet.
  - The not yet used ATA bus manager hasn't been ported yet, either.
  - AHCI changes have not been tested.
  - the listdev command has been removed from the build (as it currently
    doesn't work anymore).
  - device manager generated IDs currently are not freed anymore when a device
    node is removed.
  - generic drivers can't yet use the new driver architecture.
  - simple busses that do not support device types won't work yet.
  - legacy driver publishing/unpublishing (ie. what USB needs) has not been
    tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:52:27 +00:00

47 lines
1.4 KiB
C

/*
* Copyright 2008, Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PCI2_H
#define _PCI2_H
#include <device_manager.h>
#include <PCI.h>
typedef struct pci_device pci_device;
typedef struct pci_device_module_info {
driver_module_info info;
uint8 (*read_io_8)(pci_device *device, addr_t mappedIOAddress);
void (*write_io_8)(pci_device *device, addr_t mappedIOAddress,
uint8 value);
uint16 (*read_io_16)(pci_device *device, addr_t mappedIOAddress);
void (*write_io_16)(pci_device *device, addr_t mappedIOAddress,
uint16 value);
uint32 (*read_io_32)(pci_device *device, addr_t mappedIOAddress);
void (*write_io_32)(pci_device *device, addr_t mappedIOAddress,
uint32 value);
void *(*ram_address)(pci_device *device, const void *physicalAddress);
uint32 (*read_pci_config)(pci_device *device, uint8 offset,
uint8 size);
void (*write_pci_config)(pci_device *device, uint8 offset,
uint8 size, uint32 value);
status_t (*find_pci_capability)(pci_device *device, uint8 capID,
uint8 *offset);
void (*get_pci_info)(pci_device *device, struct pci_info *info);
} pci_device_module_info;
/* Attributes of PCI device nodes */
#define B_PCI_DEVICE_DOMAIN "pci/domain" /* uint32 */
#define B_PCI_DEVICE_BUS "pci/bus" /* uint8 */
#define B_PCI_DEVICE_DEVICE "pci/device" /* uint8 */
#define B_PCI_DEVICE_FUNCTION "pci/function" /* uint8 */
#endif /* _PCI2_H */