Blame view
include/linux/i7300_idle.h
1.91 KB
3ad0b02e4 i7300_idle: Disab... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#ifndef I7300_IDLE_H #define I7300_IDLE_H #include <linux/pci.h> /* * I/O AT controls (PCI bus 0 device 8 function 0) * DIMM controls (PCI bus 0 device 16 function 1) */ #define IOAT_BUS 0 #define IOAT_DEVFN PCI_DEVFN(8, 0) #define MEMCTL_BUS 0 #define MEMCTL_DEVFN PCI_DEVFN(16, 1) struct fbd_ioat { unsigned int vendor; unsigned int ioat_dev; |
2f102607a i7300_idle: allow... |
19 |
unsigned int enabled; |
3ad0b02e4 i7300_idle: Disab... |
20 21 22 23 |
}; /* * The i5000 chip-set has the same hooks as the i7300 |
2f102607a i7300_idle: allow... |
24 25 26 |
* but it is not enabled by default and must be manually * manually enabled with "forceload=1" because it is * only lightly validated. |
3ad0b02e4 i7300_idle: Disab... |
27 |
*/ |
3ad0b02e4 i7300_idle: Disab... |
28 29 |
static const struct fbd_ioat fbd_ioat_list[] = { |
2f102607a i7300_idle: allow... |
30 31 |
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB, 1}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT, 0}, |
3ad0b02e4 i7300_idle: Disab... |
32 33 34 35 36 37 |
{0, 0} }; /* table of devices that work with this driver */ static const struct pci_device_id pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) }, |
3ad0b02e4 i7300_idle: Disab... |
38 |
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) }, |
3ad0b02e4 i7300_idle: Disab... |
39 40 41 42 43 |
{ } /* Terminating entry */ }; /* Check for known platforms with I/O-AT */ static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev, |
2f102607a i7300_idle: allow... |
44 45 |
struct pci_dev **ioat_dev, int enable_all) |
3ad0b02e4 i7300_idle: Disab... |
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
{ int i; struct pci_dev *memdev, *dmadev; memdev = pci_get_bus_and_slot(MEMCTL_BUS, MEMCTL_DEVFN); if (!memdev) return -ENODEV; for (i = 0; pci_tbl[i].vendor != 0; i++) { if (memdev->vendor == pci_tbl[i].vendor && memdev->device == pci_tbl[i].device) { break; } } if (pci_tbl[i].vendor == 0) return -ENODEV; dmadev = pci_get_bus_and_slot(IOAT_BUS, IOAT_DEVFN); if (!dmadev) return -ENODEV; for (i = 0; fbd_ioat_list[i].vendor != 0; i++) { if (dmadev->vendor == fbd_ioat_list[i].vendor && dmadev->device == fbd_ioat_list[i].ioat_dev) { |
2f102607a i7300_idle: allow... |
70 71 |
if (!(fbd_ioat_list[i].enabled || enable_all)) continue; |
3ad0b02e4 i7300_idle: Disab... |
72 73 74 75 76 77 78 79 80 81 82 83 |
if (fbd_dev) *fbd_dev = memdev; if (ioat_dev) *ioat_dev = dmadev; return 0; } } return -ENODEV; } #endif |