All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
@ 2014-10-09 16:18 ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2014-10-09 16:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Linus Walleij, Samuel Ortiz, Lee Jones, Guenter Roeck

ab8500_restart is not called from anywhere in the kernel, so drop it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/mfd/ab8500-sysctrl.c              | 57 -------------------------------
 include/linux/mfd/abx500/ab8500-sysctrl.h |  1 -
 2 files changed, 58 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 8e0dae5..94dbcdd 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -85,63 +85,6 @@ shutdown:
 	}
 }
 
-/*
- * Use the AB WD to reset the platform. It will perform a hard
- * reset instead of a soft reset. Write the reset reason to
- * the AB before reset, which can be read upon restart.
- */
-void ab8500_restart(char mode, const char *cmd)
-{
-	struct ab8500_platform_data *plat;
-	struct ab8500_sysctrl_platform_data *pdata;
-	u16 reason = 0;
-	u8 val;
-
-	if (sysctrl_dev == NULL) {
-		pr_err("%s: sysctrl not initialized\n", __func__);
-		return;
-	}
-
-	plat = dev_get_platdata(sysctrl_dev->parent);
-	pdata = plat->sysctrl;
-	if (pdata && pdata->reboot_reason_code)
-		reason = pdata->reboot_reason_code(cmd);
-	else
-		pr_warn("[%s] No reboot reason set. Default reason %d\n",
-			__func__, reason);
-
-	/*
-	 * Disable RTC alarm, just a precaution so that no alarm
-	 * is running when WD reset is executed.
-	 */
-	abx500_get_register_interruptible(sysctrl_dev, AB8500_RTC,
-		RTC_CTRL , &val);
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		RTC_CTRL , (val & ~RTC_ALARM_ENABLE));
-
-	/*
-	 * Android is not using the RTC alarm registers during reboot
-	 * so we borrow them for writing the reason of reset
-	 */
-
-	/* reason[8 LSB] */
-	val = reason & 0xFF;
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		AB8500_ALARM_MIN_LOW , val);
-
-	/* reason[8 MSB] */
-	val = (reason>>8) & 0xFF;
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		AB8500_ALARM_MIN_MID , val);
-
-	/* Setting WD timeout to 0 */
-	ab8500_sysctrl_write(AB8500_MAINWDOGTIMER, 0xFF, 0x0);
-
-	/* Setting the parameters to AB8500 WD*/
-	ab8500_sysctrl_write(AB8500_MAINWDOGCTRL, 0xFF, (AB8500_ENABLE_WD |
-		AB8500_WD_RESTART_ON_EXPIRE | AB8500_KICK_WD));
-}
-
 static inline bool valid_bank(u8 bank)
 {
 	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 adba89d..6893127 100644
--- a/include/linux/mfd/abx500/ab8500-sysctrl.h
+++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
@@ -12,7 +12,6 @@
 
 int ab8500_sysctrl_read(u16 reg, u8 *value);
 int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
-void ab8500_restart(char mode, const char *cmd);
 
 #else
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
@ 2014-10-09 16:18 ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2014-10-09 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

ab8500_restart is not called from anywhere in the kernel, so drop it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/mfd/ab8500-sysctrl.c              | 57 -------------------------------
 include/linux/mfd/abx500/ab8500-sysctrl.h |  1 -
 2 files changed, 58 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 8e0dae5..94dbcdd 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -85,63 +85,6 @@ shutdown:
 	}
 }
 
