diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-04 05:16:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:55:29 -0400 |
commit | 8b955b0dddb35e398b07e217a81f8bd49400796f (patch) | |
tree | 6fc307371b6889ac08fa5a7187cde1c137c8d765 /include/linux/pci.h | |
parent | e78d01693be38bf93dd6bb49b86e143da450de86 (diff) |
[PATCH] Initial generic hypertransport interrupt support
This patch implements two functions ht_create_irq and ht_destroy_irq for
use by drivers. Several other functions are implemented as helpers for
arch specific irq_chip handlers.
The driver for the card I tested this on isn't yet ready to be merged.
However this code is and hypertransport irqs are in use in a few other
places in the kernel. Not that any of this will get merged before 2.6.19
Because the ipath-ht400 is slightly out of spec this code will need to be
generalized to work there.
I think all of the powerpc uses are for a plain interrupt controller in a
chipset so support for native hypertransport devices is a little less
interesting.
However I think this is a half way decent model on how to separate arch
specific and generic helper code, and I think this is a functional model of
how to get the architecture dependencies out of the msi code.
[akpm@osdl.org: Kconfig fix]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg KH <greg@kroah.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2aabe90f1cd2..9b34bc8f34e4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -681,6 +681,23 @@ extern int msi_register(struct msi_ops *ops); | |||
681 | 681 | ||
682 | #endif | 682 | #endif |
683 | 683 | ||
684 | #ifdef CONFIG_HT_IRQ | ||
685 | /* Helper functions.. */ | ||
686 | void write_ht_irq_low(unsigned int irq, u32 data); | ||
687 | void write_ht_irq_high(unsigned int irq, u32 data); | ||
688 | u32 read_ht_irq_low(unsigned int irq); | ||
689 | u32 read_ht_irq_high(unsigned int irq); | ||
690 | void mask_ht_irq(unsigned int irq); | ||
691 | void unmask_ht_irq(unsigned int irq); | ||
692 | |||
693 | /* The functions a driver should call */ | ||
694 | int ht_create_irq(struct pci_dev *dev, int idx); | ||
695 | void ht_destroy_irq(unsigned int irq); | ||
696 | |||
697 | /* The arch hook for getting things started */ | ||
698 | int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); | ||
699 | #endif /* CONFIG_HT_IRQ */ | ||
700 | |||
684 | extern void pci_block_user_cfg_access(struct pci_dev *dev); | 701 | extern void pci_block_user_cfg_access(struct pci_dev *dev); |
685 | extern void pci_unblock_user_cfg_access(struct pci_dev *dev); | 702 | extern void pci_unblock_user_cfg_access(struct pci_dev *dev); |
686 | 703 | ||