2 * (C) Copyright 2012 Stephen Warren
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
19 #include <asm/arch/wdog.h>
21 #define RESET_TIMEOUT 10
23 void reset_cpu(ulong addr)
25 struct bcm2835_wdog_regs *regs =
26 (struct bcm2835_wdog_regs *)BCM2835_WDOG_PHYSADDR;
29 rstc = readl(®s->rstc);
30 rstc &= ~BCM2835_WDOG_RSTC_WRCFG_MASK;
31 rstc |= BCM2835_WDOG_RSTC_WRCFG_FULL_RESET;
33 writel(BCM2835_WDOG_PASSWORD | RESET_TIMEOUT, ®s->wdog);
34 writel(BCM2835_WDOG_PASSWORD | rstc, ®s->rstc);