Rev 168 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
63 | pj | 1 | /* OIO!!! I just have PCI!!! */ |
2 | |||
3 | #ifndef __PCI__ |
||
4 | #define __PCI__ |
||
5 | |||
6 | #include <kernel/kern.h> |
||
7 | #include <drivers/pci.h> |
||
204 | pj | 8 | #include <drivers/linuxpci.h> |
63 | pj | 9 | #include <linux/compatib.h> |
10 | |||
11 | #if 0 |
||
12 | #define PCI_COMMAND 0x04 /* 16 bits */ |
||
13 | #define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ |
||
14 | |||
15 | #define PCI_LATENCY_TIMER 0x0d /* 8 bits */ |
||
16 | |||
17 | #define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ |
||
18 | |||
19 | #define PCI_INTERRUPT_LINE 0x3c /* 8 bits */ |
||
20 | #endif |
||
21 | |||
168 | giacomo | 22 | #define IORESOURCE_IO 1 |
23 | #define pci_resource_start(dev,bar) \ |
||
24 | (((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_SPACE) ? \ |
||
25 | ((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_IO_MASK) : \ |
||
26 | ((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_MEM_MASK)) |
||
27 | #define pci_resource_flags(dev, i) (dev->base_address[i] & IORESOURCE_IO) |
||
28 | |||
63 | pj | 29 | #endif /* PCI_H */ |
30 |