aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-05-27 23:59:58 -0400
committerLen Brown <len.brown@intel.com>2009-05-28 20:52:40 -0400
commit2f102607ac77354b02a76cf2748598ce9f270f08 (patch)
tree922513b874c12a9fe75bba02e94c24388f21dc35 /include
parentcd86a536c81e9300d984327517548ca0652eebf9 (diff)
i7300_idle: allow testing on i5000-series hardware w/o re-compile
Testing the i7300_idle driver on i5000-series hardware required an edit to i7300_idle.h to "#define SUPPORT_I5000 1" and a re-build of both i7300_idle and ioat_dma. Replace that build-time scheme with a load-time module parameter: "7300_idle.forceload=1" to make it easier to test the driver on hardware that while not officially validated, works fine and is much more commonly available. By default (no modparam) the driver will continue to load only on the i7300. Note that ioat_dma runs a copy of i7300_idle's probe routine to know to reserve an IOAT channel for i7300_idle. This change makes ioat_dma do that always on the i5000, just like it does on the i7300. Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Andrew Henroid <andrew.d.henroid@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i7300_idle.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/i7300_idle.h b/include/linux/i7300_idle.h
index 05a80c44513c..1587b7dec505 100644
--- a/include/linux/i7300_idle.h
+++ b/include/linux/i7300_idle.h
@@ -16,35 +16,33 @@
16struct fbd_ioat { 16struct fbd_ioat {
17 unsigned int vendor; 17 unsigned int vendor;
18 unsigned int ioat_dev; 18 unsigned int ioat_dev;
19 unsigned int enabled;
19}; 20};
20 21
21/* 22/*
22 * The i5000 chip-set has the same hooks as the i7300 23 * The i5000 chip-set has the same hooks as the i7300
23 * but support is disabled by default because this driver 24 * but it is not enabled by default and must be manually
24 * has not been validated on that platform. 25 * manually enabled with "forceload=1" because it is
26 * only lightly validated.
25 */ 27 */
26#define SUPPORT_I5000 0
27 28
28static const struct fbd_ioat fbd_ioat_list[] = { 29static const struct fbd_ioat fbd_ioat_list[] = {
29 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB}, 30 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB, 1},
30#if SUPPORT_I5000 31 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT, 0},
31 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT},
32#endif
33 {0, 0} 32 {0, 0}
34}; 33};
35 34
36/* table of devices that work with this driver */ 35/* table of devices that work with this driver */
37static const struct pci_device_id pci_tbl[] = { 36static const struct pci_device_id pci_tbl[] = {
38 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) }, 37 { 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) }, 38 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
41#endif
42 { } /* Terminating entry */ 39 { } /* Terminating entry */
43}; 40};
44 41
45/* Check for known platforms with I/O-AT */ 42/* Check for known platforms with I/O-AT */
46static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev, 43static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
47 struct pci_dev **ioat_dev) 44 struct pci_dev **ioat_dev,
45 int enable_all)
48{ 46{
49 int i; 47 int i;
50 struct pci_dev *memdev, *dmadev; 48 struct pci_dev *memdev, *dmadev;
@@ -69,6 +67,8 @@ static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
69 for (i = 0; fbd_ioat_list[i].vendor != 0; i++) { 67 for (i = 0; fbd_ioat_list[i].vendor != 0; i++) {
70 if (dmadev->vendor == fbd_ioat_list[i].vendor && 68 if (dmadev->vendor == fbd_ioat_list[i].vendor &&
71 dmadev->device == fbd_ioat_list[i].ioat_dev) { 69 dmadev->device == fbd_ioat_list[i].ioat_dev) {
70 if (!(fbd_ioat_list[i].enabled || enable_all))
71 continue;
72 if (fbd_dev) 72 if (fbd_dev)
73 *fbd_dev = memdev; 73 *fbd_dev = memdev;
74 if (ioat_dev) 74 if (ioat_dev)