aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-socfpga/socfpga.c
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@altera.com>2013-04-11 11:55:24 -0400
committerOlof Johansson <olof@lixom.net>2013-04-14 23:17:33 -0400
commit5c04b57fe33c7700e433983bb69e50ec8d8f08cd (patch)
treea4c95094ab7c7918d4e64de7fcc1cd74386015f0 /arch/arm/mach-socfpga/socfpga.c
parenta93216c9212cb9ec36bb71776b706e7ed2d9d67c (diff)
ARM: socfpga: Enable soft reset
Enable a cold or warm reset to the HW from userspace. Also fix a few sparse errors: warning: symbol 'sys_manager_base_addr' was not declared. Should it be static? warning: symbol 'rst_manager_base_addr' was not declared. Should it be static? Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Reviewed-by: Pavel Machek <pavel@denx.de> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-socfpga/socfpga.c')
-rw-r--r--arch/arm/mach-socfpga/socfpga.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index 1042c023cf24..2cae16c1f265 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -87,7 +87,15 @@ static void __init socfpga_init_irq(void)
87 87
88static void socfpga_cyclone5_restart(char mode, const char *cmd) 88static void socfpga_cyclone5_restart(char mode, const char *cmd)
89{ 89{
90 /* TODO: */ 90 u32 temp;
91
92 temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
93
94 if (mode == 'h')
95 temp |= RSTMGR_CTRL_SWCOLDRSTREQ;
96 else
97 temp |= RSTMGR_CTRL_SWWARMRSTREQ;
98 writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
91} 99}
92 100
93static void __init socfpga_cyclone5_init(void) 101static void __init socfpga_cyclone5_init(void)