diff options
-rw-r--r-- | arch/m32r/platforms/mappi3/setup.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/arch/m32r/platforms/mappi3/setup.c b/arch/m32r/platforms/mappi3/setup.c index 74098142cb2c..b44f5ded2bbe 100644 --- a/arch/m32r/platforms/mappi3/setup.c +++ b/arch/m32r/platforms/mappi3/setup.c | |||
@@ -46,98 +46,98 @@ static void enable_mappi3_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_mappi3(unsigned int irq) | 49 | static void mask_mappi3(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_mappi3_irq(irq); | 51 | disable_mappi3_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_mappi3_irq(unsigned int irq) | 54 | static void unmask_mappi3(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_mappi3_irq(irq); | 56 | enable_mappi3_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_mappi3_irq(unsigned int irq) | 59 | static void shutdown_mappi3(struct irq_data *data) |
60 | { | ||
61 | enable_mappi3_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_mappi3_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip mappi3_irq_type = | 67 | static struct irq_chip mappi3_irq_type = { |
74 | { | 68 | .name = "MAPPI3-IRQ", |
75 | .name = "MAPPI3-IRQ", | 69 | .irq_shutdown = shutdown_mappi3, |
76 | .startup = startup_mappi3_irq, | 70 | .irq_mask = mask_mappi3, |
77 | .shutdown = shutdown_mappi3_irq, | 71 | .irq_unmask = unmask_mappi3, |
78 | .enable = enable_mappi3_irq, | ||
79 | .disable = disable_mappi3_irq, | ||
80 | .ack = mask_and_ack_mappi3, | ||
81 | .end = end_mappi3_irq | ||
82 | }; | 72 | }; |
83 | 73 | ||
84 | void __init init_IRQ(void) | 74 | void __init init_IRQ(void) |
85 | { | 75 | { |
86 | #if defined(CONFIG_SMC91X) | 76 | #if defined(CONFIG_SMC91X) |
87 | /* INT0 : LAN controller (SMC91111) */ | 77 | /* INT0 : LAN controller (SMC91111) */ |
88 | set_irq_chip(M32R_IRQ_INT0, &mappi3_irq_type); | 78 | set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, |
79 | handle_level_irq); | ||
89 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 80 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
90 | disable_mappi3_irq(M32R_IRQ_INT0); | 81 | disable_mappi3_irq(M32R_IRQ_INT0); |
91 | #endif /* CONFIG_SMC91X */ | 82 | #endif /* CONFIG_SMC91X */ |
92 | 83 | ||
93 | /* MFT2 : system timer */ | 84 | /* MFT2 : system timer */ |
94 | set_irq_chip(M32R_IRQ_MFT2, &mappi3_irq_type); | 85 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, |
86 | handle_level_irq); | ||
95 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 87 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
96 | disable_mappi3_irq(M32R_IRQ_MFT2); | 88 | disable_mappi3_irq(M32R_IRQ_MFT2); |
97 | 89 | ||
98 | #ifdef CONFIG_SERIAL_M32R_SIO | 90 | #ifdef CONFIG_SERIAL_M32R_SIO |
99 | /* SIO0_R : uart receive data */ | 91 | /* SIO0_R : uart receive data */ |
100 | set_irq_chip(M32R_IRQ_SIO0_R, &mappi3_irq_type); | 92 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, |
93 | handle_level_irq); | ||
101 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 94 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
102 | disable_mappi3_irq(M32R_IRQ_SIO0_R); | 95 | disable_mappi3_irq(M32R_IRQ_SIO0_R); |
103 | 96 | ||
104 | /* SIO0_S : uart send data */ | 97 | /* SIO0_S : uart send data */ |
105 | set_irq_chip(M32R_IRQ_SIO0_S, &mappi3_irq_type); | 98 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, |
99 | handle_level_irq); | ||
106 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 100 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
107 | disable_mappi3_irq(M32R_IRQ_SIO0_S); | 101 | disable_mappi3_irq(M32R_IRQ_SIO0_S); |
108 | /* SIO1_R : uart receive data */ | 102 | /* SIO1_R : uart receive data */ |
109 | set_irq_chip(M32R_IRQ_SIO1_R, &mappi3_irq_type); | 103 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, |
104 | handle_level_irq); | ||
110 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 105 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
111 | disable_mappi3_irq(M32R_IRQ_SIO1_R); | 106 | disable_mappi3_irq(M32R_IRQ_SIO1_R); |
112 | 107 | ||
113 | /* SIO1_S : uart send data */ | 108 | /* SIO1_S : uart send data */ |
114 | set_irq_chip(M32R_IRQ_SIO1_S, &mappi3_irq_type); | 109 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, |
110 | handle_level_irq); | ||
115 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 111 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
116 | disable_mappi3_irq(M32R_IRQ_SIO1_S); | 112 | disable_mappi3_irq(M32R_IRQ_SIO1_S); |
117 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ | 113 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ |
118 | 114 | ||
119 | #if defined(CONFIG_USB) | 115 | #if defined(CONFIG_USB) |
120 | /* INT1 : USB Host controller interrupt */ | 116 | /* INT1 : USB Host controller interrupt */ |
121 | set_irq_chip(M32R_IRQ_INT1, &mappi3_irq_type); | 117 | set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, |
118 | handle_level_irq); | ||
122 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 119 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; |
123 | disable_mappi3_irq(M32R_IRQ_INT1); | 120 | disable_mappi3_irq(M32R_IRQ_INT1); |
124 | #endif /* CONFIG_USB */ | 121 | #endif /* CONFIG_USB */ |
125 | 122 | ||
126 | /* CFC IREQ */ | 123 | /* CFC IREQ */ |
127 | set_irq_chip(PLD_IRQ_CFIREQ, &mappi3_irq_type); | 124 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, |
125 | handle_level_irq); | ||
128 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 126 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; |
129 | disable_mappi3_irq(PLD_IRQ_CFIREQ); | 127 | disable_mappi3_irq(PLD_IRQ_CFIREQ); |
130 | 128 | ||
131 | #if defined(CONFIG_M32R_CFC) | 129 | #if defined(CONFIG_M32R_CFC) |
132 | /* ICUCR41: CFC Insert & eject */ | 130 | /* ICUCR41: CFC Insert & eject */ |
133 | set_irq_chip(PLD_IRQ_CFC_INSERT, &mappi3_irq_type); | 131 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, |
132 | handle_level_irq); | ||
134 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 133 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; |
135 | disable_mappi3_irq(PLD_IRQ_CFC_INSERT); | 134 | disable_mappi3_irq(PLD_IRQ_CFC_INSERT); |
136 | 135 | ||
137 | #endif /* CONFIG_M32R_CFC */ | 136 | #endif /* CONFIG_M32R_CFC */ |
138 | 137 | ||
139 | /* IDE IREQ */ | 138 | /* IDE IREQ */ |
140 | set_irq_chip(PLD_IRQ_IDEIREQ, &mappi3_irq_type); | 139 | set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, |
140 | handle_level_irq); | ||
141 | icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 141 | icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
142 | disable_mappi3_irq(PLD_IRQ_IDEIREQ); | 142 | disable_mappi3_irq(PLD_IRQ_IDEIREQ); |
143 | 143 | ||