Commit 55f8e6fd authored by Claudiu.Beznea@microchip.com's avatar Claudiu.Beznea@microchip.com Committed by Sebastian Reichel

power: reset: at91-reset: pass rstc base address to at91_reset_status()

Add new argument to at91_reset_status() that is the pointer to reset
controller base address.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent b7967b79
...@@ -152,10 +152,11 @@ static int samx7_restart(struct notifier_block *this, unsigned long mode, ...@@ -152,10 +152,11 @@ static int samx7_restart(struct notifier_block *this, unsigned long mode,
return NOTIFY_DONE; return NOTIFY_DONE;
} }
static void __init at91_reset_status(struct platform_device *pdev) static void __init at91_reset_status(struct platform_device *pdev,
void __iomem *base)
{ {
const char *reason; const char *reason;
u32 reg = readl(reset->rstc_base + AT91_RSTC_SR); u32 reg = readl(base + AT91_RSTC_SR);
switch ((reg & AT91_RSTC_RSTTYP) >> 8) { switch ((reg & AT91_RSTC_RSTTYP) >> 8) {
case RESET_TYPE_GENERAL: case RESET_TYPE_GENERAL:
...@@ -255,7 +256,7 @@ static int __init at91_reset_probe(struct platform_device *pdev) ...@@ -255,7 +256,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
return ret; return ret;
} }
at91_reset_status(pdev); at91_reset_status(pdev, reset->rstc_base);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment