[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <524DEA1D.4010100@ti.com>
Date: Thu, 3 Oct 2013 18:05:17 -0400
From: Eduardo Valentin <eduardo.valentin@...com>
To: Lukasz Majewski <l.majewski@...sung.com>
CC: Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <eduardo.valentin@...com>,
Amit Daniel Kachhap <amit.daniel@...sung.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Linux PM list <linux-pm@...r.kernel.org>,
Jonghwa Lee <jonghwa3.lee@...sung.com>,
Lukasz Majewski <l.majewski@...ess.pl>,
linux-kernel <linux-kernel@...r.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Tomasz Figa <t.figa@...sung.com>,
Myungjoo Ham <myungjoo.ham@...sung.com>,
<devicetree@...r.kernel.org>, <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH 3/6] thermal: exynos: Provide initial setting for TMU's
test MUX address at Exynos4412
On 24-09-2013 04:08, Lukasz Majewski wrote:
> The commit d0a0ce3e77c795258d47f9163e92d5031d0c5221 ("thermal: exynos: Add
> missing definations and code cleanup") has removed setting of test MUX address
> value at TMU configuration setting.
>
> This field is not present on Exynos4210 and Exynos5 SoCs. However on Exynos4412
> SoC it is required to set this field after reset because without it TMU shows
> maximal available temperature, which causes immediate platform shutdown.
>
> Signed-off-by: Lukasz Majewski <l.majewski@...sung.com>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Reviewed-by: Tomasz Figa <t.figa@...sung.com>
> ---
> drivers/thermal/samsung/exynos_tmu.c | 3 +++
> drivers/thermal/samsung/exynos_tmu_data.h | 4 ++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index a858cc4..21b89e4 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -317,6 +317,9 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
>
> con = readl(data->base + reg->tmu_ctrl);
>
> + if (pdata->type == SOC_ARCH_EXYNOS4412)
> + con |= (EXYNOS4412_MUX_ADDR_VALUE << EXYNOS4412_MUX_ADDR_SHIFT);
Amit has introduced a way to describe features instead of checking
features per type. It would be interesting to have a reasoning why not
to use it. Think what if new Exynos TMU versions come, are you guys
going to steadily increase the above check for type?
> +
> if (pdata->reference_voltage) {
> con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
> con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
> diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h
> index b130b1e..a1ea19d 100644
> --- a/drivers/thermal/samsung/exynos_tmu_data.h
> +++ b/drivers/thermal/samsung/exynos_tmu_data.h
> @@ -95,6 +95,10 @@
>
> #define EXYNOS_MAX_TRIGGER_PER_REG 4
>
> +/* Exynos4412 specific */
> +#define EXYNOS4412_MUX_ADDR_VALUE 6
> +#define EXYNOS4412_MUX_ADDR_SHIFT 20
> +
> /*exynos5440 specific registers*/
> #define EXYNOS5440_TMU_S0_7_TRIM 0x000
> #define EXYNOS5440_TMU_S0_7_CTRL 0x020
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
Download attachment "signature.asc" of type "application/pgp-signature" (296 bytes)
Powered by blists - more mailing lists