Skip to content

Commit 55f8e6f

Browse files
claudiubezneasre
authored andcommitted
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: Claudiu Beznea <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent b7967b7 commit 55f8e6f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/power/reset/at91-reset.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ static int samx7_restart(struct notifier_block *this, unsigned long mode,
152152
return NOTIFY_DONE;
153153
}
154154

155-
static void __init at91_reset_status(struct platform_device *pdev)
155+
static void __init at91_reset_status(struct platform_device *pdev,
156+
void __iomem *base)
156157
{
157158
const char *reason;
158-
u32 reg = readl(reset->rstc_base + AT91_RSTC_SR);
159+
u32 reg = readl(base + AT91_RSTC_SR);
159160

160161
switch ((reg & AT91_RSTC_RSTTYP) >> 8) {
161162
case RESET_TYPE_GENERAL:
@@ -255,7 +256,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
255256
return ret;
256257
}
257258

258-
at91_reset_status(pdev);
259+
at91_reset_status(pdev, reset->rstc_base);
259260

260261
return 0;
261262
}

0 commit comments

Comments
 (0)