Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Guenter Roeck and committed by
Lee Jones
7d082baa 6bdf891a

-58
-57
drivers/mfd/ab8500-sysctrl.c
··· 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 88 static inline bool valid_bank(u8 bank) 146 89 { 147 90 return ((bank == AB8500_SYS_CTRL1_BLOCK) ||
-1
include/linux/mfd/abx500/ab8500-sysctrl.h
··· 12 12 13 13 int ab8500_sysctrl_read(u16 reg, u8 *value); 14 14 int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); 15 - void ab8500_restart(char mode, const char *cmd); 16 15 17 16 #else 18 17