public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] EXYNOS: Add API for power reset and shutdown
Date: Mon, 24 Jun 2013 14:42:04 +0900	[thread overview]
Message-ID: <51C7DC2C.2050707@samsung.com> (raw)
In-Reply-To: <1365059165-23764-1-git-send-email-rajeshwari.s@samsung.com>

Dear Rajeshwari Shinde,

On 04/04/13 16:06, Rajeshwari Shinde wrote:
> This patch adds API's to reset and shutdown the power of
> EXYNOS boards
> power_shutdown: powers off the board by deasserting PS_HOLD pin.
> power_reset: this function software resets the Exynos board when called.
> 
> Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/power.c        |   31 ++++++++++++++++++++++++++++++
>  arch/arm/include/asm/arch-exynos/power.h |   10 +++++++++
>  2 files changed, 41 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
> index 6375a81..2b65bbe 100644
> --- a/arch/arm/cpu/armv7/exynos/power.c
> +++ b/arch/arm/cpu/armv7/exynos/power.c
> @@ -113,6 +113,25 @@ void set_ps_hold_ctrl(void)
>  }
>  

I know that is not related your patch.
But, please remove blank line.

>  
> +void exynos5_power_shutdown(void)
> +{
> +	struct exynos5_power *power =
> +		(struct exynos5_power *)samsung_get_base_power();
> +
> +	clrbits_le32(&power->ps_hold_control, EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
> +}

This function is same purpose with set_ps_hold_ctrl.
So please, add it to set_ps_hold_ctrl.

> +
> +void exynos5_power_reset(void)
> +{
> +	struct exynos5_power *power =
> +		(struct exynos5_power *)samsung_get_base_power();
> +
> +	/* Clear inform1 so there's no change we think we've got a wake reset */
> +	power->inform1 = 0;
> +
> +	setbits_le32(&power->swreset, 1);
> +}
> +
>  static void exynos5_set_xclkout(void)
>  {
>  	struct exynos5_power *power =
> @@ -140,3 +159,15 @@ void set_hw_thermal_trip(void)
>  		setbits_le32(&power->ps_hold_control, POWER_ENABLE_HW_TRIP);
>  	}
>  }
> +
> +void power_shutdown(void)
> +{
> +	if (cpu_is_exynos5())
> +		exynos5_power_shutdown();
> +}
> +
> +void power_reset(void)

swreset?

> +{
> +	if (cpu_is_exynos5())
> +		exynos5_power_reset();
> +}

please move this function under the exynos5_power_reset.
or move exynos5_power_reset to here.

> diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
> index 3549667..6844e0f 100644
> --- a/arch/arm/include/asm/arch-exynos/power.h
> +++ b/arch/arm/include/asm/arch-exynos/power.h
> @@ -888,4 +888,14 @@ void set_ps_hold_ctrl(void);
>   * source as XXTI
>   */
>  void set_xclkout(void);
> +
> +/*
> + * Power off the system; it should never return.
> + */
> +void power_shutdown(void);
> +
> +/*
> + * Perform a software reset.
> + */

please check comment rule.
One line comment should be.. /* .... */

> +void power_reset(void);
>  #endif
> 

Thanks,
Minkyu Kang.

      reply	other threads:[~2013-06-24  5:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  7:06 [U-Boot] [PATCH] EXYNOS: Add API for power reset and shutdown Rajeshwari Shinde
2013-06-24  5:42 ` Minkyu Kang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C7DC2C.2050707@samsung.com \
    --to=mk7.kang@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox