.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * reset controller for CSR SiRFprimaII |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. |
---|
5 | | - * |
---|
6 | | - * Licensed under GPLv2 or later. |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include <linux/kernel.h> |
---|
.. | .. |
---|
65 | 64 | |
---|
66 | 65 | #define SIRFSOC_SYS_RST_BIT BIT(31) |
---|
67 | 66 | |
---|
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) |
---|
69 | 69 | { |
---|
70 | 70 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); |
---|
| 71 | + return NOTIFY_DONE; |
---|
71 | 72 | } |
---|
| 73 | + |
---|
| 74 | +static struct notifier_block sirfsoc_restart_nb = { |
---|
| 75 | + .notifier_call = sirfsoc_restart, |
---|
| 76 | + .priority = 192, |
---|
| 77 | +}; |
---|
72 | 78 | |
---|
73 | 79 | static int sirfsoc_rstc_probe(struct platform_device *pdev) |
---|
74 | 80 | { |
---|
.. | .. |
---|
80 | 86 | } |
---|
81 | 87 | |
---|
82 | 88 | sirfsoc_reset_controller.of_node = np; |
---|
83 | | - arm_pm_restart = sirfsoc_restart; |
---|
| 89 | + register_restart_handler(&sirfsoc_restart_nb); |
---|
84 | 90 | |
---|
85 | 91 | if (IS_ENABLED(CONFIG_RESET_CONTROLLER)) |
---|
86 | 92 | reset_controller_register(&sirfsoc_reset_controller); |
---|