diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-10-09 12:18:38 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-11-25 11:18:50 -0500 |
commit | 7d082baa349e59ce3de6452abc05e5de6436aad4 (patch) | |
tree | ed697d96c5c7d83c9d083a1a3b42144e7202c6a7 | |
parent | 6bdf891a17148a1b91beb603b09c599dc98eb4fb (diff) |
mfd: ab8500-sysctrl: Drop ab8500_restart
ab8500_restart is not called from anywhere in the kernel, so drop it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/ab8500-sysctrl.c | 57 | ||||
-rw-r--r-- | include/linux/mfd/abx500/ab8500-sysctrl.h | 1 |
2 files changed, 0 insertions, 58 deletions
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c index 8e0dae59844d..94dbcdd2a1ff 100644 --- a/drivers/mfd/ab8500-sysctrl.c +++ b/drivers/mfd/ab8500-sysctrl.c | |||
@@ -85,63 +85,6 @@ shutdown: | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | /* | ||
89 | * Use the AB WD to reset the platform. It will perform a hard | ||
90 | * reset instead of a soft reset. Write the reset reason to | ||
91 | * the AB before reset, which can be read upon restart. | ||
92 | */ | ||
93 | void ab8500_restart(char mode, const char *cmd) | ||
94 | { | ||
95 | struct ab8500_platform_data *plat; | ||
96 | struct ab8500_sysctrl_platform_data *pdata; | ||
97 | u16 reason = 0; | ||
98 | u8 val; | ||
99 | |||
100 | if (sysctrl_dev == NULL) { | ||
101 | pr_err("%s: sysctrl not initialized\n", __func__); | ||
102 | return; | ||
103 | } | ||
104 | |||
105 | plat = dev_get_platdata(sysctrl_dev->parent); | ||
106 | pdata = plat->sysctrl; | ||
107 | if (pdata && pdata->reboot_reason_code) | ||
108 | reason = pdata->reboot_reason_code(cmd); | ||
109 | else | ||
110 | pr_warn("[%s] No reboot reason set. Default reason %d\n", | ||
111 | __func__, reason); | ||
112 | |||
113 | /* | ||
114 | * Disable RTC alarm, just a precaution so that no alarm | ||
115 | * is running when WD reset is executed. | ||
116 | */ | ||
117 | abx500_get_register_interruptible(sysctrl_dev, AB8500_RTC, | ||
118 | RTC_CTRL , &val); | ||
119 | abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC, | ||
120 | RTC_CTRL , (val & ~RTC_ALARM_ENABLE)); | ||
121 | |||
122 | /* | ||
123 | * Android is not using the RTC alarm registers during reboot | ||
124 | * so we borrow them for writing the reason of reset | ||
125 | */ | ||
126 | |||
127 | /* reason[8 LSB] */ | ||
128 | val = reason & 0xFF; | ||
129 | abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC, | ||
130 | AB8500_ALARM_MIN_LOW , val); | ||
131 | |||
132 | /* reason[8 MSB] */ | ||
133 | val = (reason>>8) & 0xFF; | ||
134 | abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC, | ||
135 | AB8500_ALARM_MIN_MID , val); | ||
136 | |||
137 | /* Setting WD timeout to 0 */ | ||
138 | ab8500_sysctrl_write(AB8500_MAINWDOGTIMER, 0xFF, 0x0); | ||
139 | |||
140 | /* Setting the parameters to AB8500 WD*/ | ||
141 | ab8500_sysctrl_write(AB8500_MAINWDOGCTRL, 0xFF, (AB8500_ENABLE_WD | | ||
142 | AB8500_WD_RESTART_ON_EXPIRE | AB8500_KICK_WD)); | ||
143 | } | ||
144 | |||
145 | static inline bool valid_bank(u8 bank) | 88 | static inline bool valid_bank(u8 bank) |
146 | { | 89 | { |
147 | return ((bank == AB8500_SYS_CTRL1_BLOCK) || | 90 | return ((bank == AB8500_SYS_CTRL1_BLOCK) || |
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h index adba89d9c660..689312745b2f 100644 --- a/include/linux/mfd/abx500/ab8500-sysctrl.h +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | int ab8500_sysctrl_read(u16 reg, u8 *value); | 13 | int ab8500_sysctrl_read(u16 reg, u8 *value); |
14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); | 14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); |
15 | void ab8500_restart(char mode, const char *cmd); | ||
16 | 15 | ||
17 | #else | 16 | #else |
18 | 17 | ||