diff options
-rw-r--r-- | drivers/dma/ioat_dma.c | 2 | ||||
-rw-r--r-- | drivers/idle/i7300_idle.c | 6 | ||||
-rw-r--r-- | include/linux/i7300_idle.h | 20 |
3 files changed, 16 insertions, 12 deletions
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index 1955ee8d6d20..a600fc0f7962 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -173,7 +173,7 @@ static int ioat_dma_enumerate_channels(struct ioatdma_device *device) | |||
173 | xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale)); | 173 | xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale)); |
174 | 174 | ||
175 | #ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL | 175 | #ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL |
176 | if (i7300_idle_platform_probe(NULL, NULL) == 0) { | 176 | if (i7300_idle_platform_probe(NULL, NULL, 1) == 0) { |
177 | device->common.chancnt--; | 177 | device->common.chancnt--; |
178 | } | 178 | } |
179 | #endif | 179 | #endif |
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c index bf740394d704..949c97ff57e3 100644 --- a/drivers/idle/i7300_idle.c +++ b/drivers/idle/i7300_idle.c | |||
@@ -41,6 +41,10 @@ static int debug; | |||
41 | module_param_named(debug, debug, uint, 0644); | 41 | module_param_named(debug, debug, uint, 0644); |
42 | MODULE_PARM_DESC(debug, "Enable debug printks in this driver"); | 42 | MODULE_PARM_DESC(debug, "Enable debug printks in this driver"); |
43 | 43 | ||
44 | static int forceload; | ||
45 | module_param_named(forceload, forceload, uint, 0644); | ||
46 | MODULE_PARM_DESC(debug, "Enable driver testing on unvalidated i5000"); | ||
47 | |||
44 | #define dprintk(fmt, arg...) \ | 48 | #define dprintk(fmt, arg...) \ |
45 | do { if (debug) printk(KERN_INFO I7300_PRINT fmt, ##arg); } while (0) | 49 | do { if (debug) printk(KERN_INFO I7300_PRINT fmt, ##arg); } while (0) |
46 | 50 | ||
@@ -552,7 +556,7 @@ static int __init i7300_idle_init(void) | |||
552 | cpus_clear(idle_cpumask); | 556 | cpus_clear(idle_cpumask); |
553 | total_us = 0; | 557 | total_us = 0; |
554 | 558 | ||
555 | if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev)) | 559 | if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload)) |
556 | return -ENODEV; | 560 | return -ENODEV; |
557 | 561 | ||
558 | if (i7300_idle_thrt_save()) | 562 | if (i7300_idle_thrt_save()) |
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 @@ | |||
16 | struct fbd_ioat { | 16 | struct 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 | ||
28 | static const struct fbd_ioat fbd_ioat_list[] = { | 29 | static 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 */ |
37 | static const struct pci_device_id pci_tbl[] = { | 36 | static 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 */ |
46 | static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev, | 43 | static 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) |