aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-12 21:59:11 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-12 21:59:11 -0500
commitbd1f7936ab5138d7e5e4f61bb4371e2994b2b2c5 (patch)
tree09e5424736112005c309fcd5cb572111f265197e /arch/powerpc
parent30aae739a9eb6db31ad7b08dac44bd302f41c709 (diff)
parentff82c587a9a4cb8796e7e04377155deba15ae18b (diff)
Merge commit 'gcl/gcl-next' into next
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/512x/clock.c4
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpio.c3
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c8
3 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c
index f416014ee727..1bcff94eb924 100644
--- a/arch/powerpc/platforms/512x/clock.c
+++ b/arch/powerpc/platforms/512x/clock.c
@@ -56,12 +56,12 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
56 int dev_match = 0; 56 int dev_match = 0;
57 int id_match = 0; 57 int id_match = 0;
58 58
59 if (dev == NULL && id == NULL) 59 if (dev == NULL || id == NULL)
60 return NULL; 60 return NULL;
61 61
62 mutex_lock(&clocks_mutex); 62 mutex_lock(&clocks_mutex);
63 list_for_each_entry(p, &clocks, node) { 63 list_for_each_entry(p, &clocks, node) {
64 if (dev && dev == p->dev) 64 if (dev == p->dev)
65 dev_match++; 65 dev_match++;
66 if (strcmp(id, p->name) == 0) 66 if (strcmp(id, p->name) == 0)
67 id_match++; 67 id_match++;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 8a455ebce98d..07f89ae46d04 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -363,11 +363,8 @@ static int mpc52xx_gpt_gpio_get(struct gpio_chip *gc, unsigned int gpio)
363{ 363{
364 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 364 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
365 struct mpc52xx_gpt __iomem *regs = mm_gc->regs; 365 struct mpc52xx_gpt __iomem *regs = mm_gc->regs;
366 unsigned int ret;
367 366
368 return (in_be32(&regs->status) & (1 << (31 - 23))) ? 1 : 0; 367 return (in_be32(&regs->status) & (1 << (31 - 23))) ? 1 : 0;
369
370 return ret;
371} 368}
372 369
373static void 370static void
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 72865e8e4b51..0a093f03c758 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -196,6 +196,7 @@ static void mpc52xx_extirq_ack(unsigned int virq)
196 196
197static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) 197static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
198{ 198{
199 struct irq_desc *desc = get_irq_desc(virq);
199 u32 ctrl_reg, type; 200 u32 ctrl_reg, type;
200 int irq; 201 int irq;
201 int l2irq; 202 int l2irq;
@@ -222,6 +223,11 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
222 type = 0; 223 type = 0;
223 } 224 }
224 225
226 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
227 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
228 if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
229 desc->status |= IRQ_LEVEL;
230
225 ctrl_reg = in_be32(&intr->ctrl); 231 ctrl_reg = in_be32(&intr->ctrl);
226 ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); 232 ctrl_reg &= ~(0x3 << (22 - (l2irq * 2)));
227 ctrl_reg |= (type << (22 - (l2irq * 2))); 233 ctrl_reg |= (type << (22 - (l2irq * 2)));
@@ -231,7 +237,7 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
231} 237}
232 238
233static struct irq_chip mpc52xx_extirq_irqchip = { 239static struct irq_chip mpc52xx_extirq_irqchip = {
234 .typename = " MPC52xx IRQ[0-3] ", 240 .typename = "MPC52xx External",
235 .mask = mpc52xx_extirq_mask, 241 .mask = mpc52xx_extirq_mask,
236 .unmask = mpc52xx_extirq_unmask, 242 .unmask = mpc52xx_extirq_unmask,
237 .ack = mpc52xx_extirq_ack, 243 .ack = mpc52xx_extirq_ack,