2
* Purpose: Definitions of various PCI specific constants and functions
4
* All drivers for PCI devices should included this file.
8
* This file is part of Open Sound System.
10
* Copyright (C) 4Front Technologies 1996-2008.
12
* This this source file is released under GPL v2 license (no other versions).
13
* See the COPYING file included in the main directory of this source
14
* distribution for the license terms and conditions.
20
#define PCIBIOS_SUCCESSFUL 0x00
21
#define PCIBIOS_FAILED -1
23
#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401
24
#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480
25
#define PCI_VENDOR_ID 0x00
26
#define PCI_REVISION_ID 0x08
27
#define PCI_COMMAND 0x04
28
#define PCI_DEVICE_ID 0x02
29
#define PCI_LATENCY_TIMER 0x0d
30
#define PCI_INTERRUPT_LINE 0x3c
31
#define PCI_BASE_ADDRESS_0 0x10
33
#define PCI_MEM_BASE_ADDRESS_0 0x10
34
#define PCI_MEM_BASE_ADDRESS_1 0x14
35
#define PCI_MEM_BASE_ADDRESS_2 0x18
36
#define PCI_MEM_BASE_ADDRESS_3 0x1c
37
#define PCI_BASE_ADDRESS_1 0x14
38
#define PCI_BASE_ADDRESS_2 0x18
39
#define PCI_BASE_ADDRESS_3 0x1c
40
#define PCI_BASE_ADDRESS_4 0x20
41
#define PCI_BASE_ADDRESS_5 0x24
42
#define PCI_COMMAND_IO 0x01
43
#define PCI_COMMAND_MEMORY 0x02
44
#define PCI_COMMAND_MASTER 0x04
45
#define PCI_COMMAND_PARITY 0x40
46
#define PCI_COMMAND_SERR 0x100
48
#define PCI_STATUS 0x06
49
#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
50
#define PCI_SUBSYSTEM_ID 0x2e
52
extern int pci_read_config_byte (oss_device_t * osdev, offset_t where,
54
extern int pci_read_config_irq (oss_device_t * osdev, offset_t where,
56
extern int pci_read_config_word (oss_device_t * osdev, offset_t where,
58
extern int pci_read_config_dword (oss_device_t * osdev, offset_t where,
60
extern int pci_write_config_byte (oss_device_t * osdev, offset_t where,
62
extern int pci_write_config_word (oss_device_t * osdev, offset_t where,
64
extern int pci_write_config_dword (oss_device_t * osdev, offset_t where,
66
extern int pci_enable_msi (oss_device_t * osdev);