blob: 005fbcf0b8ef8bfd264ad751f0c5231f725c0447 [file] [log] [blame]
Masahiro Yamada5894ca02014-10-03 19:21:06 +09001/*
2 * Copyright (C) 2012-2014 Panasonic Corporation
3 * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <asm/io.h>
Masahiro Yamadaa86ac952015-02-27 02:26:44 +090010#include <mach/sc-regs.h>
Masahiro Yamada5894ca02014-10-03 19:21:06 +090011
12void reset_cpu(unsigned long ignored)
13{
14 u32 tmp;
15
Masahiro Yamada5894ca02014-10-03 19:21:06 +090016 writel(5, SC_IRQTIMSET); /* default value */
17
18 tmp = readl(SC_SLFRSTSEL);
19 tmp &= ~0x3; /* mask [1:0] */
20 tmp |= 0x0; /* XRST reboot */
21 writel(tmp, SC_SLFRSTSEL);
22
23 tmp = readl(SC_SLFRSTCTL);
24 tmp |= 0x1;
25 writel(tmp, SC_SLFRSTCTL);
26}