@@ -49,10 +49,6 @@ enum reset_type {
49
49
RESET_TYPE_ULP2 = 8 ,
50
50
};
51
51
52
- struct at91_reset_data {
53
- u32 args ;
54
- };
55
-
56
52
struct at91_reset {
57
53
void __iomem * rstc_base ;
58
54
void __iomem * ramc_base [2 ];
@@ -156,50 +152,36 @@ static const struct of_device_id at91_ramc_of_match[] = {
156
152
{ /* sentinel */ }
157
153
};
158
154
159
- static const struct at91_reset_data at91sam9260_reset_data = {
160
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST ,
161
- };
162
-
163
- static const struct at91_reset_data at91sam9g45_reset_data = {
164
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST ,
165
- };
166
-
167
- static const struct at91_reset_data sama5d3_reset_data = {
168
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST ,
169
- };
170
-
171
- static const struct at91_reset_data samx7_reset_data = {
172
- .args = AT91_RSTC_KEY | AT91_RSTC_PROCRST ,
173
- };
174
-
175
155
static const struct of_device_id at91_reset_of_match [] = {
176
156
{
177
157
.compatible = "atmel,at91sam9260-rstc" ,
178
- .data = & at91sam9260_reset_data
158
+ .data = (void * )(AT91_RSTC_KEY | AT91_RSTC_PERRST |
159
+ AT91_RSTC_PROCRST ),
179
160
},
180
161
{
181
162
.compatible = "atmel,at91sam9g45-rstc" ,
182
- .data = & at91sam9g45_reset_data
163
+ .data = (void * )(AT91_RSTC_KEY | AT91_RSTC_PERRST |
164
+ AT91_RSTC_PROCRST )
183
165
},
184
166
{
185
167
.compatible = "atmel,sama5d3-rstc" ,
186
- .data = & sama5d3_reset_data
168
+ .data = (void * )(AT91_RSTC_KEY | AT91_RSTC_PERRST |
169
+ AT91_RSTC_PROCRST )
187
170
},
188
171
{
189
172
.compatible = "atmel,samx7-rstc" ,
190
- .data = & samx7_reset_data
173
+ .data = ( void * )( AT91_RSTC_KEY | AT91_RSTC_PROCRST )
191
174
},
192
175
{
193
176
.compatible = "microchip,sam9x60-rstc" ,
194
- .data = & samx7_reset_data
177
+ .data = ( void * )( AT91_RSTC_KEY | AT91_RSTC_PROCRST )
195
178
},
196
179
{ /* sentinel */ }
197
180
};
198
181
MODULE_DEVICE_TABLE (of , at91_reset_of_match );
199
182
200
183
static int __init at91_reset_probe (struct platform_device * pdev )
201
184
{
202
- const struct at91_reset_data * reset_data ;
203
185
const struct of_device_id * match ;
204
186
struct at91_reset * reset ;
205
187
struct device_node * np ;
@@ -230,10 +212,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
230
212
}
231
213
232
214
match = of_match_node (at91_reset_of_match , pdev -> dev .of_node );
233
- reset_data = match -> data ;
234
215
reset -> nb .notifier_call = at91_reset ;
235
216
reset -> nb .priority = 192 ;
236
- reset -> args = reset_data -> args ;
217
+ reset -> args = ( u32 ) match -> data ;
237
218
238
219
reset -> sclk = devm_clk_get (& pdev -> dev , NULL );
239
220
if (IS_ERR (reset -> sclk ))
0 commit comments