]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/uniphier/reset.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / uniphier / reset.c
1 /*
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>
10 #include <asm/arch/sc-regs.h>
11 #include <asm/arch/board.h>
12
13 void reset_cpu(unsigned long ignored)
14 {
15         u32 tmp;
16
17         uniphier_board_reset();
18
19         writel(5, SC_IRQTIMSET); /* default value */
20
21         tmp  = readl(SC_SLFRSTSEL);
22         tmp &= ~0x3; /* mask [1:0] */
23         tmp |= 0x0;  /* XRST reboot */
24         writel(tmp, SC_SLFRSTSEL);
25
26         tmp = readl(SC_SLFRSTCTL);
27         tmp |= 0x1;
28         writel(tmp, SC_SLFRSTCTL);
29 }