diff options
| author | Michael Ellerman <michael@ellerman.id.au> | 2007-08-28 04:47:55 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:33:20 -0400 |
| commit | 6815800601d3e46b976c868e4e85fb6de32b9133 (patch) | |
| tree | df047ed69d7b2b1a744625fd6b2b6f49ada47df4 /arch/powerpc/sysdev | |
| parent | 8528ab84ebe7a1eeed9b0acc808df86663d506c0 (diff) | |
[POWERPC] Provide a default irq_host match, which matches on an exact of_node
The most common match semantic is an exact match based on the device node.
So provide a default implementation that does this, and hook it up if no
match routine is specified.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/commproc.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/cpm2_pic.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/mpc8xx_pic.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/mv64x60_pic.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/tsi108_pci.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/uic.c | 6 |
6 files changed, 0 insertions, 36 deletions
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c index 05dc30b80e29..b562afc4e50c 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/commproc.c | |||
| @@ -94,11 +94,6 @@ int cpm_get_irq(void) | |||
| 94 | return irq_linear_revmap(cpm_pic_host, cpm_vec); | 94 | return irq_linear_revmap(cpm_pic_host, cpm_vec); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static int cpm_pic_host_match(struct irq_host *h, struct device_node *node) | ||
| 98 | { | ||
| 99 | return h->of_node == node; | ||
| 100 | } | ||
| 101 | |||
| 102 | static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, | 97 | static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, |
| 103 | irq_hw_number_t hw) | 98 | irq_hw_number_t hw) |
| 104 | { | 99 | { |
| @@ -126,7 +121,6 @@ static struct irqaction cpm_error_irqaction = { | |||
| 126 | }; | 121 | }; |
| 127 | 122 | ||
| 128 | static struct irq_host_ops cpm_pic_host_ops = { | 123 | static struct irq_host_ops cpm_pic_host_ops = { |
| 129 | .match = cpm_pic_host_match, | ||
| 130 | .map = cpm_pic_host_map, | 124 | .map = cpm_pic_host_map, |
| 131 | }; | 125 | }; |
| 132 | 126 | ||
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index d9ab30c66ebf..d5b36e0ecbda 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
| @@ -205,11 +205,6 @@ unsigned int cpm2_get_irq(void) | |||
| 205 | return irq_linear_revmap(cpm2_pic_host, irq); | 205 | return irq_linear_revmap(cpm2_pic_host, irq); |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node) | ||
| 209 | { | ||
| 210 | return h->of_node == node; | ||
| 211 | } | ||
| 212 | |||
| 213 | static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, | 208 | static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, |
| 214 | irq_hw_number_t hw) | 209 | irq_hw_number_t hw) |
| 215 | { | 210 | { |
| @@ -233,7 +228,6 @@ static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
| 233 | } | 228 | } |
| 234 | 229 | ||
| 235 | static struct irq_host_ops cpm2_pic_host_ops = { | 230 | static struct irq_host_ops cpm2_pic_host_ops = { |
| 236 | .match = cpm2_pic_host_match, | ||
| 237 | .map = cpm2_pic_host_map, | 231 | .map = cpm2_pic_host_map, |
| 238 | .xlate = cpm2_pic_host_xlate, | 232 | .xlate = cpm2_pic_host_xlate, |
| 239 | }; | 233 | }; |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index f20a4d43d104..565156ae65bc 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
| @@ -119,11 +119,6 @@ unsigned int mpc8xx_get_irq(void) | |||
| 119 | 119 | ||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static int mpc8xx_pic_host_match(struct irq_host *h, struct device_node *node) | ||
| 123 | { | ||
| 124 | return h->of_node == node; | ||
| 125 | } | ||
| 126 | |||
| 127 | static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq, | 122 | static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq, |
| 128 | irq_hw_number_t hw) | 123 | irq_hw_number_t hw) |
| 129 | { | 124 | { |
| @@ -157,7 +152,6 @@ static int mpc8xx_pic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
| 157 | 152 | ||
| 158 | 153 | ||
| 159 | static struct irq_host_ops mpc8xx_pic_host_ops = { | 154 | static struct irq_host_ops mpc8xx_pic_host_ops = { |
| 160 | .match = mpc8xx_pic_host_match, | ||
| 161 | .map = mpc8xx_pic_host_map, | 155 | .map = mpc8xx_pic_host_map, |
| 162 | .xlate = mpc8xx_pic_host_xlate, | 156 | .xlate = mpc8xx_pic_host_xlate, |
| 163 | }; | 157 | }; |
diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64x60_pic.c index a145bfd003c7..19e6ef263797 100644 --- a/arch/powerpc/sysdev/mv64x60_pic.c +++ b/arch/powerpc/sysdev/mv64x60_pic.c | |||
| @@ -202,11 +202,6 @@ static struct irq_chip mv64x60_chip_gpp = { | |||
| 202 | * mv64x60_host_ops functions | 202 | * mv64x60_host_ops functions |
| 203 | */ | 203 | */ |
| 204 | 204 | ||
| 205 | static int mv64x60_host_match(struct irq_host *h, struct device_node *np) | ||
| 206 | { | ||
| 207 | return h->of_node == np; | ||
| 208 | } | ||
| 209 | |||
| 210 | static struct irq_chip *mv64x60_chips[] = { | 205 | static struct irq_chip *mv64x60_chips[] = { |
| 211 | [MV64x60_LEVEL1_LOW] = &mv64x60_chip_low, | 206 | [MV64x60_LEVEL1_LOW] = &mv64x60_chip_low, |
| 212 | [MV64x60_LEVEL1_HIGH] = &mv64x60_chip_high, | 207 | [MV64x60_LEVEL1_HIGH] = &mv64x60_chip_high, |
| @@ -228,7 +223,6 @@ static int mv64x60_host_map(struct irq_host *h, unsigned int virq, | |||
| 228 | } | 223 | } |
| 229 | 224 | ||
| 230 | static struct irq_host_ops mv64x60_host_ops = { | 225 | static struct irq_host_ops mv64x60_host_ops = { |
| 231 | .match = mv64x60_host_match, | ||
| 232 | .map = mv64x60_host_map, | 226 | .map = mv64x60_host_map, |
| 233 | }; | 227 | }; |
| 234 | 228 | ||
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index b41492a8d600..31d3d33d91fc 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
| @@ -404,13 +404,7 @@ static int pci_irq_host_map(struct irq_host *h, unsigned int virq, | |||
| 404 | return 0; | 404 | return 0; |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | static int pci_irq_host_match(struct irq_host *h, struct device_node *node) | ||
| 408 | { | ||
| 409 | return h->of_node == node; | ||
| 410 | } | ||
| 411 | |||
| 412 | static struct irq_host_ops pci_irq_host_ops = { | 407 | static struct irq_host_ops pci_irq_host_ops = { |
| 413 | .match = pci_irq_host_match, | ||
| 414 | .map = pci_irq_host_map, | 408 | .map = pci_irq_host_map, |
| 415 | .xlate = pci_irq_host_xlate, | 409 | .xlate = pci_irq_host_xlate, |
| 416 | }; | 410 | }; |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index bf3766754173..5149716c734d 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
| @@ -215,11 +215,6 @@ out_unlock: | |||
| 215 | spin_unlock(&desc->lock); | 215 | spin_unlock(&desc->lock); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | static int uic_host_match(struct irq_host *h, struct device_node *node) | ||
| 219 | { | ||
| 220 | return h->of_node == node; | ||
| 221 | } | ||
| 222 | |||
| 223 | static int uic_host_map(struct irq_host *h, unsigned int virq, | 218 | static int uic_host_map(struct irq_host *h, unsigned int virq, |
| 224 | irq_hw_number_t hw) | 219 | irq_hw_number_t hw) |
| 225 | { | 220 | { |
| @@ -249,7 +244,6 @@ static int uic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
| 249 | } | 244 | } |
| 250 | 245 | ||
| 251 | static struct irq_host_ops uic_host_ops = { | 246 | static struct irq_host_ops uic_host_ops = { |
| 252 | .match = uic_host_match, | ||
| 253 | .map = uic_host_map, | 247 | .map = uic_host_map, |
| 254 | .xlate = uic_host_xlate, | 248 | .xlate = uic_host_xlate, |
| 255 | }; | 249 | }; |
