Subversion Repositories shark

Rev

Rev 168 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/* OIO!!! I just have PCI!!! */

#ifndef __PCI__
#define __PCI__

#include <kernel/kern.h>
#include <drivers/pci.h>
#include <drivers/linuxpci.h>
#include <linux/compatib.h>

#if 0
#define PCI_COMMAND             0x04    /* 16 bits */
#define  PCI_COMMAND_MASTER     0x4     /* Enable bus mastering */

#define PCI_LATENCY_TIMER       0x0d    /* 8 bits */

#define PCI_BASE_ADDRESS_0      0x10    /* 32 bits */

#define PCI_INTERRUPT_LINE      0x3c    /* 8 bits */
#endif

#define IORESOURCE_IO                   1
#define pci_resource_start(dev,bar) \
(((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_SPACE) ? \
 ((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_IO_MASK) : \
 ((dev)->base_address[(bar)] & PCI_BASE_ADDRESS_MEM_MASK))

#define pci_resource_flags(dev, i)      (dev->base_address[i] & IORESOURCE_IO)

#endif /* PCI_H */