summaryrefslogtreecommitdiff
path: root/drivers/power/reset/at91-reset.c
diff options
context:
space:
mode:
authorClaudiu.Beznea@microchip.com <Claudiu.Beznea@microchip.com>2020-01-21 10:03:39 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2020-03-08 19:38:04 +0100
commit766b0162e613a89a330382e566e29da57f5f0de5 (patch)
tree02cc0454b098826677df75883789bd38c76e8155 /drivers/power/reset/at91-reset.c
parent51aa7d45f905ca03d3c61d32a09537903a7ea707 (diff)
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 <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/reset/at91-reset.c')
-rw-r--r--drivers/power/reset/at91-reset.c37
1 files changed, 9 insertions, 28 deletions
diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index 9c1b69f76a01..537ccb180568 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -49,10 +49,6 @@ enum reset_type {
RESET_TYPE_ULP2 = 8,
};
-struct at91_reset_data {
- u32 args;
-};
-
struct at91_reset {
void __iomem *rstc_base;
void __iomem *ramc_base[2];
@@ -156,42 +152,29 @@ static const struct of_device_id at91_ramc_of_match[] = {
{ /* sentinel */ }
};
-static const struct at91_reset_data at91sam9260_reset_data = {
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST,
-};
-
-static const struct at91_reset_data at91sam9g45_reset_data = {
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST,
-};
-
-static const struct at91_reset_data sama5d3_reset_data = {
- .args = AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST,
-};
-
-static const struct at91_reset_data samx7_reset_data = {
- .args = AT91_RSTC_KEY | AT91_RSTC_PROCRST,
-};
-
static const struct of_device_id at91_reset_of_match[] = {
{
.compatible = "atmel,at91sam9260-rstc",
- .data = &at91sam9260_reset_data
+ .data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
+ AT91_RSTC_PROCRST),
},
{
.compatible = "atmel,at91sam9g45-rstc",
- .data = &at91sam9g45_reset_data
+ .data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
+ AT91_RSTC_PROCRST)
},
{
.compatible = "atmel,sama5d3-rstc",
- .data = &sama5d3_reset_data
+ .data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PERRST |
+ AT91_RSTC_PROCRST)
},
{
.compatible = "atmel,samx7-rstc",
- .data = &samx7_reset_data
+ .data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PROCRST)
},
{
.compatible = "microchip,sam9x60-rstc",
- .data = &samx7_reset_data
+ .data = (void *)(AT91_RSTC_KEY | AT91_RSTC_PROCRST)
},
{ /* sentinel */ }
};
@@ -199,7 +182,6 @@ MODULE_DEVICE_TABLE(of, at91_reset_of_match);
static int __init at91_reset_probe(struct platform_device *pdev)
{
- const struct at91_reset_data *reset_data;
const struct of_device_id *match;
struct at91_reset *reset;
struct device_node *np;
@@ -230,10 +212,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
}
match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
- reset_data = match->data;
reset->nb.notifier_call = at91_reset;
reset->nb.priority = 192;
- reset->args = reset_data->args;
+ reset->args = (u32)match->data;
reset->sclk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(reset->sclk))