aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/commproc.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-08-28 04:47:54 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:33:20 -0400
commit52964f87c64e6c6ea671b5bf3030fb1494090a48 (patch)
tree2e20d81bc05b60b7108733daf5713ea640ad2477 /arch/powerpc/sysdev/commproc.c
parent0ae0b54565a8dcc2b98de694b998e765de15b713 (diff)
[POWERPC] Add an optional device_node pointer to the irq_host
The majority of irq_host implementations (3 out of 4) are associated with a device_node, and need to stash it somewhere. Rather than having it somewhere different for each host, add an optional device_node pointer to the irq_host structure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/commproc.c')
-rw-r--r--arch/powerpc/sysdev/commproc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index e8e79f83d19..05dc30b80e2 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -50,7 +50,6 @@ static uint host_end; /* end + 1 */
50cpm8xx_t *cpmp; /* Pointer to comm processor space */ 50cpm8xx_t *cpmp; /* Pointer to comm processor space */
51cpic8xx_t *cpic_reg; 51cpic8xx_t *cpic_reg;
52 52
53static struct device_node *cpm_pic_node;
54static struct irq_host *cpm_pic_host; 53static struct irq_host *cpm_pic_host;
55 54
56static void cpm_mask_irq(unsigned int irq) 55static void cpm_mask_irq(unsigned int irq)
@@ -97,7 +96,7 @@ int cpm_get_irq(void)
97 96
98static int cpm_pic_host_match(struct irq_host *h, struct device_node *node) 97static int cpm_pic_host_match(struct irq_host *h, struct device_node *node)
99{ 98{
100 return cpm_pic_node == node; 99 return h->of_node == node;
101} 100}
102 101
103static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, 102static int cpm_pic_host_map(struct irq_host *h, unsigned int virq,
@@ -165,9 +164,8 @@ unsigned int cpm_pic_init(void)
165 164
166 out_be32(&cpic_reg->cpic_cimr, 0); 165 out_be32(&cpic_reg->cpic_cimr, 0);
167 166
168 cpm_pic_node = of_node_get(np); 167 cpm_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR,
169 168 64, &cpm_pic_host_ops, 64);
170 cpm_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm_pic_host_ops, 64);
171 if (cpm_pic_host == NULL) { 169 if (cpm_pic_host == NULL) {
172 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); 170 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
173 sirq = NO_IRQ; 171 sirq = NO_IRQ;