aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/512x
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-02-14 16:06:50 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-02-14 16:06:50 -0500
commitbae1d8f19983fbfa25559aa3cb6a81a84aa82a18 (patch)
tree387012cc698159bfb5851c5022d5b55db2dafadc /arch/powerpc/platforms/512x
parent644bd954313254b54e08b69077e16831b6e04dfa (diff)
irq_domain/powerpc: Use common irq_domain structure instead of irq_host
This patch drops the powerpc-specific irq_host structures and uses the common irq_domain strucutres defined in linux/irqdomain.h. It also fixes all the users to use the new structure names. Renaming irq_host to irq_domain has been discussed for a long time, and this patch is a step in the process of generalizing the powerpc virq code to be usable by all architecture. An astute reader will notice that this patch actually removes the irq_host structure instead of renaming it. This is because the irq_domain structure already exists in include/linux/irqdomain.h and has the needed data members. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/powerpc/platforms/512x')
-rw-r--r--arch/powerpc/platforms/512x/mpc5121_ads_cpld.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
index 9f09319352c..fefa7977fa9 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -21,7 +21,7 @@
21#include <asm/prom.h> 21#include <asm/prom.h>
22 22
23static struct device_node *cpld_pic_node; 23static struct device_node *cpld_pic_node;
24static struct irq_host *cpld_pic_host; 24static struct irq_domain *cpld_pic_host;
25 25
26/* 26/*
27 * Bits to ignore in the misc_status register 27 * Bits to ignore in the misc_status register
@@ -123,13 +123,13 @@ cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
123} 123}
124 124
125static int 125static int
126cpld_pic_host_match(struct irq_host *h, struct device_node *node) 126cpld_pic_host_match(struct irq_domain *h, struct device_node *node)
127{ 127{
128 return cpld_pic_node == node; 128 return cpld_pic_node == node;
129} 129}
130 130
131static int 131static int
132cpld_pic_host_map(struct irq_host *h, unsigned int virq, 132cpld_pic_host_map(struct irq_domain *h, unsigned int virq,
133 irq_hw_number_t hw) 133 irq_hw_number_t hw)
134{ 134{
135 irq_set_status_flags(virq, IRQ_LEVEL); 135 irq_set_status_flags(virq, IRQ_LEVEL);
@@ -137,8 +137,7 @@ cpld_pic_host_map(struct irq_host *h, unsigned int virq,
137 return 0; 137 return 0;
138} 138}
139 139
140static struct 140static struct irq_domain_ops cpld_pic_host_ops = {
141irq_host_ops cpld_pic_host_ops = {
142 .match = cpld_pic_host_match, 141 .match = cpld_pic_host_match,
143 .map = cpld_pic_host_map, 142 .map = cpld_pic_host_map,
144}; 143};
@@ -192,7 +191,7 @@ mpc5121_ads_cpld_pic_init(void)
192 cpld_pic_node = of_node_get(np); 191 cpld_pic_node = of_node_get(np);
193 192
194 cpld_pic_host = 193 cpld_pic_host =
195 irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, 16, &cpld_pic_host_ops, 16); 194 irq_alloc_host(np, IRQ_DOMAIN_MAP_LINEAR, 16, &cpld_pic_host_ops, 16);
196 if (!cpld_pic_host) { 195 if (!cpld_pic_host) {
197 printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n"); 196 printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n");
198 goto end; 197 goto end;