Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370641
b: refs/heads/master
c: 5c04b57
h: refs/heads/master
i:
  370639: 5961d18
v: v3
  • Loading branch information
Dinh Nguyen authored and Olof Johansson committed Apr 15, 2013
1 parent e7379a2 commit 4880d9d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a93216c9212cb9ec36bb71776b706e7ed2d9d67c
refs/heads/master: 5c04b57fe33c7700e433983bb69e50ec8d8f08cd
11 changes: 11 additions & 0 deletions trunk/arch/arm/mach-socfpga/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,23 @@
#ifndef __MACH_CORE_H
#define __MACH_CORE_H

#define SOCFPGA_RSTMGR_CTRL 0x04
#define SOCFPGA_RSTMGR_MODPERRST 0x14
#define SOCFPGA_RSTMGR_BRGMODRST 0x1c

/* System Manager bits */
#define RSTMGR_CTRL_SWCOLDRSTREQ 0x1 /* Cold Reset */
#define RSTMGR_CTRL_SWWARMRSTREQ 0x2 /* Warm Reset */

extern void socfpga_secondary_startup(void);
extern void __iomem *socfpga_scu_base_addr;

extern void socfpga_init_clocks(void);
extern void socfpga_sysmgr_init(void);

extern void __iomem *sys_manager_base_addr;
extern void __iomem *rst_manager_base_addr;

extern struct smp_operations socfpga_smp_ops;
extern char secondary_trampoline, secondary_trampoline_end;

Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-socfpga/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

#include "core.h"

extern void __iomem *sys_manager_base_addr;
extern void __iomem *rst_manager_base_addr;

static void __cpuinit socfpga_secondary_init(unsigned int cpu)
{
/*
Expand Down
10 changes: 9 additions & 1 deletion trunk/arch/arm/mach-socfpga/socfpga.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ static void __init socfpga_init_irq(void)

static void socfpga_cyclone5_restart(char mode, const char *cmd)
{
/* TODO: */
u32 temp;

temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);

if (mode == 'h')
temp |= RSTMGR_CTRL_SWCOLDRSTREQ;
else
temp |= RSTMGR_CTRL_SWWARMRSTREQ;
writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
}

static void __init socfpga_cyclone5_init(void)
Expand Down

0 comments on commit 4880d9d

Please sign in to comment.