Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372391
b: refs/heads/master
c: 0fe3cb1
h: refs/heads/master
i:
  372389: ef982e9
  372387: 95ffccc
  372383: c5cb60f
v: v3
  • Loading branch information
Heiko Stuebner authored and Kukjin Kim committed Mar 7, 2013
1 parent 1ae83e9 commit 55d7480
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 502a29890cb10292f464beb802f7184c0d567ab8
refs/heads/master: 0fe3cb1ea5bf382cec946328ee25b233cab45c4d
22 changes: 8 additions & 14 deletions trunk/arch/arm/mach-s3c24xx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void s3c_irq_mask(struct irq_data *data)
mask |= (1UL << data->hwirq);
__raw_writel(mask, intc->reg_mask);

if (parent_intc && irq_data->parent_irq) {
if (parent_intc) {
parent_data = &parent_intc->irqs[irq_data->parent_irq];

/* check to see if we need to mask the parent IRQ */
Expand All @@ -105,7 +105,7 @@ static void s3c_irq_unmask(struct irq_data *data)
mask &= ~(1UL << data->hwirq);
__raw_writel(mask, intc->reg_mask);

if (parent_intc && irq_data->parent_irq) {
if (parent_intc) {
irqno = irq_find_mapping(parent_intc->domain,
irq_data->parent_irq);
s3c_irq_unmask(irq_get_irq_data(irqno));
Expand Down Expand Up @@ -327,6 +327,8 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
/* attach controller pointer to irq_data */
irq_data->intc = intc;

parent_intc = intc->parent;

/* set handler and flags */
switch (irq_data->type) {
case S3C_IRQTYPE_NONE:
Expand All @@ -335,24 +337,23 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
/* On the S3C2412, the EINT0to3 have a parent irq
* but need the s3c_irq_eint0t4 chip
*/
if (irq_data->parent_irq && (!soc_is_s3c2412() || hw >= 4))
if (parent_intc && (!soc_is_s3c2412() || hw >= 4))
irq_set_chip_and_handler(virq, &s3c_irqext_chip,
handle_edge_irq);
else
irq_set_chip_and_handler(virq, &s3c_irq_eint0t4,
handle_edge_irq);
break;
case S3C_IRQTYPE_EDGE:
if (irq_data->parent_irq ||
intc->reg_pending == S3C2416_SRCPND2)
if (parent_intc || intc->reg_pending == S3C2416_SRCPND2)
irq_set_chip_and_handler(virq, &s3c_irq_level_chip,
handle_edge_irq);
else
irq_set_chip_and_handler(virq, &s3c_irq_chip,
handle_edge_irq);
break;
case S3C_IRQTYPE_LEVEL:
if (irq_data->parent_irq)
if (parent_intc)
irq_set_chip_and_handler(virq, &s3c_irq_level_chip,
handle_level_irq);
else
Expand All @@ -365,14 +366,7 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
}
set_irq_flags(virq, IRQF_VALID);

if (irq_data->parent_irq) {
parent_intc = intc->parent;
if (!parent_intc) {
pr_err("irq-s3c24xx: no parent controller found for hwirq %lu\n",
hw);
goto err;
}

if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) {
if (irq_data->parent_irq > 31) {
pr_err("irq-s3c24xx: parent irq %lu is out of range\n",
irq_data->parent_irq);
Expand Down

0 comments on commit 55d7480

Please sign in to comment.