diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:03:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:03:34 -0400 |
commit | 8599cf059209de22dd3be16816b90f1aad10c74a (patch) | |
tree | 8cd5bdec25431a2797147c3eea11532ec71b6272 /arch/sh/boards/renesas | |
parent | ba463937ef75bceaf3943edf01f849257c68623a (diff) |
sh: Cleanup IRQ disabling for hardirq handlers.
The generic hardirq layer already takes care of a lot of the
appropriate locking and disabling for us, no need to duplicate
it in the handlers..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/systemh/irq.c | 8 |
4 files changed, 0 insertions, 26 deletions
diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c index 705b7ddcb0d2..c617b188258a 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c | |||
@@ -35,30 +35,24 @@ static unsigned int startup_hs7751rvoip_irq(unsigned int irq) | |||
35 | 35 | ||
36 | static void disable_hs7751rvoip_irq(unsigned int irq) | 36 | static void disable_hs7751rvoip_irq(unsigned int irq) |
37 | { | 37 | { |
38 | unsigned long flags; | ||
39 | unsigned short val; | 38 | unsigned short val; |
40 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); | 39 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); |
41 | 40 | ||
42 | /* Set the priority in IPR to 0 */ | 41 | /* Set the priority in IPR to 0 */ |
43 | local_irq_save(flags); | ||
44 | val = ctrl_inw(IRLCNTR3); | 42 | val = ctrl_inw(IRLCNTR3); |
45 | val &= mask; | 43 | val &= mask; |
46 | ctrl_outw(val, IRLCNTR3); | 44 | ctrl_outw(val, IRLCNTR3); |
47 | local_irq_restore(flags); | ||
48 | } | 45 | } |
49 | 46 | ||
50 | static void enable_hs7751rvoip_irq(unsigned int irq) | 47 | static void enable_hs7751rvoip_irq(unsigned int irq) |
51 | { | 48 | { |
52 | unsigned long flags; | ||
53 | unsigned short val; | 49 | unsigned short val; |
54 | unsigned short value = (0x0001 << mask_pos[irq]); | 50 | unsigned short value = (0x0001 << mask_pos[irq]); |
55 | 51 | ||
56 | /* Set priority in IPR back to original value */ | 52 | /* Set priority in IPR back to original value */ |
57 | local_irq_save(flags); | ||
58 | val = ctrl_inw(IRLCNTR3); | 53 | val = ctrl_inw(IRLCNTR3); |
59 | val |= value; | 54 | val |= value; |
60 | ctrl_outw(val, IRLCNTR3); | 55 | ctrl_outw(val, IRLCNTR3); |
61 | local_irq_restore(flags); | ||
62 | } | 56 | } |
63 | 57 | ||
64 | static void ack_hs7751rvoip_irq(unsigned int irq) | 58 | static void ack_hs7751rvoip_irq(unsigned int irq) |
diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c index c7b9fe6e640d..61d5e5d3c294 100644 --- a/arch/sh/boards/renesas/r7780rp/irq.c +++ b/arch/sh/boards/renesas/r7780rp/irq.c | |||
@@ -39,30 +39,24 @@ static unsigned int startup_r7780rp_irq(unsigned int irq) | |||
39 | 39 | ||
40 | static void disable_r7780rp_irq(unsigned int irq) | 40 | static void disable_r7780rp_irq(unsigned int irq) |
41 | { | 41 | { |
42 | unsigned long flags; | ||
43 | unsigned short val; | 42 | unsigned short val; |
44 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); | 43 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); |
45 | 44 | ||
46 | /* Set the priority in IPR to 0 */ | 45 | /* Set the priority in IPR to 0 */ |
47 | local_irq_save(flags); | ||
48 | val = ctrl_inw(IRLCNTR1); | 46 | val = ctrl_inw(IRLCNTR1); |
49 | val &= mask; | 47 | val &= mask; |
50 | ctrl_outw(val, IRLCNTR1); | 48 | ctrl_outw(val, IRLCNTR1); |
51 | local_irq_restore(flags); | ||
52 | } | 49 | } |
53 | 50 | ||
54 | static void enable_r7780rp_irq(unsigned int irq) | 51 | static void enable_r7780rp_irq(unsigned int irq) |
55 | { | 52 | { |
56 | unsigned long flags; | ||
57 | unsigned short val; | 53 | unsigned short val; |
58 | unsigned short value = (0x0001 << mask_pos[irq]); | 54 | unsigned short value = (0x0001 << mask_pos[irq]); |
59 | 55 | ||
60 | /* Set priority in IPR back to original value */ | 56 | /* Set priority in IPR back to original value */ |
61 | local_irq_save(flags); | ||
62 | val = ctrl_inw(IRLCNTR1); | 57 | val = ctrl_inw(IRLCNTR1); |
63 | val |= value; | 58 | val |= value; |
64 | ctrl_outw(val, IRLCNTR1); | 59 | ctrl_outw(val, IRLCNTR1); |
65 | local_irq_restore(flags); | ||
66 | } | 60 | } |
67 | 61 | ||
68 | static void ack_r7780rp_irq(unsigned int irq) | 62 | static void ack_r7780rp_irq(unsigned int irq) |
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index 154535440bbf..c915e7a3693a 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c | |||
@@ -41,30 +41,24 @@ static unsigned int startup_rts7751r2d_irq(unsigned int irq) | |||
41 | 41 | ||
42 | static void disable_rts7751r2d_irq(unsigned int irq) | 42 | static void disable_rts7751r2d_irq(unsigned int irq) |
43 | { | 43 | { |
44 | unsigned long flags; | ||
45 | unsigned short val; | 44 | unsigned short val; |
46 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); | 45 | unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); |
47 | 46 | ||
48 | /* Set the priority in IPR to 0 */ | 47 | /* Set the priority in IPR to 0 */ |
49 | local_irq_save(flags); | ||
50 | val = ctrl_inw(IRLCNTR1); | 48 | val = ctrl_inw(IRLCNTR1); |
51 | val &= mask; | 49 | val &= mask; |
52 | ctrl_outw(val, IRLCNTR1); | 50 | ctrl_outw(val, IRLCNTR1); |
53 | local_irq_restore(flags); | ||
54 | } | 51 | } |
55 | 52 | ||
56 | static void enable_rts7751r2d_irq(unsigned int irq) | 53 | static void enable_rts7751r2d_irq(unsigned int irq) |
57 | { | 54 | { |
58 | unsigned long flags; | ||
59 | unsigned short val; | 55 | unsigned short val; |
60 | unsigned short value = (0x0001 << mask_pos[irq]); | 56 | unsigned short value = (0x0001 << mask_pos[irq]); |
61 | 57 | ||
62 | /* Set priority in IPR back to original value */ | 58 | /* Set priority in IPR back to original value */ |
63 | local_irq_save(flags); | ||
64 | val = ctrl_inw(IRLCNTR1); | 59 | val = ctrl_inw(IRLCNTR1); |
65 | val |= value; | 60 | val |= value; |
66 | ctrl_outw(val, IRLCNTR1); | 61 | ctrl_outw(val, IRLCNTR1); |
67 | local_irq_restore(flags); | ||
68 | } | 62 | } |
69 | 63 | ||
70 | int rts7751r2d_irq_demux(int irq) | 64 | int rts7751r2d_irq_demux(int irq) |
diff --git a/arch/sh/boards/renesas/systemh/irq.c b/arch/sh/boards/renesas/systemh/irq.c index 53731a0abb8f..8d016dae2333 100644 --- a/arch/sh/boards/renesas/systemh/irq.c +++ b/arch/sh/boards/renesas/systemh/irq.c | |||
@@ -57,12 +57,9 @@ static void shutdown_systemh_irq(unsigned int irq) | |||
57 | static void disable_systemh_irq(unsigned int irq) | 57 | static void disable_systemh_irq(unsigned int irq) |
58 | { | 58 | { |
59 | if (systemh_irq_mask_register) { | 59 | if (systemh_irq_mask_register) { |
60 | unsigned long flags; | ||
61 | unsigned long val, mask = 0x01 << 1; | 60 | unsigned long val, mask = 0x01 << 1; |
62 | 61 | ||
63 | /* Clear the "irq"th bit in the mask and set it in the request */ | 62 | /* Clear the "irq"th bit in the mask and set it in the request */ |
64 | local_irq_save(flags); | ||
65 | |||
66 | val = ctrl_inl((unsigned long)systemh_irq_mask_register); | 63 | val = ctrl_inl((unsigned long)systemh_irq_mask_register); |
67 | val &= ~mask; | 64 | val &= ~mask; |
68 | ctrl_outl(val, (unsigned long)systemh_irq_mask_register); | 65 | ctrl_outl(val, (unsigned long)systemh_irq_mask_register); |
@@ -70,23 +67,18 @@ static void disable_systemh_irq(unsigned int irq) | |||
70 | val = ctrl_inl((unsigned long)systemh_irq_request_register); | 67 | val = ctrl_inl((unsigned long)systemh_irq_request_register); |
71 | val |= mask; | 68 | val |= mask; |
72 | ctrl_outl(val, (unsigned long)systemh_irq_request_register); | 69 | ctrl_outl(val, (unsigned long)systemh_irq_request_register); |
73 | |||
74 | local_irq_restore(flags); | ||
75 | } | 70 | } |
76 | } | 71 | } |
77 | 72 | ||
78 | static void enable_systemh_irq(unsigned int irq) | 73 | static void enable_systemh_irq(unsigned int irq) |
79 | { | 74 | { |
80 | if (systemh_irq_mask_register) { | 75 | if (systemh_irq_mask_register) { |
81 | unsigned long flags; | ||
82 | unsigned long val, mask = 0x01 << 1; | 76 | unsigned long val, mask = 0x01 << 1; |
83 | 77 | ||
84 | /* Set "irq"th bit in the mask register */ | 78 | /* Set "irq"th bit in the mask register */ |
85 | local_irq_save(flags); | ||
86 | val = ctrl_inl((unsigned long)systemh_irq_mask_register); | 79 | val = ctrl_inl((unsigned long)systemh_irq_mask_register); |
87 | val |= mask; | 80 | val |= mask; |
88 | ctrl_outl(val, (unsigned long)systemh_irq_mask_register); | 81 | ctrl_outl(val, (unsigned long)systemh_irq_mask_register); |
89 | local_irq_restore(flags); | ||
90 | } | 82 | } |
91 | } | 83 | } |
92 | 84 | ||