Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173443
b: refs/heads/master
c: 9b798d5
h: refs/heads/master
i:
  173441: f048469
  173439: 2f7c7f3
v: v3
  • Loading branch information
Paul Mundt committed Oct 27, 2009
1 parent 51d86a5 commit 7055266
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 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: 0a993b0a290a2672500000b0ce811efc093f8467
refs/heads/master: 9b798d50df3a98d22a6cbae565d9f4f630d161a6
14 changes: 1 addition & 13 deletions trunk/drivers/sh/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ static LIST_HEAD(intc_list);
#endif

static unsigned int intc_prio_level[NR_IRQS]; /* for now */
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
static unsigned long ack_handle[NR_IRQS];
#endif

static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
{
Expand Down Expand Up @@ -250,7 +248,6 @@ static int intc_set_wake(unsigned int irq, unsigned int on)
return 0; /* allow wakeup, but setup hardware in intc_suspend() */
}

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
static void intc_mask_ack(unsigned int irq)
{
struct intc_desc_int *d = get_intc_desc(irq);
Expand Down Expand Up @@ -282,7 +279,6 @@ static void intc_mask_ack(unsigned int irq)
}
}
}
#endif

static struct intc_handle_int *intc_find_irq(struct intc_handle_int *hp,
unsigned int nr_hp,
Expand Down Expand Up @@ -501,7 +497,6 @@ static unsigned int __init intc_prio_data(struct intc_desc *desc,
return 0;
}

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
static unsigned int __init intc_ack_data(struct intc_desc *desc,
struct intc_desc_int *d,
intc_enum enum_id)
Expand Down Expand Up @@ -533,7 +528,6 @@ static unsigned int __init intc_ack_data(struct intc_desc *desc,

return 0;
}
#endif

static unsigned int __init intc_sense_data(struct intc_desc *desc,
struct intc_desc_int *d,
Expand Down Expand Up @@ -641,10 +635,8 @@ static void __init intc_register_irq(struct intc_desc *desc,
/* irq should be disabled by default */
d->chip.mask(irq);

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
if (desc->ack_regs)
ack_handle[irq] = intc_ack_data(desc, d, enum_id);
#endif
}

static unsigned int __init save_reg(struct intc_desc_int *d,
Expand Down Expand Up @@ -681,10 +673,8 @@ void __init register_intc_controller(struct intc_desc *desc)
d->nr_reg = desc->mask_regs ? desc->nr_mask_regs * 2 : 0;
d->nr_reg += desc->prio_regs ? desc->nr_prio_regs * 2 : 0;
d->nr_reg += desc->sense_regs ? desc->nr_sense_regs : 0;

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0;
#endif

d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT);
#ifdef CONFIG_SMP
d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT);
Expand Down Expand Up @@ -727,14 +717,12 @@ void __init register_intc_controller(struct intc_desc *desc)
d->chip.set_type = intc_set_sense;
d->chip.set_wake = intc_set_wake;

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
if (desc->ack_regs) {
for (i = 0; i < desc->nr_ack_regs; i++)
k += save_reg(d, k, desc->ack_regs[i].set_reg, 0);

d->chip.mask_ack = intc_mask_ack;
}
#endif

BUG_ON(k > 256); /* _INTC_ADDR_E() and _INTC_ADDR_D() are 8 bits */

Expand Down
4 changes: 0 additions & 4 deletions trunk/include/linux/sh_intc.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ struct intc_desc {
struct intc_sense_reg *sense_regs;
unsigned int nr_sense_regs;
char *name;
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
struct intc_mask_reg *ack_regs;
unsigned int nr_ack_regs;
#endif
};

#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
Expand All @@ -73,7 +71,6 @@ struct intc_desc symbol __initdata = { \
chipname, \
}

#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
mask_regs, prio_regs, sense_regs, ack_regs) \
struct intc_desc symbol __initdata = { \
Expand All @@ -83,7 +80,6 @@ struct intc_desc symbol __initdata = { \
chipname, \
_INTC_ARRAY(ack_regs), \
}
#endif

void __init register_intc_controller(struct intc_desc *desc);
int intc_set_priority(unsigned int irq, unsigned int prio);
Expand Down

0 comments on commit 7055266

Please sign in to comment.