hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/mach-prima2/rstc.c
....@@ -1,9 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * reset controller for CSR SiRFprimaII
34 *
45 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5
- *
6
- * Licensed under GPLv2 or later.
76 */
87
98 #include <linux/kernel.h>
....@@ -65,10 +64,17 @@
6564
6665 #define SIRFSOC_SYS_RST_BIT BIT(31)
6766
68
-static void sirfsoc_restart(enum reboot_mode mode, const char *cmd)
67
+static int sirfsoc_restart(struct notifier_block *nb, unsigned long action,
68
+ void *data)
6969 {
7070 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
71
+ return NOTIFY_DONE;
7172 }
73
+
74
+static struct notifier_block sirfsoc_restart_nb = {
75
+ .notifier_call = sirfsoc_restart,
76
+ .priority = 192,
77
+};
7278
7379 static int sirfsoc_rstc_probe(struct platform_device *pdev)
7480 {
....@@ -80,7 +86,7 @@
8086 }
8187
8288 sirfsoc_reset_controller.of_node = np;
83
- arm_pm_restart = sirfsoc_restart;
89
+ register_restart_handler(&sirfsoc_restart_nb);
8490
8591 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
8692 reset_controller_register(&sirfsoc_reset_controller);