diff options
author | Muli Ben-Yehuda <muli@il.ibm.com> | 2007-07-21 11:10:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:11 -0400 |
commit | b8d2ea1b87b02fc94ffcab58b29c83fbbb6a1e4e (patch) | |
tree | 0b3a5c7a8b408279696f981bf4d48c50dbb39742 | |
parent | 9882234bf2e54ebf4866245d46e2c704a1214ad9 (diff) |
x86_64: introduce handle_quirks() for various chipset quirks
Move the aic94xx split completion timeout handling there.
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86_64/kernel/pci-calgary.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index b1ab0d500529..9f6dd4453705 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c | |||
@@ -807,6 +807,20 @@ static void __init calgary_set_split_completion_timeout(void __iomem *bbar, | |||
807 | readq(target); /* flush */ | 807 | readq(target); /* flush */ |
808 | } | 808 | } |
809 | 809 | ||
810 | static void __init calgary_handle_quirks(struct pci_dev* dev) | ||
811 | { | ||
812 | unsigned char busnum = dev->bus->number; | ||
813 | struct iommu_table *tbl = dev->sysdata; | ||
814 | |||
815 | /* | ||
816 | * Give split completion a longer timeout on bus 1 for aic94xx | ||
817 | * http://bugzilla.kernel.org/show_bug.cgi?id=7180 | ||
818 | */ | ||
819 | if (busnum == 1) | ||
820 | calgary_set_split_completion_timeout(tbl->bbar, busnum, | ||
821 | CCR_2SEC_TIMEOUT); | ||
822 | } | ||
823 | |||
810 | static void __init calgary_enable_translation(struct pci_dev *dev) | 824 | static void __init calgary_enable_translation(struct pci_dev *dev) |
811 | { | 825 | { |
812 | u32 val32; | 826 | u32 val32; |
@@ -831,14 +845,6 @@ static void __init calgary_enable_translation(struct pci_dev *dev) | |||
831 | writel(cpu_to_be32(val32), target); | 845 | writel(cpu_to_be32(val32), target); |
832 | readl(target); /* flush */ | 846 | readl(target); /* flush */ |
833 | 847 | ||
834 | /* | ||
835 | * Give split completion a longer timeout on bus 1 for aic94xx | ||
836 | * http://bugzilla.kernel.org/show_bug.cgi?id=7180 | ||
837 | */ | ||
838 | if (busnum == 1) | ||
839 | calgary_set_split_completion_timeout(bbar, busnum, | ||
840 | CCR_2SEC_TIMEOUT); | ||
841 | |||
842 | init_timer(&tbl->watchdog_timer); | 848 | init_timer(&tbl->watchdog_timer); |
843 | tbl->watchdog_timer.function = &calgary_watchdog; | 849 | tbl->watchdog_timer.function = &calgary_watchdog; |
844 | tbl->watchdog_timer.data = (unsigned long)dev; | 850 | tbl->watchdog_timer.data = (unsigned long)dev; |
@@ -890,6 +896,9 @@ static int __init calgary_init_one(struct pci_dev *dev) | |||
890 | 896 | ||
891 | pci_dev_get(dev); | 897 | pci_dev_get(dev); |
892 | dev->bus->self = dev; | 898 | dev->bus->self = dev; |
899 | |||
900 | calgary_handle_quirks(dev); | ||
901 | |||
893 | calgary_enable_translation(dev); | 902 | calgary_enable_translation(dev); |
894 | 903 | ||
895 | return 0; | 904 | return 0; |