diff options
-rw-r--r-- | arch/arm/mach-prima2/common.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-prima2/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-prima2/rstc.c | 22 |
3 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 3b8865a140ee..47c7819edb9b 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c | |||
@@ -37,7 +37,6 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") | |||
37 | .map_io = sirfsoc_map_io, | 37 | .map_io = sirfsoc_map_io, |
38 | .init_late = sirfsoc_init_late, | 38 | .init_late = sirfsoc_init_late, |
39 | .dt_compat = atlas6_dt_match, | 39 | .dt_compat = atlas6_dt_match, |
40 | .restart = sirfsoc_restart, | ||
41 | MACHINE_END | 40 | MACHINE_END |
42 | #endif | 41 | #endif |
43 | 42 | ||
@@ -53,7 +52,6 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") | |||
53 | .dma_zone_size = SZ_256M, | 52 | .dma_zone_size = SZ_256M, |
54 | .init_late = sirfsoc_init_late, | 53 | .init_late = sirfsoc_init_late, |
55 | .dt_compat = prima2_dt_match, | 54 | .dt_compat = prima2_dt_match, |
56 | .restart = sirfsoc_restart, | ||
57 | MACHINE_END | 55 | MACHINE_END |
58 | #endif | 56 | #endif |
59 | 57 | ||
@@ -69,6 +67,5 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") | |||
69 | .map_io = sirfsoc_map_io, | 67 | .map_io = sirfsoc_map_io, |
70 | .init_late = sirfsoc_init_late, | 68 | .init_late = sirfsoc_init_late, |
71 | .dt_compat = marco_dt_match, | 69 | .dt_compat = marco_dt_match, |
72 | .restart = sirfsoc_restart, | ||
73 | MACHINE_END | 70 | MACHINE_END |
74 | #endif | 71 | #endif |
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index 4b768060a858..07d3e5ed9264 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h | |||
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void); | |||
23 | extern void sirfsoc_cpu_die(unsigned int cpu); | 23 | extern void sirfsoc_cpu_die(unsigned int cpu); |
24 | 24 | ||
25 | extern void __init sirfsoc_of_irq_init(void); | 25 | extern void __init sirfsoc_of_irq_init(void); |
26 | extern void sirfsoc_restart(enum reboot_mode, const char *); | ||
27 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); | 26 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); |
28 | 27 | ||
29 | #ifndef CONFIG_DEBUG_LL | 28 | #ifndef CONFIG_DEBUG_LL |
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c index a59976743332..4887a2a4c698 100644 --- a/arch/arm/mach-prima2/rstc.c +++ b/arch/arm/mach-prima2/rstc.c | |||
@@ -17,9 +17,11 @@ | |||
17 | #include <linux/reboot.h> | 17 | #include <linux/reboot.h> |
18 | #include <linux/reset-controller.h> | 18 | #include <linux/reset-controller.h> |
19 | 19 | ||
20 | #include <asm/system_misc.h> | ||
21 | |||
20 | #define SIRFSOC_RSTBIT_NUM 64 | 22 | #define SIRFSOC_RSTBIT_NUM 64 |
21 | 23 | ||
22 | void __iomem *sirfsoc_rstc_base; | 24 | static void __iomem *sirfsoc_rstc_base; |
23 | static DEFINE_MUTEX(rstc_lock); | 25 | static DEFINE_MUTEX(rstc_lock); |
24 | 26 | ||
25 | static int sirfsoc_reset_module(struct reset_controller_dev *rcdev, | 27 | static int sirfsoc_reset_module(struct reset_controller_dev *rcdev, |
@@ -71,6 +73,13 @@ static struct reset_controller_dev sirfsoc_reset_controller = { | |||
71 | .nr_resets = SIRFSOC_RSTBIT_NUM, | 73 | .nr_resets = SIRFSOC_RSTBIT_NUM, |
72 | }; | 74 | }; |
73 | 75 | ||
76 | #define SIRFSOC_SYS_RST_BIT BIT(31) | ||
77 | |||
78 | static void sirfsoc_restart(enum reboot_mode mode, const char *cmd) | ||
79 | { | ||
80 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); | ||
81 | } | ||
82 | |||
74 | static int sirfsoc_rstc_probe(struct platform_device *pdev) | 83 | static int sirfsoc_rstc_probe(struct platform_device *pdev) |
75 | { | 84 | { |
76 | struct device_node *np = pdev->dev.of_node; | 85 | struct device_node *np = pdev->dev.of_node; |
@@ -81,8 +90,10 @@ static int sirfsoc_rstc_probe(struct platform_device *pdev) | |||
81 | } | 90 | } |
82 | 91 | ||
83 | sirfsoc_reset_controller.of_node = np; | 92 | sirfsoc_reset_controller.of_node = np; |
93 | arm_pm_restart = sirfsoc_restart; | ||
84 | 94 | ||
85 | reset_controller_register(&sirfsoc_reset_controller); | 95 | if (IS_ENABLED(CONFIG_RESET_CONTROLLER)) |
96 | reset_controller_register(&sirfsoc_reset_controller); | ||
86 | 97 | ||
87 | return 0; | 98 | return 0; |
88 | } | 99 | } |
@@ -107,10 +118,3 @@ static int __init sirfsoc_rstc_init(void) | |||
107 | return platform_driver_register(&sirfsoc_rstc_driver); | 118 | return platform_driver_register(&sirfsoc_rstc_driver); |
108 | } | 119 | } |
109 | subsys_initcall(sirfsoc_rstc_init); | 120 | subsys_initcall(sirfsoc_rstc_init); |
110 | |||
111 | #define SIRFSOC_SYS_RST_BIT BIT(31) | ||
112 | |||
113 | void sirfsoc_restart(enum reboot_mode mode, const char *cmd) | ||
114 | { | ||
115 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); | ||
116 | } | ||