2 * (C) Copyright 2012 Stephen Warren
4 * See file CREDITS for list of people who contributed to this
7 * SPDX-License-Identifier: GPL-2.0
12 #include <asm/arch/wdog.h>
14 #define RESET_TIMEOUT 10
16 void reset_cpu(ulong addr)
18 struct bcm2835_wdog_regs *regs =
19 (struct bcm2835_wdog_regs *)BCM2835_WDOG_PHYSADDR;
22 rstc = readl(®s->rstc);
23 rstc &= ~BCM2835_WDOG_RSTC_WRCFG_MASK;
24 rstc |= BCM2835_WDOG_RSTC_WRCFG_FULL_RESET;
26 writel(BCM2835_WDOG_PASSWORD | RESET_TIMEOUT, ®s->wdog);
27 writel(BCM2835_WDOG_PASSWORD | rstc, ®s->rstc);