[ARM] 5365/1: s3cmci: Use new include path of dma.h
[linux-ginger.git] / include / linux / i7300_idle.h
blob05a80c44513cc665f2fa13abe8dc769b3ebc5efd
2 #ifndef I7300_IDLE_H
3 #define I7300_IDLE_H
5 #include <linux/pci.h>
7 /*
8 * I/O AT controls (PCI bus 0 device 8 function 0)
9 * DIMM controls (PCI bus 0 device 16 function 1)
11 #define IOAT_BUS 0
12 #define IOAT_DEVFN PCI_DEVFN(8, 0)
13 #define MEMCTL_BUS 0
14 #define MEMCTL_DEVFN PCI_DEVFN(16, 1)
16 struct fbd_ioat {
17 unsigned int vendor;
18 unsigned int ioat_dev;
22 * The i5000 chip-set has the same hooks as the i7300
23 * but support is disabled by default because this driver
24 * has not been validated on that platform.
26 #define SUPPORT_I5000 0
28 static const struct fbd_ioat fbd_ioat_list[] = {
29 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB},
30 #if SUPPORT_I5000
31 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT},
32 #endif
33 {0, 0}
36 /* table of devices that work with this driver */
37 static const struct pci_device_id pci_tbl[] = {
38 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) },
39 #if SUPPORT_I5000
40 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
41 #endif
42 { } /* Terminating entry */
45 /* Check for known platforms with I/O-AT */
46 static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
47 struct pci_dev **ioat_dev)
49 int i;
50 struct pci_dev *memdev, *dmadev;
52 memdev = pci_get_bus_and_slot(MEMCTL_BUS, MEMCTL_DEVFN);
53 if (!memdev)
54 return -ENODEV;
56 for (i = 0; pci_tbl[i].vendor != 0; i++) {
57 if (memdev->vendor == pci_tbl[i].vendor &&
58 memdev->device == pci_tbl[i].device) {
59 break;
62 if (pci_tbl[i].vendor == 0)
63 return -ENODEV;
65 dmadev = pci_get_bus_and_slot(IOAT_BUS, IOAT_DEVFN);
66 if (!dmadev)
67 return -ENODEV;
69 for (i = 0; fbd_ioat_list[i].vendor != 0; i++) {
70 if (dmadev->vendor == fbd_ioat_list[i].vendor &&
71 dmadev->device == fbd_ioat_list[i].ioat_dev) {
72 if (fbd_dev)
73 *fbd_dev = memdev;
74 if (ioat_dev)
75 *ioat_dev = dmadev;
77 return 0;
80 return -ENODEV;
83 #endif