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 4/9 v9] EXYNOS5: TMU: Add TMU init and status check
Date: Wed, 20 Feb 2013 17:41:02 +0900	[thread overview]
Message-ID: <51248C1E.6050402@samsung.com> (raw)
In-Reply-To: <1360156726-13315-5-git-send-email-akshay.s@samsung.com>

On 06/02/13 22:18, Akshay Saraswat wrote:
> This adds call to tmu_init() and TMU boot time analysis
> for the SoC temperature threshold breach.
> 
> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
> Changes since v8:
> 	- None.
> 
>  board/samsung/smdk5250/smdk5250.c |   35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 7a5f132..7b9a8c5 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -35,9 +35,35 @@
>  #include <asm/arch/sromc.h>
>  #include <asm/arch/dp_info.h>
>  #include <power/pmic.h>
> +#include <tmu.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> +#if defined CONFIG_EXYNOS_TMU
> +/*
> + * Boot Time Thermal Analysis for SoC temperature threshold breach
> + */
> +void boot_temp_check(void)

static?

> +{
> +	int temp;
> +
> +	switch (tmu_monitor(&temp)) {
> +	case TMU_STATUS_TRIPPED:
> +		puts("EXYNOS_TMU: TRIPPING! Device power going down ...\n");
> +		board_poweroff();
> +		break;
> +	case TMU_STATUS_WARNING:
> +		puts("EXYNOS_TMU: WARNING! Temperature very high\n");
> +		break;
> +	case TMU_STATUS_NORMAL:
> +		break;

no action? then please remove it.

> +	case TMU_STATUS_INIT:

is it unknown state?

> +	default:
> +		debug("Unknown TMU state\n");
> +	}
> +}
> +#endif
> +
>  #ifdef CONFIG_USB_EHCI_EXYNOS
>  int board_usb_vbus_init(void)
>  {
> @@ -57,6 +83,15 @@ int board_usb_vbus_init(void)
>  int board_init(void)
>  {
>  	gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
> +
> +#if defined CONFIG_EXYNOS_TMU
> +	if (tmu_init(gd->fdt_blob)) {
> +		debug("%s: Failed to init TMU\n", __func__);
> +		return -1;
> +	}
> +	boot_temp_check();
> +#endif
> +
>  #ifdef CONFIG_EXYNOS_SPI
>  	spi_init();
>  #endif
> 

Thanks,
Minkyu Kang.

  reply	other threads:[~2013-02-20  8:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 13:18 [U-Boot] [PATCH 0/9 v9] Add TMU support for Exynos5250 based SMDK5250 Akshay Saraswat
2013-02-06 13:18 ` [U-Boot] [PATCH 1/9 v9] EXYNOS5: TMU: Add driver for Thermal Management Unit Akshay Saraswat
2013-02-20  8:36   ` Minkyu Kang
2013-02-06 13:18 ` [U-Boot] [PATCH 2/9 v9] EXYNOS5: Implement board_poweroff " Akshay Saraswat
2013-02-20  8:38   ` Minkyu Kang
2013-02-06 13:18 ` [U-Boot] [PATCH 3/9 v9] EXYNOS5: FDT: Add TMU device node values Akshay Saraswat
2013-02-06 13:18 ` [U-Boot] [PATCH 4/9 v9] EXYNOS5: TMU: Add TMU init and status check Akshay Saraswat
2013-02-20  8:41   ` Minkyu Kang [this message]
2013-02-06 13:18 ` [U-Boot] [PATCH 5/9 v9] EXYNOS5: Config: Enable support for Exynos TMU driver Akshay Saraswat
2013-02-06 13:18 ` [U-Boot] [PATCH 6/9 v9] TMU: Add TMU support in dtt command Akshay Saraswat
2013-02-06 16:36   ` Simon Glass
2013-02-06 13:18 ` [U-Boot] [PATCH 7/9 v9] EXYNOS5: Config: Enable dtt command for TMU Akshay Saraswat
2013-02-06 13:18 ` [U-Boot] [PATCH 8/9 v9] EXYNOS5: TMU: Add hardware tripping Akshay Saraswat
2013-02-20  8:46   ` Minkyu Kang
2013-02-06 13:18 ` [U-Boot] [PATCH 9/9 v9] EXYNOS5: FDT: Add a H/W-trip member to TMU node Akshay Saraswat

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=51248C1E.6050402@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