aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/irq
diff options
context:
space:
mode:
authorTakashi YOSHII <takasi-y@ops.dti.ne.jp>2006-12-25 04:35:24 -0500
committerPaul Mundt <lethal@linux-sh.org>2007-02-12 20:54:44 -0500
commitf725b5ee1e392ab1299c9317236cf736af1183ab (patch)
treeabb49db7adde9ba9ccf3fbb77348d9826134aa8c /arch/sh/kernel/cpu/irq
parent2c081e71baadccb4543815ef42c5290ac2961546 (diff)
sh: shmin updates.
This fixes up shmin (and SH7706/SH7708) IPR support for some of the recent API changes. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/irq')
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 35eb5751a3aa..210280b6fddf 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -43,16 +43,29 @@ static struct irq_chip ipr_irq_chip = {
43 .mask_ack = disable_ipr_irq, 43 .mask_ack = disable_ipr_irq,
44}; 44};
45 45
46unsigned int map_ipridx_to_addr(int idx) __attribute__ ((weak));
47unsigned int map_ipridx_to_addr(int idx)
48{
49 return 0;
50}
51
46void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) 52void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs)
47{ 53{
48 int i; 54 int i;
49 55
50 for (i = 0; i < nr_irqs; i++) { 56 for (i = 0; i < nr_irqs; i++) {
51 unsigned int irq = table[i].irq; 57 unsigned int irq = table[i].irq;
52 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx); 58
59 if (!irq)
60 irq = table[i].irq = i;
61
53 /* could the IPR index be mapped, if not we ignore this */ 62 /* could the IPR index be mapped, if not we ignore this */
54 if (table[i].addr == 0) 63 if (!table[i].addr) {
55 continue; 64 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx);
65 if (!table[i].addr)
66 continue;
67 }
68
56 disable_irq_nosync(irq); 69 disable_irq_nosync(irq);
57 set_irq_chip_and_handler_name(irq, &ipr_irq_chip, 70 set_irq_chip_and_handler_name(irq, &ipr_irq_chip,
58 handle_level_irq, "level"); 71 handle_level_irq, "level");