diff options
author | Olof Johansson <olof@lixom.net> | 2007-12-12 01:44:46 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:15:23 -0500 |
commit | 38958dd9113c19cd7a927009ae585bd5aba3295e (patch) | |
tree | e4762aae2cfda535679bf3145f7553fddbdf6f6e /arch/powerpc/sysdev/mpic.h | |
parent | 731e74c43d4e47daf327748128f1a3648e5d39a5 (diff) |
[POWERPC] pasemi: Implement MSI support
Implement MSI support for PA Semi PWRficient platforms. MSI is done
through a special range of sources on the openpic controller, and they're
unfortunately breaking the usual concepts of how sources are programmed:
* The source is calculated as 512 + the value written into the MSI
register
* The vector for this source is added to the source and reported
through IACK
This means that for simplicity, it makes much more sense to just set the
vector to 0 for the source, since that's really the vector we expect to
see from IACK.
Also, the affinity/priority registers will affect 16 sources at a
time. To avoid most (simple) users from being limited by this, allocate
16 sources per device but use only one. This means that there's a total
of 32 sources.
If we get usage scenarions that need more sources, the allocator should
probably be revised to take an alignment argument and size, not just do
natural alignment.
Finally, since I'm already touching the MPIC names on pasemi, rename
the base one from the somewhat odd " PAS-OPIC " to "PASEMI-OPIC".
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpic.h')
-rw-r--r-- | arch/powerpc/sysdev/mpic.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h index 1cb6bd841027..4783c6e9f30d 100644 --- a/arch/powerpc/sysdev/mpic.h +++ b/arch/powerpc/sysdev/mpic.h | |||
@@ -17,6 +17,7 @@ extern int mpic_msi_init_allocator(struct mpic *mpic); | |||
17 | extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num); | 17 | extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num); |
18 | extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num); | 18 | extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num); |
19 | extern int mpic_u3msi_init(struct mpic *mpic); | 19 | extern int mpic_u3msi_init(struct mpic *mpic); |
20 | extern int mpic_pasemi_msi_init(struct mpic *mpic); | ||
20 | #else | 21 | #else |
21 | static inline void mpic_msi_reserve_hwirq(struct mpic *mpic, | 22 | static inline void mpic_msi_reserve_hwirq(struct mpic *mpic, |
22 | irq_hw_number_t hwirq) | 23 | irq_hw_number_t hwirq) |
@@ -28,9 +29,15 @@ static inline int mpic_u3msi_init(struct mpic *mpic) | |||
28 | { | 29 | { |
29 | return -1; | 30 | return -1; |
30 | } | 31 | } |
32 | |||
33 | static inline int mpic_pasemi_msi_init(struct mpic *mpic) | ||
34 | { | ||
35 | return -1; | ||
36 | } | ||
31 | #endif | 37 | #endif |
32 | 38 | ||
33 | extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type); | 39 | extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type); |
40 | extern void mpic_set_vector(unsigned int virq, unsigned int vector); | ||
34 | extern void mpic_end_irq(unsigned int irq); | 41 | extern void mpic_end_irq(unsigned int irq); |
35 | extern void mpic_mask_irq(unsigned int irq); | 42 | extern void mpic_mask_irq(unsigned int irq); |
36 | extern void mpic_unmask_irq(unsigned int irq); | 43 | extern void mpic_unmask_irq(unsigned int irq); |