diff options
author | Colin Cross <ccross@android.com> | 2010-08-23 21:37:25 -0400 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-02-10 20:50:41 -0500 |
commit | 699fe145d6e651a814423eeb6125381998f3c077 (patch) | |
tree | 3923e8514a712d0b666cadd029f18c42284f43b4 | |
parent | 1eb2ecf1d5b3c29ce86f098de4ad21fa757d2160 (diff) |
ARM: tegra: Allow overriding arch_reset
Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r-- | arch/arm/mach-tegra/board.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/system.h | 10 |
3 files changed, 17 insertions, 8 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index 0de565ca37c5..b3f9c94fcb9e 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | 25 | ||
26 | void tegra_assert_system_reset(char mode, const char *cmd); | ||
27 | |||
26 | void __init tegra_common_init(void); | 28 | void __init tegra_common_init(void); |
27 | void __init tegra_map_common_io(void); | 29 | void __init tegra_map_common_io(void); |
28 | void __init tegra_init_irq(void); | 30 | void __init tegra_init_irq(void); |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 7c91e2b9d643..84a7197e1eff 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -26,11 +26,24 @@ | |||
26 | 26 | ||
27 | #include <mach/iomap.h> | 27 | #include <mach/iomap.h> |
28 | #include <mach/dma.h> | 28 | #include <mach/dma.h> |
29 | #include <mach/system.h> | ||
29 | 30 | ||
30 | #include "board.h" | 31 | #include "board.h" |
31 | #include "clock.h" | 32 | #include "clock.h" |
32 | #include "fuse.h" | 33 | #include "fuse.h" |
33 | 34 | ||
35 | void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset; | ||
36 | |||
37 | void tegra_assert_system_reset(char mode, const char *cmd) | ||
38 | { | ||
39 | void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04); | ||
40 | u32 reg; | ||
41 | |||
42 | reg = readl(reset); | ||
43 | reg |= 0x04; | ||
44 | writel(reg, reset); | ||
45 | } | ||
46 | |||
34 | static __initdata struct tegra_clk_init_table common_clk_init_table[] = { | 47 | static __initdata struct tegra_clk_init_table common_clk_init_table[] = { |
35 | /* name parent rate enabled */ | 48 | /* name parent rate enabled */ |
36 | { "clk_m", NULL, 0, true }, | 49 | { "clk_m", NULL, 0, true }, |
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h index 84d5d46113f7..d0183d876c3b 100644 --- a/arch/arm/mach-tegra/include/mach/system.h +++ b/arch/arm/mach-tegra/include/mach/system.h | |||
@@ -24,16 +24,10 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/iomap.h> | 25 | #include <mach/iomap.h> |
26 | 26 | ||
27 | static inline void arch_idle(void) | 27 | extern void (*arch_reset)(char mode, const char *cmd); |
28 | { | ||
29 | } | ||
30 | 28 | ||
31 | static inline void arch_reset(char mode, const char *cmd) | 29 | static inline void arch_idle(void) |
32 | { | 30 | { |
33 | void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04); | ||
34 | u32 reg = readl(reset); | ||
35 | reg |= 0x04; | ||
36 | writel(reg, reset); | ||
37 | } | 31 | } |
38 | 32 | ||
39 | #endif | 33 | #endif |