Skip to content

Commit 766b016

Browse files
claudiubezneasre
authored andcommitted
power: reset: at91-reset: get rid of at91_reset_data
After refactoring struct at91_reset_data and struct at91_reset_data at91sam9260_reset_data are not needed anymore. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 51aa7d4 commit 766b016

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

drivers/power/reset/at91-reset.c

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ enum reset_type {
4949
RESET_TYPE_ULP2 = 8,
5050
};
5151

52-
struct at91_reset_data {
53-
u32 args;
54-
};
55-
5652
struct at91_reset {
5753
void __iomem *rstc_base;
5854
void __iomem *ramc_base[2];
@@ -156,50 +152,36 @@ static const struct of_device_id at91_ramc_of_match[] = {
156152
{ /* sentinel */ }
157153
};
158154

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-
175155
static const struct of_device_id at91_reset_of_match[] = {
176156
{
177157
.compatible = "atmel,at91sam9260-rstc",
178-
.data = &at91sam9260_reset_data
158+
.data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
159+
AT91_RSTC_PROCRST),
179160
},
180161
{
181162
.compatible = "atmel,at91sam9g45-rstc",
182-
.data = &at91sam9g45_reset_data
163+
.data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
164+
AT91_RSTC_PROCRST)
183165
},
184166
{
185167
.compatible = "atmel,sama5d3-rstc",
186-
.data = &sama5d3_reset_data
168+
.data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
169+
AT91_RSTC_PROCRST)
187170
},
188171
{
189172
.compatible = "atmel,samx7-rstc",
190-
.data = &samx7_reset_data
173+
.data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PROCRST)
191174
},
192175
{
193176
.compatible = "microchip,sam9x60-rstc",
194-
.data = &samx7_reset_data
177+
.data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PROCRST)
195178
},
196179
{ /* sentinel */ }
197180
};
198181
MODULE_DEVICE_TABLE(of, at91_reset_of_match);
199182

200183
static int __init at91_reset_probe(struct platform_device *pdev)
201184
{
202-
const struct at91_reset_data *reset_data;
203185
const struct of_device_id *match;
204186
struct at91_reset *reset;
205187
struct device_node *np;
@@ -230,10 +212,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
230212
}
231213

232214
match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
233-
reset_data = match->data;
234215
reset->nb.notifier_call = at91_reset;
235216
reset->nb.priority = 192;
236-
reset->args = reset_data->args;
217+
reset->args = (u32)match->data;
237218

238219
reset->sclk = devm_clk_get(&pdev->dev, NULL);
239220
if (IS_ERR(reset->sclk))

0 commit comments

Comments
 (0)