-/*
- * Use the AB WD to reset the platform. It will perform a hard
- * reset instead of a soft reset. Write the reset reason to
- * the AB before reset, which can be read upon restart.
- */
-void ab8500_restart(char mode, const char *cmd)
-{
-	struct ab8500_platform_data *plat;
-	struct ab8500_sysctrl_platform_data *pdata;
-	u16 reason = 0;
-	u8 val;
-
-	if (sysctrl_dev == NULL) {
-		pr_err("%s: sysctrl not initialized\n", __func__);
-		return;
-	}
-
-	plat = dev_get_platdata(sysctrl_dev->parent);
-	pdata = plat->sysctrl;
-	if (pdata && pdata->reboot_reason_code)
-		reason = pdata->reboot_reason_code(cmd);
-	else
-		pr_warn("[%s] No reboot reason set. Default reason %d\n",
-			__func__, reason);
-
-	/*
-	 * Disable RTC alarm, just a precaution so that no alarm
-	 * is running when WD reset is executed.
-	 */
-	abx500_get_register_interruptible(sysctrl_dev, AB8500_RTC,
-		RTC_CTRL , &val);
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		RTC_CTRL , (val & ~RTC_ALARM_ENABLE));
-
-	/*
-	 * Android is not using the RTC alarm registers during reboot
-	 * so we borrow them for writing the reason of reset
-	 */
-
-	/* reason[8 LSB] */
-	val = reason & 0xFF;
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		AB8500_ALARM_MIN_LOW , val);
-
-	/* reason[8 MSB] */
-	val = (reason>>8) & 0xFF;
-	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
-		AB8500_ALARM_MIN_MID , val);
-
-	/* Setting WD timeout to 0 */
-	ab8500_sysctrl_write(AB8500_MAINWDOGTIMER, 0xFF, 0x0);
-
-	/* Setting the parameters to AB8500 WD*/
-	ab8500_sysctrl_write(AB8500_MAINWDOGCTRL, 0xFF, (AB8500_ENABLE_WD |
-		AB8500_WD_RESTART_ON_EXPIRE | AB8500_KICK_WD));
-}
-
 static inline bool valid_bank(u8 bank)
 {
 	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 adba89d..6893127 100644
--- a/include/linux/mfd/abx500/ab8500-sysctrl.h
+++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
@@ -12,7 +12,6 @@
 
 int ab8500_sysctrl_read(u16 reg, u8 *value);
 int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
-void ab8500_restart(char mode, const char *cmd);
 
 #else
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
  2014-10-09 16:18 ` Guenter Roeck
@ 2014-10-27 16:03   ` Linus Walleij
  -1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2014-10-27 16:03 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, linux-arm-kernel, Samuel Ortiz, Lee Jones

On Thu, Oct 9, 2014 at 6:18 PM, Guenter Roeck <linux@roeck-us.net> wrote:

> ab8500_restart is not called from anywhere in the kernel, so drop it.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Yeah I guess... cannot argue with that.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
@ 2014-10-27 16:03   ` Linus Walleij
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2014-10-27 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 9, 2014 at 6:18 PM, Guenter Roeck <linux@roeck-us.net> wrote:

> ab8500_restart is not called from anywhere in the kernel, so drop it.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Yeah I guess... cannot argue with that.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
  2014-10-09 16:18 ` Guenter Roeck
@ 2014-11-03 18:01   ` Lee Jones
  -1 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2014-11-03 18:01 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, linux-arm-kernel, Linus Walleij, Samuel Ortiz

On Thu, 09 Oct 2014, Guenter Roeck wrote:

> ab8500_restart is not called from anywhere in the kernel, so drop it.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/mfd/ab8500-sysctrl.c              | 57 -------------------------------
>  include/linux/mfd/abx500/ab8500-sysctrl.h |  1 -
>  2 files changed, 58 deletions(-)

Applied with Linus' Ack.

> diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
> index 8e0dae5..94dbcdd 100644
> --- a/drivers/mfd/ab8500-sysctrl.c
> +++ b/drivers/mfd/ab8500-sysctrl.c
> @@ -85,63 +85,6 @@ shutdown:
>  	}
>  }
>  
> -/*
> - * Use the AB WD to reset the platform. It will perform a hard
> - * reset instead of a soft reset. Write the reset reason to
> - * the AB before reset, which can be read upon restart.
> - */
> -void ab8500_restart(char mode, const char *cmd)
> -{
> -	struct ab8500_platform_data *plat;
> -	struct ab8500_sysctrl_platform_data *pdata;
> -	u16 reason = 0;
> -	u8 val;
> -
> -	if (sysctrl_dev == NULL) {
> -		pr_err("%s: sysctrl not initialized\n", __func__);
> -		return;
> -	}
> -
> -	plat = dev_get_platdata(sysctrl_dev->parent);
> -	pdata = plat->sysctrl;
> -	if (pdata && pdata->reboot_reason_code)
> -		reason = pdata->reboot_reason_code(cmd);
> -	else
> -		pr_warn("[%s] No reboot reason set. Default reason %d\n",
> -			__func__, reason);
> -
> -	/*
> -	 * Disable RTC alarm, just a precaution so that no alarm
> -	 * is running when WD reset is executed.
> -	 */
> -	abx500_get_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		RTC_CTRL , &val);
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		RTC_CTRL , (val & ~RTC_ALARM_ENABLE));
> -
> -	/*
> -	 * Android is not using the RTC alarm registers during reboot
> -	 * so we borrow them for writing the reason of reset
> -	 */
> -
> -	/* reason[8 LSB] */
> -	val = reason & 0xFF;
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		AB8500_ALARM_MIN_LOW , val);
> -
> -	/* reason[8 MSB] */
> -	val = (reason>>8) & 0xFF;
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		AB8500_ALARM_MIN_MID , val);
> -
> -	/* Setting WD timeout to 0 */
> -	ab8500_sysctrl_write(AB8500_MAINWDOGTIMER, 0xFF, 0x0);
> -
> -	/* Setting the parameters to AB8500 WD*/
> -	ab8500_sysctrl_write(AB8500_MAINWDOGCTRL, 0xFF, (AB8500_ENABLE_WD |
> -		AB8500_WD_RESTART_ON_EXPIRE | AB8500_KICK_WD));
> -}
> -
>  static inline bool valid_bank(u8 bank)
>  {
>  	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 adba89d..6893127 100644
> --- a/include/linux/mfd/abx500/ab8500-sysctrl.h
> +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
> @@ -12,7 +12,6 @@
>  
>  int ab8500_sysctrl_read(u16 reg, u8 *value);
>  int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
> -void ab8500_restart(char mode, const char *cmd);
>  
>  #else
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart
@ 2014-11-03 18:01   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2014-11-03 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 09 Oct 2014, Guenter Roeck wrote:

> ab8500_restart is not called from anywhere in the kernel, so drop it.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/mfd/ab8500-sysctrl.c              | 57 -------------------------------
>  include/linux/mfd/abx500/ab8500-sysctrl.h |  1 -
>  2 files changed, 58 deletions(-)

Applied with Linus' Ack.

> diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
> index 8e0dae5..94dbcdd 100644
> --- a/drivers/mfd/ab8500-sysctrl.c
> +++ b/drivers/mfd/ab8500-sysctrl.c
> @@ -85,63 +85,6 @@ shutdown:
>  	}
>  }
>  
> -/*
> - * Use the AB WD to reset the platform. It will perform a hard
> - * reset instead of a soft reset. Write the reset reason to
> - * the AB before reset, which can be read upon restart.
> - */
> -void ab8500_restart(char mode, const char *cmd)
> -{
> -	struct ab8500_platform_data *plat;
> -	struct ab8500_sysctrl_platform_data *pdata;
> -	u16 reason = 0;
> -	u8 val;
> -
> -	if (sysctrl_dev == NULL) {
> -		pr_err("%s: sysctrl not initialized\n", __func__);
> -		return;
> -	}
> -
> -	plat = dev_get_platdata(sysctrl_dev->parent);
> -	pdata = plat->sysctrl;
> -	if (pdata && pdata->reboot_reason_code)
> -		reason = pdata->reboot_reason_code(cmd);
> -	else
> -		pr_warn("[%s] No reboot reason set. Default reason %d\n",
> -			__func__, reason);
> -
> -	/*
> -	 * Disable RTC alarm, just a precaution so that no alarm
> -	 * is running when WD reset is executed.
> -	 */
> -	abx500_get_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		RTC_CTRL , &val);
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		RTC_CTRL , (val & ~RTC_ALARM_ENABLE));
> -
> -	/*
> -	 * Android is not using the RTC alarm registers during reboot
> -	 * so we borrow them for writing the reason of reset
> -	 */
> -
> -	/* reason[8 LSB] */
> -	val = reason & 0xFF;
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		AB8500_ALARM_MIN_LOW , val);
> -
> -	/* reason[8 MSB] */
> -	val = (reason>>8) & 0xFF;
> -	abx500_set_register_interruptible(sysctrl_dev, AB8500_RTC,
> -		AB8500_ALARM_MIN_MID , val);
> -
> -	/* Setting WD timeout to 0 */
> -	ab8500_sysctrl_write(AB8500_MAINWDOGTIMER, 0xFF, 0x0);
> -
> -	/* Setting the parameters to AB8500 WD*/
> -	ab8500_sysctrl_write(AB8500_MAINWDOGCTRL, 0xFF, (AB8500_ENABLE_WD |
> -		AB8500_WD_RESTART_ON_EXPIRE | AB8500_KICK_WD));
> -}
> -
>  static inline bool valid_bank(u8 bank)
>  {
>  	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 adba89d..6893127 100644
> --- a/include/linux/mfd/abx500/ab8500-sysctrl.h
> +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
> @@ -12,7 +12,6 @@
>  
>  int ab8500_sysctrl_read(u16 reg, u8 *value);
>  int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
> -void ab8500_restart(char mode, const char *cmd);
>  
>  #else
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-03 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 16:18 [PATCH] mfd: ab8500-sysctrl: Drop ab8500_restart Guenter Roeck
2014-10-09 16:18 ` Guenter Roeck
2014-10-27 16:03 ` Linus Walleij
2014-10-27 16:03   ` Linus Walleij
2014-11-03 18:01 ` Lee Jones
2014-11-03 18:01   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.