aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-08 17:26:53 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:03:59 -0500
commit0bf8878e337a12d33649443a52e3b07a0a805a09 (patch)
tree0a1e32c4a63430644909f3cc3aad244fdb21a198 /arch/powerpc
parent468eb1ad9afa6c470d5e7881c20bdaf3d1a20c8a (diff)
powerpc: platforms/embedded6xx irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/embedded6xx/flipper-pic.c32
-rw-r--r--arch/powerpc/platforms/embedded6xx/hlwd-pic.c41
2 files changed, 37 insertions, 36 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
index c278bd3a8fec..0aca0e28a8e5 100644
--- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
@@ -46,10 +46,10 @@
46 * 46 *
47 */ 47 */
48 48
49static void flipper_pic_mask_and_ack(unsigned int virq) 49static void flipper_pic_mask_and_ack(struct irq_data *d)
50{ 50{
51 int irq = virq_to_hw(virq); 51 int irq = virq_to_hw(d->irq);
52 void __iomem *io_base = get_irq_chip_data(virq); 52 void __iomem *io_base = irq_data_get_irq_chip_data(d);
53 u32 mask = 1 << irq; 53 u32 mask = 1 << irq;
54 54
55 clrbits32(io_base + FLIPPER_IMR, mask); 55 clrbits32(io_base + FLIPPER_IMR, mask);
@@ -57,27 +57,27 @@ static void flipper_pic_mask_and_ack(unsigned int virq)
57 out_be32(io_base + FLIPPER_ICR, mask); 57 out_be32(io_base + FLIPPER_ICR, mask);
58} 58}
59 59
60static void flipper_pic_ack(unsigned int virq) 60static void flipper_pic_ack(struct irq_data *d)
61{ 61{
62 int irq = virq_to_hw(virq); 62 int irq = virq_to_hw(d->irq);
63 void __iomem *io_base = get_irq_chip_data(virq); 63 void __iomem *io_base = irq_data_get_irq_chip_data(d);
64 64
65 /* this is at least needed for RSW */ 65 /* this is at least needed for RSW */
66 out_be32(io_base + FLIPPER_ICR, 1 << irq); 66 out_be32(io_base + FLIPPER_ICR, 1 << irq);
67} 67}
68 68
69static void flipper_pic_mask(unsigned int virq) 69static void flipper_pic_mask(struct irq_data *d)
70{ 70{
71 int irq = virq_to_hw(virq); 71 int irq = virq_to_hw(d->irq);
72 void __iomem *io_base = get_irq_chip_data(virq); 72 void __iomem *io_base = irq_data_get_irq_chip_data(d);
73 73
74 clrbits32(io_base + FLIPPER_IMR, 1 << irq); 74 clrbits32(io_base + FLIPPER_IMR, 1 << irq);
75} 75}
76 76
77static void flipper_pic_unmask(unsigned int virq) 77static void flipper_pic_unmask(struct irq_data *d)
78{ 78{
79 int irq = virq_to_hw(virq); 79 int irq = virq_to_hw(d->irq);
80 void __iomem *io_base = get_irq_chip_data(virq); 80 void __iomem *io_base = irq_data_get_irq_chip_data(d);
81 81
82 setbits32(io_base + FLIPPER_IMR, 1 << irq); 82 setbits32(io_base + FLIPPER_IMR, 1 << irq);
83} 83}
@@ -85,10 +85,10 @@ static void flipper_pic_unmask(unsigned int virq)
85 85
86static struct irq_chip flipper_pic = { 86static struct irq_chip flipper_pic = {
87 .name = "flipper-pic", 87 .name = "flipper-pic",
88 .ack = flipper_pic_ack, 88 .irq_ack = flipper_pic_ack,
89 .mask_ack = flipper_pic_mask_and_ack, 89 .irq_mask_ack = flipper_pic_mask_and_ack,
90 .mask = flipper_pic_mask, 90 .irq_mask = flipper_pic_mask,
91 .unmask = flipper_pic_unmask, 91 .irq_unmask = flipper_pic_unmask,
92}; 92};
93 93
94/* 94/*
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index a771f91e215b..35e448bd8479 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -41,36 +41,36 @@
41 * 41 *
42 */ 42 */
43 43
44static void hlwd_pic_mask_and_ack(unsigned int virq) 44static void hlwd_pic_mask_and_ack(struct irq_data *d)
45{ 45{
46 int irq = virq_to_hw(virq); 46 int irq = virq_to_hw(d->irq);
47 void __iomem *io_base = get_irq_chip_data(virq); 47 void __iomem *io_base = irq_data_get_irq_chip_data(d);
48 u32 mask = 1 << irq; 48 u32 mask = 1 << irq;
49 49
50 clrbits32(io_base + HW_BROADWAY_IMR, mask); 50 clrbits32(io_base + HW_BROADWAY_IMR, mask);
51 out_be32(io_base + HW_BROADWAY_ICR, mask); 51 out_be32(io_base + HW_BROADWAY_ICR, mask);
52} 52}
53 53
54static void hlwd_pic_ack(unsigned int virq) 54static void hlwd_pic_ack(struct irq_data *d)
55{ 55{
56 int irq = virq_to_hw(virq); 56 int irq = virq_to_hw(d->irq);
57 void __iomem *io_base = get_irq_chip_data(virq); 57 void __iomem *io_base = irq_data_get_irq_chip_data(d);
58 58
59 out_be32(io_base + HW_BROADWAY_ICR, 1 << irq); 59 out_be32(io_base + HW_BROADWAY_ICR, 1 << irq);
60} 60}
61 61
62static void hlwd_pic_mask(unsigned int virq) 62static void hlwd_pic_mask(struct irq_data *d)
63{ 63{
64 int irq = virq_to_hw(virq); 64 int irq = virq_to_hw(d->irq);
65 void __iomem *io_base = get_irq_chip_data(virq); 65 void __iomem *io_base = irq_data_get_irq_chip_data(d);
66 66
67 clrbits32(io_base + HW_BROADWAY_IMR, 1 << irq); 67 clrbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
68} 68}
69 69
70static void hlwd_pic_unmask(unsigned int virq) 70static void hlwd_pic_unmask(struct irq_data *d)
71{ 71{
72 int irq = virq_to_hw(virq); 72 int irq = virq_to_hw(d->irq);
73 void __iomem *io_base = get_irq_chip_data(virq); 73 void __iomem *io_base = irq_data_get_irq_chip_data(d);
74 74
75 setbits32(io_base + HW_BROADWAY_IMR, 1 << irq); 75 setbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
76} 76}
@@ -78,10 +78,10 @@ static void hlwd_pic_unmask(unsigned int virq)
78 78
79static struct irq_chip hlwd_pic = { 79static struct irq_chip hlwd_pic = {
80 .name = "hlwd-pic", 80 .name = "hlwd-pic",
81 .ack = hlwd_pic_ack, 81 .irq_ack = hlwd_pic_ack,
82 .mask_ack = hlwd_pic_mask_and_ack, 82 .irq_mask_ack = hlwd_pic_mask_and_ack,
83 .mask = hlwd_pic_mask, 83 .irq_mask = hlwd_pic_mask,
84 .unmask = hlwd_pic_unmask, 84 .irq_unmask = hlwd_pic_unmask,
85}; 85};
86 86
87/* 87/*
@@ -129,11 +129,12 @@ static unsigned int __hlwd_pic_get_irq(struct irq_host *h)
129static void hlwd_pic_irq_cascade(unsigned int cascade_virq, 129static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
130 struct irq_desc *desc) 130 struct irq_desc *desc)
131{ 131{
132 struct irq_chip *chip = get_irq_desc_chip(desc);
132 struct irq_host *irq_host = get_irq_data(cascade_virq); 133 struct irq_host *irq_host = get_irq_data(cascade_virq);
133 unsigned int virq; 134 unsigned int virq;
134 135
135 raw_spin_lock(&desc->lock); 136 raw_spin_lock(&desc->lock);
136 desc->chip->mask(cascade_virq); /* IRQ_LEVEL */ 137 chip->irq_mask(&desc->irq_data); /* IRQ_LEVEL */
137 raw_spin_unlock(&desc->lock); 138 raw_spin_unlock(&desc->lock);
138 139
139 virq = __hlwd_pic_get_irq(irq_host); 140 virq = __hlwd_pic_get_irq(irq_host);
@@ -143,9 +144,9 @@ static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
143 pr_err("spurious interrupt!\n"); 144 pr_err("spurious interrupt!\n");
144 145
145 raw_spin_lock(&desc->lock); 146 raw_spin_lock(&desc->lock);
146 desc->chip->ack(cascade_virq); /* IRQ_LEVEL */ 147 chip->irq_ack(&desc->irq_data); /* IRQ_LEVEL */
147 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) 148 if (!(desc->status & IRQ_DISABLED) && chip->irq_unmask)
148 desc->chip->unmask(cascade_virq); 149 chip->irq_unmask(&desc->irq_data);
149 raw_spin_unlock(&desc->lock); 150 raw_spin_unlock(&desc->lock);
150} 151}
151 152