Commit 699fe145 authored by Colin Cross's avatar Colin Cross

ARM: tegra: Allow overriding arch_reset

Signed-off-by: default avatarColin Cross <ccross@android.com>
parent 1eb2ecf1
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <linux/types.h> #include <linux/types.h>
void tegra_assert_system_reset(char mode, const char *cmd);
void __init tegra_common_init(void); void __init tegra_common_init(void);
void __init tegra_map_common_io(void); void __init tegra_map_common_io(void);
void __init tegra_init_irq(void); void __init tegra_init_irq(void);
......
...@@ -26,11 +26,24 @@ ...@@ -26,11 +26,24 @@
#include <mach/iomap.h> #include <mach/iomap.h>
#include <mach/dma.h> #include <mach/dma.h>
#include <mach/system.h>
#include "board.h" #include "board.h"
#include "clock.h" #include "clock.h"
#include "fuse.h" #include "fuse.h"
void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
void tegra_assert_system_reset(char mode, const char *cmd)
{
void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
u32 reg;
reg = readl(reset);
reg |= 0x04;
writel(reg, reset);
}
static __initdata struct tegra_clk_init_table common_clk_init_table[] = { static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
/* name parent rate enabled */ /* name parent rate enabled */
{ "clk_m", NULL, 0, true }, { "clk_m", NULL, 0, true },
......
...@@ -24,16 +24,10 @@ ...@@ -24,16 +24,10 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomap.h> #include <mach/iomap.h>
static inline void arch_idle(void) extern void (*arch_reset)(char mode, const char *cmd);
{
}
static inline void arch_reset(char mode, const char *cmd) static inline void arch_idle(void)
{ {
void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
u32 reg = readl(reset);
reg |= 0x04;
writel(reg, reset);
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment