diff options
| author | Magnus Damm <damm@igel.co.jp> | 2008-01-10 00:08:55 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:19:02 -0500 |
| commit | 7f3edee81fbd49114c28057512906f169caa0bed (patch) | |
| tree | d1c604fc6cddcd42f00eff1d153e8151ef00ba07 | |
| parent | b62ad83d91ebf1368e9e72d476b18698ac67bef9 (diff) | |
sh: intc - remove default interrupt priority tables
This patch removes interrupt priority tables from the intc code.
Optimal priority assignment varies with embedded application anyway,
so keeping the interrupt priority tables together with cpu-specific
code doesn't make sense.
The function intc_set_priority() should be used instead to set the
desired interrupt priority level.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7780mp.c | 2 | ||||
| -rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7785rp.c | 2 | ||||
| -rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/irq.c | 4 | ||||
| -rw-r--r-- | arch/sh/cchips/voyagergx/irq.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/irq/intc.c | 31 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh2/setup-sh7619.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7705.c | 10 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh770x.c | 11 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7710.c | 16 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7720.c | 14 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7750.c | 18 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7760.c | 13 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 10 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 13 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 19 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-shx3.c | 14 | ||||
| -rw-r--r-- | include/asm-sh/hw_irq.h | 12 |
19 files changed, 42 insertions, 155 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c index 59b47fe061f9..1f8f073f27be 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c | |||
| @@ -47,7 +47,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = { | |||
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors, | 49 | static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors, |
| 50 | NULL, NULL, mask_registers, NULL, NULL); | 50 | NULL, mask_registers, NULL, NULL); |
| 51 | 51 | ||
| 52 | unsigned char * __init highlander_init_irq_r7780mp(void) | 52 | unsigned char * __init highlander_init_irq_r7780mp(void) |
| 53 | { | 53 | { |
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c index b2c6a84673bd..bbf18afc29a7 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c | |||
| @@ -41,7 +41,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = { | |||
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors, | 43 | static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors, |
| 44 | NULL, NULL, mask_registers, NULL, NULL); | 44 | NULL, mask_registers, NULL, NULL); |
| 45 | 45 | ||
| 46 | unsigned char * __init highlander_init_irq_r7785rp(void) | 46 | unsigned char * __init highlander_init_irq_r7785rp(void) |
| 47 | { | 47 | { |
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index 7cc2813adfe4..3fecd49e0d2a 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c | |||
| @@ -71,7 +71,7 @@ static unsigned char irl2irq_r2d_1[R2D_NR_IRL] __initdata = { | |||
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | static DECLARE_INTC_DESC(intc_desc_r2d_1, "r2d-1", vectors_r2d_1, | 73 | static DECLARE_INTC_DESC(intc_desc_r2d_1, "r2d-1", vectors_r2d_1, |
| 74 | NULL, NULL, mask_registers_r2d_1, NULL, NULL); | 74 | NULL, mask_registers_r2d_1, NULL, NULL); |
| 75 | 75 | ||
| 76 | #endif /* CONFIG_RTS7751R2D_1 */ | 76 | #endif /* CONFIG_RTS7751R2D_1 */ |
| 77 | 77 | ||
| @@ -109,7 +109,7 @@ static unsigned char irl2irq_r2d_plus[R2D_NR_IRL] __initdata = { | |||
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | static DECLARE_INTC_DESC(intc_desc_r2d_plus, "r2d-plus", vectors_r2d_plus, | 111 | static DECLARE_INTC_DESC(intc_desc_r2d_plus, "r2d-plus", vectors_r2d_plus, |
| 112 | NULL, NULL, mask_registers_r2d_plus, NULL, NULL); | 112 | NULL, mask_registers_r2d_plus, NULL, NULL); |
| 113 | 113 | ||
| 114 | #endif /* CONFIG_RTS7751R2D_PLUS */ | 114 | #endif /* CONFIG_RTS7751R2D_PLUS */ |
| 115 | 115 | ||
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index ade303876841..e7e78c612fad 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
| @@ -58,7 +58,7 @@ static struct intc_mask_reg mask_registers[] __initdata = { | |||
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | static DECLARE_INTC_DESC(intc_desc, "voyagergx", vectors, | 60 | static DECLARE_INTC_DESC(intc_desc, "voyagergx", vectors, |
| 61 | NULL, NULL, mask_registers, NULL, NULL); | 61 | NULL, mask_registers, NULL, NULL); |
| 62 | 62 | ||
| 63 | static unsigned int voyagergx_stat2irq[32] = { | 63 | static unsigned int voyagergx_stat2irq[32] = { |
| 64 | IRQ_SM501_CI, IRQ_SM501_PV, IRQ_SM501_ZD, IRQ_SM501_2D, | 64 | IRQ_SM501_CI, IRQ_SM501_PV, IRQ_SM501_ZD, IRQ_SM501_2D, |
diff --git a/arch/sh/kernel/cpu/irq/intc.c b/arch/sh/kernel/cpu/irq/intc.c index 6ac018c15e03..84806b2027f8 100644 --- a/arch/sh/kernel/cpu/irq/intc.c +++ b/arch/sh/kernel/cpu/irq/intc.c | |||
| @@ -335,31 +335,6 @@ static intc_enum __init intc_grp_id(struct intc_desc *desc, | |||
| 335 | return 0; | 335 | return 0; |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | static unsigned int __init intc_prio_value(struct intc_desc *desc, | ||
| 339 | intc_enum enum_id, int do_grps) | ||
| 340 | { | ||
| 341 | struct intc_prio *p = desc->priorities; | ||
| 342 | unsigned int i; | ||
| 343 | |||
| 344 | for (i = 0; p && enum_id && i < desc->nr_priorities; i++) { | ||
| 345 | p = desc->priorities + i; | ||
| 346 | |||
| 347 | if (p->enum_id != enum_id) | ||
| 348 | continue; | ||
| 349 | |||
| 350 | return p->priority; | ||
| 351 | } | ||
| 352 | |||
| 353 | if (do_grps) | ||
| 354 | return intc_prio_value(desc, intc_grp_id(desc, enum_id), 0); | ||
| 355 | |||
| 356 | /* default to the lowest priority possible if no priority is set | ||
| 357 | * - this needs to be at least 2 for 5-bit priorities on 7780 | ||
| 358 | */ | ||
| 359 | |||
| 360 | return 2; | ||
| 361 | } | ||
| 362 | |||
| 363 | static unsigned int __init intc_mask_data(struct intc_desc *desc, | 338 | static unsigned int __init intc_mask_data(struct intc_desc *desc, |
| 364 | struct intc_desc_int *d, | 339 | struct intc_desc_int *d, |
| 365 | intc_enum enum_id, int do_grps) | 340 | intc_enum enum_id, int do_grps) |
| @@ -518,8 +493,10 @@ static void __init intc_register_irq(struct intc_desc *desc, | |||
| 518 | handle_level_irq, "level"); | 493 | handle_level_irq, "level"); |
| 519 | set_irq_chip_data(irq, (void *)data[primary]); | 494 | set_irq_chip_data(irq, (void *)data[primary]); |
| 520 | 495 | ||
| 521 | /* record the desired priority level */ | 496 | /* set priority level |
| 522 | intc_prio_level[irq] = intc_prio_value(desc, enum_id, 1); | 497 | * - this needs to be at least 2 for 5-bit priorities on 7780 |
| 498 | */ | ||
| 499 | intc_prio_level[irq] = 2; | ||
| 523 | 500 | ||
| 524 | /* enable secondary masking method if present */ | 501 | /* enable secondary masking method if present */ |
| 525 | if (data[!primary]) | 502 | if (data[!primary]) |
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index ec6adc3f306f..b230eb278cef 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
| @@ -65,7 +65,7 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, groups, | 67 | static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, groups, |
| 68 | NULL, NULL, prio_registers, NULL); | 68 | NULL, prio_registers, NULL); |
| 69 | 69 | ||
| 70 | static struct plat_sci_port sci_platform_data[] = { | 70 | static struct plat_sci_port sci_platform_data[] = { |
| 71 | { | 71 | { |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index 3518f9c37d93..db6ef5cecde1 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |||
| @@ -235,7 +235,7 @@ static struct intc_mask_reg mask_registers[] __initdata = { | |||
| 235 | }; | 235 | }; |
| 236 | 236 | ||
| 237 | static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, | 237 | static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, |
| 238 | NULL, mask_registers, prio_registers, NULL); | 238 | mask_registers, prio_registers, NULL); |
| 239 | 239 | ||
| 240 | static struct plat_sci_port sci_platform_data[] = { | 240 | static struct plat_sci_port sci_platform_data[] = { |
| 241 | { | 241 | { |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index bd745aa87222..a564425b905f 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c | |||
| @@ -167,7 +167,7 @@ static struct intc_mask_reg mask_registers[] __initdata = { | |||
| 167 | }; | 167 | }; |
| 168 | 168 | ||
| 169 | static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups, | 169 | static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups, |
| 170 | NULL, mask_registers, prio_registers, NULL); | 170 | mask_registers, prio_registers, NULL); |
| 171 | 171 | ||
| 172 | static struct plat_sci_port sci_platform_data[] = { | 172 | static struct plat_sci_port sci_platform_data[] = { |
| 173 | { | 173 | { |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index f6c65f2659e9..dd0a20a685f7 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh | |||
