diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:40:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:40:57 -0400 |
commit | 21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch) | |
tree | 17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /arch | |
parent | dc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff) | |
parent | 36e235901f90fb83215be43cbd8f1ca14661ea40 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
PCI: Only build PCI syscalls on architectures that want them
PCI: limit pci_get_bus_and_slot to domain 0
PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
PCI: hotplug: pciehp: wait for 1 second after power off slot
PCI: pci_set_power_state(): check for PM capabilities earlier
PCI: cpci_hotplug: Convert to use the kthread API
PCI: add pci_try_set_mwi
PCI: pcie: remove SPIN_LOCK_UNLOCKED
PCI: ROUND_UP macro cleanup in drivers/pci
PCI: remove pci_dac_dma_... APIs
PCI: pci-x-pci-express-read-control-interfaces cleanups
PCI: Fix typo in include/linux/pci.h
PCI: pci_ids, remove double or more empty lines
PCI: pci_ids, add atheros and 3com_2 vendors
PCI: pci_ids, reorder some entries
PCI: i386: traps, change VENDOR to DEVICE
PCI: ATM: lanai, change VENDOR to DEVICE
PCI: Change all drivers to use pci_device->revision
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/Kconfig | 3 | ||||
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 32 | ||||
-rw-r--r-- | arch/arm/Kconfig | 3 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | 4 | ||||
-rw-r--r-- | arch/i386/mach-visws/traps.c | 4 | ||||
-rw-r--r-- | arch/i386/pci/fixup.c | 9 | ||||
-rw-r--r-- | arch/ia64/Kconfig | 6 | ||||
-rw-r--r-- | arch/mips/pci/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/pci/fixup-cobalt.c | 10 | ||||
-rw-r--r-- | arch/mips/pci/pci-dac.c | 79 | ||||
-rw-r--r-- | arch/powerpc/Kconfig | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 6 | ||||
-rw-r--r-- | arch/ppc/Kconfig | 6 | ||||
-rw-r--r-- | arch/ppc/kernel/pci.c | 6 | ||||
-rw-r--r-- | arch/sparc/Kconfig | 3 | ||||
-rw-r--r-- | arch/sparc64/Kconfig | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-dma.c | 3 |
21 files changed, 50 insertions, 153 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 79c6e5a24456..2a85dc33907c 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -327,6 +327,9 @@ config PCI_DOMAINS | |||
327 | bool | 327 | bool |
328 | default y | 328 | default y |
329 | 329 | ||
330 | config PCI_SYSCALL | ||
331 | def_bool PCI | ||
332 | |||
330 | config ALPHA_CORE_AGP | 333 | config ALPHA_CORE_AGP |
331 | bool | 334 | bool |
332 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL | 335 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index 28c84e55feb9..6b07f89a72c7 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -207,6 +207,10 @@ iommu_arena_free(struct pci_iommu_arena *arena, long ofs, long n) | |||
207 | p[i] = 0; | 207 | p[i] = 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | /* True if the machine supports DAC addressing, and DEV can | ||
211 | make use of it given MASK. */ | ||
212 | static int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask); | ||
213 | |||
210 | /* Map a single buffer of the indicated size for PCI DMA in streaming | 214 | /* Map a single buffer of the indicated size for PCI DMA in streaming |
211 | mode. The 32-bit PCI bus mastering address to use is returned. | 215 | mode. The 32-bit PCI bus mastering address to use is returned. |
212 | Once the device is given the dma address, the device owns this memory | 216 | Once the device is given the dma address, the device owns this memory |
@@ -897,7 +901,7 @@ iommu_unbind(struct pci_iommu_arena *arena, long pg_start, long pg_count) | |||
897 | /* True if the machine supports DAC addressing, and DEV can | 901 | /* True if the machine supports DAC addressing, and DEV can |
898 | make use of it given MASK. */ | 902 | make use of it given MASK. */ |
899 | 903 | ||
900 | int | 904 | static int |
901 | pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | 905 | pci_dac_dma_supported(struct pci_dev *dev, u64 mask) |
902 | { | 906 | { |
903 | dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; | 907 | dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; |
@@ -917,32 +921,6 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | |||
917 | 921 | ||
918 | return ok; | 922 | return ok; |
919 | } | 923 | } |
920 | EXPORT_SYMBOL(pci_dac_dma_supported); | ||
921 | |||
922 | dma64_addr_t | ||
923 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | ||
924 | unsigned long offset, int direction) | ||
925 | { | ||
926 | return (alpha_mv.pci_dac_offset | ||
927 | + __pa(page_address(page)) | ||
928 | + (dma64_addr_t) offset); | ||
929 | } | ||
930 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
931 | |||
932 | struct page * | ||
933 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
934 | { | ||
935 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; | ||
936 | return virt_to_page(__va(paddr)); | ||
937 | } | ||
938 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
939 | |||
940 | unsigned long | ||
941 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
942 | { | ||
943 | return (dma_addr & ~PAGE_MASK); | ||
944 | } | ||
945 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | ||
946 | 924 | ||
947 | /* Helper for generic DMA-mapping functions. */ | 925 | /* Helper for generic DMA-mapping functions. */ |
948 | 926 | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 50d9f3e4e0f1..482d33f9ce5b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -531,6 +531,9 @@ config PCI | |||
531 | information about which PCI hardware does work under Linux and which | 531 | information about which PCI hardware does work under Linux and which |
532 | doesn't. | 532 | doesn't. |
533 | 533 | ||
534 | config PCI_SYSCALL | ||
535 | def_bool PCI | ||
536 | |||
534 | # Select the host bridge type | 537 | # Select the host bridge type |
535 | config PCI_HOST_VIA82C505 | 538 | config PCI_HOST_VIA82C505 |
536 | bool | 539 | bool |
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c index 0d49d73d1b71..66acd5039918 100644 --- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -391,8 +391,6 @@ static struct cpufreq_driver nforce2_driver = { | |||
391 | */ | 391 | */ |
392 | static unsigned int nforce2_detect_chipset(void) | 392 | static unsigned int nforce2_detect_chipset(void) |
393 | { | 393 | { |
394 | u8 revision; | ||
395 | |||
396 | nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, | 394 | nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, |
397 | PCI_DEVICE_ID_NVIDIA_NFORCE2, | 395 | PCI_DEVICE_ID_NVIDIA_NFORCE2, |
398 | PCI_ANY_ID, PCI_ANY_ID, NULL); | 396 | PCI_ANY_ID, PCI_ANY_ID, NULL); |
@@ -400,10 +398,8 @@ static unsigned int nforce2_detect_chipset(void) | |||
400 | if (nforce2_chipset_dev == NULL) | 398 | if (nforce2_chipset_dev == NULL) |
401 | return -ENODEV; | 399 | return -ENODEV; |
402 | 400 | ||
403 | pci_read_config_byte(nforce2_chipset_dev, PCI_REVISION_ID, &revision); | ||
404 | |||
405 | printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n", | 401 | printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n", |
406 | revision); | 402 | nforce2_chipset_dev->revision); |
407 | printk(KERN_INFO | 403 | printk(KERN_INFO |
408 | "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n"); | 404 | "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n"); |
409 | 405 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c index 6667e9cceb9f..194144539a6f 100644 --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -115,7 +115,6 @@ struct gxfreq_params { | |||
115 | u8 pci_suscfg; | 115 | u8 pci_suscfg; |
116 | u8 pci_pmer1; | 116 | u8 pci_pmer1; |
117 | u8 pci_pmer2; | 117 | u8 pci_pmer2; |
118 | u8 pci_rev; | ||
119 | struct pci_dev *cs55x0; | 118 | struct pci_dev *cs55x0; |
120 | }; | 119 | }; |
121 | 120 | ||
@@ -276,7 +275,7 @@ static void gx_set_cpuspeed(unsigned int khz) | |||
276 | pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */ | 275 | pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */ |
277 | pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1); | 276 | pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1); |
278 | 277 | ||
279 | if (gx_params->pci_rev < 0x10) { /* CS5530(rev 1.2, 1.3) */ | 278 | if (gx_params->cs55x0->revision < 0x10) { /* CS5530(rev 1.2, 1.3) */ |
280 | suscfg = gx_params->pci_suscfg | SUSMOD; | 279 | suscfg = gx_params->pci_suscfg | SUSMOD; |
281 | } else { /* CS5530A,B.. */ | 280 | } else { /* CS5530A,B.. */ |
282 | suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE; | 281 | suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE; |
@@ -471,7 +470,6 @@ static int __init cpufreq_gx_init(void) | |||
471 | pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2)); | 470 | pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2)); |
472 | pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); | 471 | pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); |
473 | pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration)); | 472 | pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration)); |
474 | pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, ¶ms->pci_rev); | ||
475 | 473 | ||
476 | if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { | 474 | if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { |
477 | kfree(params); | 475 | kfree(params); |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c index 698f980eb443..a5b2346faf1f 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -205,7 +205,6 @@ static unsigned int speedstep_detect_chipset (void) | |||
205 | * host brige. Abort on these systems. | 205 | * host brige. Abort on these systems. |
206 | */ | 206 | */ |
207 | static struct pci_dev *hostbridge; | 207 | static struct pci_dev *hostbridge; |
208 | u8 rev = 0; | ||
209 | 208 | ||
210 | hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL, | 209 | hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL, |
211 | PCI_DEVICE_ID_INTEL_82815_MC, | 210 | PCI_DEVICE_ID_INTEL_82815_MC, |
@@ -216,8 +215,7 @@ static unsigned int speedstep_detect_chipset (void) | |||
216 | if (!hostbridge) | 215 | if (!hostbridge) |
217 | return 2; /* 2-M */ | 216 | return 2; /* 2-M */ |
218 | 217 | ||
219 | pci_read_config_byte(hostbridge, PCI_REVISION_ID, &rev); | 218 | if (hostbridge->revision < 5) { |
220 | if (rev < 5) { | ||
221 | dprintk("hostbridge does not support speedstep\n"); | 219 | dprintk("hostbridge does not support speedstep\n"); |
222 | speedstep_chipset_dev = NULL; | 220 | speedstep_chipset_dev = NULL; |
223 | pci_dev_put(hostbridge); | 221 | pci_dev_put(hostbridge); |
diff --git a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c index 5199bd03254a..843b67acf43b 100644 --- a/arch/i386/mach-visws/traps.c +++ b/arch/i386/mach-visws/traps.c | |||
@@ -23,13 +23,13 @@ static __init void lithium_init(void) | |||
23 | set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); | 23 | set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); |
24 | 24 | ||
25 | if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || | 25 | if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || |
26 | (li_pcia_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { | 26 | (li_pcia_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) { |
27 | printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A'); | 27 | printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A'); |
28 | panic("This machine is not SGI Visual Workstation 320/540"); | 28 | panic("This machine is not SGI Visual Workstation 320/540"); |
29 | } | 29 | } |
30 | 30 | ||
31 | if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || | 31 | if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || |
32 | (li_pcib_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { | 32 | (li_pcib_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) { |
33 | printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B'); | 33 | printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B'); |
34 | panic("This machine is not SGI Visual Workstation 320/540"); | 34 | panic("This machine is not SGI Visual Workstation 320/540"); |
35 | } | 35 | } |
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index b95b42950ed4..e7306dbf6c42 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c | |||
@@ -118,12 +118,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci | |||
118 | static void pci_fixup_via_northbridge_bug(struct pci_dev *d) | 118 | static void pci_fixup_via_northbridge_bug(struct pci_dev *d) |
119 | { | 119 | { |
120 | u8 v; | 120 | u8 v; |
121 | u8 revision; | ||
122 | int where = 0x55; | 121 | int where = 0x55; |
123 | int mask = 0x1f; /* clear bits 5, 6, 7 by default */ | 122 | int mask = 0x1f; /* clear bits 5, 6, 7 by default */ |
124 | 123 | ||
125 | pci_read_config_byte(d, PCI_REVISION_ID, &revision); | ||
126 | |||
127 | if (d->device == PCI_DEVICE_ID_VIA_8367_0) { | 124 | if (d->device == PCI_DEVICE_ID_VIA_8367_0) { |
128 | /* fix pci bus latency issues resulted by NB bios error | 125 | /* fix pci bus latency issues resulted by NB bios error |
129 | it appears on bug free^Wreduced kt266x's bios forces | 126 | it appears on bug free^Wreduced kt266x's bios forces |
@@ -133,8 +130,8 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d) | |||
133 | where = 0x95; /* the memory write queue timer register is | 130 | where = 0x95; /* the memory write queue timer register is |
134 | different for the KT266x's: 0x95 not 0x55 */ | 131 | different for the KT266x's: 0x95 not 0x55 */ |
135 | } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 && | 132 | } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 && |
136 | (revision == VIA_8363_KL133_REVISION_ID || | 133 | (d->revision == VIA_8363_KL133_REVISION_ID || |
137 | revision == VIA_8363_KM133_REVISION_ID)) { | 134 | d->revision == VIA_8363_KM133_REVISION_ID)) { |
138 | mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5 | 135 | mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5 |
139 | causes screen corruption on the KL133/KM133 */ | 136 | causes screen corruption on the KL133/KM133 */ |
140 | } | 137 | } |
@@ -142,7 +139,7 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d) | |||
142 | pci_read_config_byte(d, where, &v); | 139 | pci_read_config_byte(d, where, &v); |
143 | if (v & ~mask) { | 140 | if (v & ~mask) { |
144 | printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \ | 141 | printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \ |
145 | d->device, revision, where, v, mask, v & mask); | 142 | d->device, d->revision, where, v, mask, v & mask); |
146 | v &= mask; | 143 | v &= mask; |
147 | pci_write_config_byte(d, where, v); | 144 | pci_write_config_byte(d, where, v); |
148 | } | 145 | } |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index de1bff659969..db9ddff95841 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -520,8 +520,10 @@ config PCI | |||
520 | here unless you are using a simulator without PCI support. | 520 | here unless you are using a simulator without PCI support. |
521 | 521 | ||
522 | config PCI_DOMAINS | 522 | config PCI_DOMAINS |
523 | bool | 523 | def_bool PCI |
524 | default PCI | 524 | |
525 | config PCI_SYSCALL | ||
526 | def_bool PCI | ||
525 | 527 | ||
526 | source "drivers/pci/pcie/Kconfig" | 528 | source "drivers/pci/pcie/Kconfig" |
527 | 529 | ||
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index f26ede001a0b..c58bd3d036f4 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the PCI specific kernel interface routines under Linux. | 2 | # Makefile for the PCI specific kernel interface routines under Linux. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += pci.o pci-dac.o | 5 | obj-y += pci.o |
6 | 6 | ||
7 | # | 7 | # |
8 | # PCI bus host bridge specific code | 8 | # PCI bus host bridge specific code |
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index 7fc475f7eae5..76b4f0ffb1e5 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c | |||
@@ -58,8 +58,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, | |||
58 | 58 | ||
59 | static void qube_raq_galileo_fixup(struct pci_dev *dev) | 59 | static void qube_raq_galileo_fixup(struct pci_dev *dev) |
60 | { | 60 | { |
61 | unsigned short galileo_id; | ||
62 | |||
63 | if (dev->devfn != PCI_DEVFN(0, 0)) | 61 | if (dev->devfn != PCI_DEVFN(0, 0)) |
64 | return; | 62 | return; |
65 | 63 | ||
@@ -84,16 +82,14 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev) | |||
84 | * Therefore we must set the disconnect/retry cycle values to | 82 | * Therefore we must set the disconnect/retry cycle values to |
85 | * something sensible when using the new Galileo. | 83 | * something sensible when using the new Galileo. |
86 | */ | 84 | */ |
87 | pci_read_config_word(dev, PCI_REVISION_ID, &galileo_id); | ||
88 | galileo_id &= 0xff; /* mask off class info */ | ||
89 | 85 | ||
90 | printk(KERN_INFO "Galileo: revision %u\n", galileo_id); | 86 | printk(KERN_INFO "Galileo: revision %u\n", dev->revision); |
91 | 87 | ||
92 | #if 0 | 88 | #if 0 |
93 | if (galileo_id >= 0x10) { | 89 | if (dev->revision >= 0x10) { |
94 | /* New Galileo, assumes PCI stop line to VIA is connected. */ | 90 | /* New Galileo, assumes PCI stop line to VIA is connected. */ |
95 | GT_WRITE(GT_PCI0_TOR_OFS, 0x4020); | 91 | GT_WRITE(GT_PCI0_TOR_OFS, 0x4020); |
96 | } else if (galileo_id == 0x1 || galileo_id == 0x2) | 92 | } else if (dev->revision == 0x1 || dev->revision == 0x2) |
97 | #endif | 93 | #endif |
98 | { | 94 | { |
99 | signed int timeo; | 95 | signed int timeo; |
diff --git a/arch/mips/pci/pci-dac.c b/arch/mips/pci/pci-dac.c deleted file mode 100644 index 0f0ea1b7d4dd..000000000000 --- a/arch/mips/pci/pci-dac.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com> | ||
7 | * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org> | ||
8 | * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. | ||
9 | */ | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/dma-mapping.h> | ||
13 | #include <linux/mm.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/string.h> | ||
16 | |||
17 | #include <asm/cache.h> | ||
18 | #include <asm/io.h> | ||
19 | |||
20 | #include <dma-coherence.h> | ||
21 | |||
22 | #include <linux/pci.h> | ||
23 | |||
24 | dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev, | ||
25 | struct page *page, unsigned long offset, int direction) | ||
26 | { | ||
27 | struct device *dev = &pdev->dev; | ||
28 | |||
29 | BUG_ON(direction == DMA_NONE); | ||
30 | |||
31 | if (!plat_device_is_coherent(dev)) { | ||
32 | unsigned long addr; | ||
33 | |||
34 | addr = (unsigned long) page_address(page) + offset; | ||
35 | dma_cache_wback_inv(addr, PAGE_SIZE); | ||
36 | } | ||
37 | |||
38 | return plat_map_dma_mem_page(dev, page) + offset; | ||
39 | } | ||
40 | |||
41 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
42 | |||
43 | struct page *pci_dac_dma_to_page(struct pci_dev *pdev, | ||
44 | dma64_addr_t dma_addr) | ||
45 | { | ||
46 | return pfn_to_page(plat_dma_addr_to_phys(dma_addr) >> PAGE_SHIFT); | ||
47 | } | ||
48 | |||
49 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
50 | |||
51 | unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev, | ||
52 | dma64_addr_t dma_addr) | ||
53 | { | ||
54 | return dma_addr & ~PAGE_MASK; | ||
55 | } | ||
56 | |||
57 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | ||
58 | |||
59 | void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, | ||
60 | dma64_addr_t dma_addr, size_t len, int direction) | ||
61 | { | ||
62 | BUG_ON(direction == PCI_DMA_NONE); | ||
63 | |||
64 | if (!plat_device_is_coherent(&pdev->dev)) | ||
65 | dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len); | ||
66 | } | ||
67 | |||
68 | EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu); | ||
69 | |||
70 | void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, | ||
71 | dma64_addr_t dma_addr, size_t len, int direction) | ||
72 | { | ||
73 | BUG_ON(direction == PCI_DMA_NONE); | ||
74 | |||
75 | if (!plat_device_is_coherent(&pdev->dev)) | ||
76 | dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len); | ||
77 | } | ||
78 | |||
79 | EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device); | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5eaeafd30bdf..6beee32144c0 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -698,8 +698,10 @@ config PCI | |||
698 | infrastructure code to support PCI bus devices. | 698 | infrastructure code to support PCI bus devices. |
699 | 699 | ||
700 | config PCI_DOMAINS | 700 | config PCI_DOMAINS |
701 | bool | 701 | def_bool PCI |
702 | default PCI | 702 | |
703 | config PCI_SYSCALL | ||
704 | def_bool PCI | ||
703 | 705 | ||
704 | config PCI_QSPAN | 706 | config PCI_QSPAN |
705 | bool "QSpan PCI" | 707 | bool "QSpan PCI" |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index e66064b5093a..86982112b0dd 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1047,10 +1047,10 @@ void pcibios_make_OF_bus_map(void) | |||
1047 | #endif /* CONFIG_PPC_OF */ | 1047 | #endif /* CONFIG_PPC_OF */ |
1048 | 1048 | ||
1049 | /* Add sysfs properties */ | 1049 | /* Add sysfs properties */ |
1050 | void pcibios_add_platform_entries(struct pci_dev *pdev) | 1050 | int pcibios_add_platform_entries(struct pci_dev *pdev) |
1051 | { | 1051 | { |
1052 | #ifdef CONFIG_PPC_OF | 1052 | #ifdef CONFIG_PPC_OF |
1053 | device_create_file(&pdev->dev, &dev_attr_devspec); | 1053 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
1054 | #endif /* CONFIG_PPC_OF */ | 1054 | #endif /* CONFIG_PPC_OF */ |
1055 | } | 1055 | } |
1056 | 1056 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 249cca27a9b8..e3009a43ac56 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -367,8 +367,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
367 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 367 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
368 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 368 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
369 | dev->class = get_int_prop(node, "class-code", 0); | 369 | dev->class = get_int_prop(node, "class-code", 0); |
370 | dev->revision = get_int_prop(node, "revision-id", 0); | ||
370 | 371 | ||
371 | DBG(" class: 0x%x\n", dev->class); | 372 | DBG(" class: 0x%x\n", dev->class); |
373 | DBG(" revision: 0x%x\n", dev->revision); | ||
372 | 374 | ||
373 | dev->current_state = 4; /* unknown power state */ | 375 | dev->current_state = 4; /* unknown power state */ |
374 | dev->error_state = pci_channel_io_normal; | 376 | dev->error_state = pci_channel_io_normal; |
@@ -876,9 +878,9 @@ static ssize_t pci_show_devspec(struct device *dev, | |||
876 | } | 878 | } |
877 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); | 879 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); |
878 | 880 | ||
879 | void pcibios_add_platform_entries(struct pci_dev *pdev) | 881 | int pcibios_add_platform_entries(struct pci_dev *pdev) |
880 | { | 882 | { |
881 | device_create_file(&pdev->dev, &dev_attr_devspec); | 883 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
882 | } | 884 | } |
883 | 885 | ||
884 | #define ISA_SPACE_MASK 0x1 | 886 | #define ISA_SPACE_MASK 0x1 |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index ccce2a4a1522..6bdeeb70b157 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1237,8 +1237,10 @@ config PCI | |||
1237 | infrastructure code to support PCI bus devices. | 1237 | infrastructure code to support PCI bus devices. |
1238 | 1238 | ||
1239 | config PCI_DOMAINS | 1239 | config PCI_DOMAINS |
1240 | bool | 1240 | def_bool PCI |
1241 | default PCI | 1241 | |
1242 | config PCI_SYSCALL | ||
1243 | def_bool PCI | ||
1242 | 1244 | ||
1243 | config MPC83xx_PCI2 | 1245 | config MPC83xx_PCI2 |
1244 | bool "Support for 2nd PCI host controller" | 1246 | bool "Support for 2nd PCI host controller" |
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 5e723c4c2571..c2ec13bea006 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -633,12 +633,6 @@ void pcibios_make_OF_bus_map(void) | |||
633 | { | 633 | { |
634 | } | 634 | } |
635 | 635 | ||
636 | /* Add sysfs properties */ | ||
637 | void pcibios_add_platform_entries(struct pci_dev *pdev) | ||
638 | { | ||
639 | } | ||
640 | |||
641 | |||
642 | static int __init | 636 | static int __init |
643 | pcibios_init(void) | 637 | pcibios_init(void) |
644 | { | 638 | { |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index fbcc00c6c06e..8567cc901942 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -210,6 +210,9 @@ config PCI | |||
210 | CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC. | 210 | CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC. |
211 | All of these platforms are extremely obscure, so say N if unsure. | 211 | All of these platforms are extremely obscure, so say N if unsure. |
212 | 212 | ||
213 | config PCI_SYSCALL | ||
214 | def_bool PCI | ||
215 | |||
213 | source "drivers/pci/Kconfig" | 216 | source "drivers/pci/Kconfig" |
214 | 217 | ||
215 | endif | 218 | endif |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 89a1b469b93d..6566d13db04f 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -320,8 +320,10 @@ config PCI | |||
320 | doesn't. | 320 | doesn't. |
321 | 321 | ||
322 | config PCI_DOMAINS | 322 | config PCI_DOMAINS |
323 | bool | 323 | def_bool PCI |
324 | default PCI | 324 | |
325 | config PCI_SYSCALL | ||
326 | def_bool PCI | ||
325 | 327 | ||
326 | source "drivers/pci/Kconfig" | 328 | source "drivers/pci/Kconfig" |
327 | 329 | ||
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 81f4a5ea05f7..55ad1b899bb8 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -448,6 +448,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
448 | */ | 448 | */ |
449 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); | 449 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); |
450 | dev->class = class >> 8; | 450 | dev->class = class >> 8; |
451 | dev->revision = class & 0xff; | ||
451 | 452 | ||
452 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 453 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
453 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 454 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 9f80aad3fe2d..90f6315d02d4 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -22,8 +22,7 @@ EXPORT_SYMBOL(bad_dma_address); | |||
22 | int iommu_bio_merge __read_mostly = 0; | 22 | int iommu_bio_merge __read_mostly = 0; |
23 | EXPORT_SYMBOL(iommu_bio_merge); | 23 | EXPORT_SYMBOL(iommu_bio_merge); |
24 | 24 | ||
25 | int iommu_sac_force __read_mostly = 0; | 25 | static int iommu_sac_force __read_mostly = 0; |
26 | EXPORT_SYMBOL(iommu_sac_force); | ||
27 | 26 | ||
28 | int no_iommu __read_mostly; | 27 | int no_iommu __read_mostly; |
29 | #ifdef CONFIG_IOMMU_DEBUG | 28 | #ifdef CONFIG_IOMMU_DEBUG |