From: Lukasz Majewski <l.majewski@samsung.com>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
Amit Daniel Kachhap <amit.daniel@samsung.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Linux PM list <linux-pm@vger.kernel.org>,
Jonghwa Lee <jonghwa3.lee@samsung.com>,
Lukasz Majewski <l.majewski@majess.pl>,
linux-kernel <linux-kernel@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tomasz Figa <t.figa@samsung.com>,
Myungjoo Ham <myungjoo.ham@samsung.com>,
devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 2/6] thermal: exynos: Provide separate TMU data for Exynos4412
Date: Fri, 04 Oct 2013 12:04:00 +0200 [thread overview]
Message-ID: <20131004120400.397019e4@amdc308.digital.local> (raw)
In-Reply-To: <524DE944.8030603@ti.com>
Hi Eduardo,
> Lukasz,
>
> Just minor comments.
>
> On 24-09-2013 04:08, Lukasz Majewski wrote:
> > Up till now Exynos5250 and Exynos4412 had the same definitions for
> > TMU data. Following commit changes that, by introducing separate
> > exynos4412_default_tmu_data structure.
> >
> > Since Exynos4412 was chronologically first, the corresponding name
> > for TMU registers and default data was renamed.
> >
> > Additionally, new SOC_ARCH_EXYNOS4412 type has been defined.
>
> It is not clear the objective of the patch itself. Was it just to make
> the code more readable or are you fixing something?
I'm fixing thermal on EXYNOS4412 device (trats2). The problem here is
to do it properly, since on the current code EXYNOS4412 and EXYNOS5250
uses the same configuration data.
To fix this problem, I had to split them. Also chronologically the
THERMAL IP first appeared on EXYNOS4412, not EXYNOS5250.
>
> >
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Reviewed-by: Tomasz Figa <t.figa@samsung.com>
> > ---
> > drivers/thermal/samsung/exynos_tmu.c | 7 ++++---
> > drivers/thermal/samsung/exynos_tmu.h | 1 +
> > drivers/thermal/samsung/exynos_tmu_data.c | 26
> > ++++++++++++++++++++------
> > drivers/thermal/samsung/exynos_tmu_data.h | 9 ++++++++- 4 files
> > changed, 33 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/thermal/samsung/exynos_tmu.c
> > b/drivers/thermal/samsung/exynos_tmu.c index b43afda..a858cc4 100644
> > --- a/drivers/thermal/samsung/exynos_tmu.c
> > +++ b/drivers/thermal/samsung/exynos_tmu.c
> > @@ -488,7 +488,7 @@ static const struct of_device_id
> > exynos_tmu_match[] = { },
> > {
> > .compatible = "samsung,exynos4412-tmu",
> > - .data = (void *)EXYNOS5250_TMU_DRV_DATA,
> > + .data = (void *)EXYNOS4412_TMU_DRV_DATA,
> > },
> > {
> > .compatible = "samsung,exynos5250-tmu",
> > @@ -630,8 +630,9 @@ static int exynos_tmu_probe(struct
> > platform_device *pdev) return ret;
> >
> > if (pdata->type == SOC_ARCH_EXYNOS ||
> > - pdata->type == SOC_ARCH_EXYNOS4210 ||
> > - pdata->type == SOC_ARCH_EXYNOS5440)
> > + pdata->type == SOC_ARCH_EXYNOS4210 ||
> > + pdata->type == SOC_ARCH_EXYNOS4412 ||
> > + pdata->type == SOC_ARCH_EXYNOS5440)
> > data->soc = pdata->type;
> > else {
> > ret = -EINVAL;
> > diff --git a/drivers/thermal/samsung/exynos_tmu.h
> > b/drivers/thermal/samsung/exynos_tmu.h index b364c9e..db37df0 100644
> > --- a/drivers/thermal/samsung/exynos_tmu.h
> > +++ b/drivers/thermal/samsung/exynos_tmu.h
> > @@ -41,6 +41,7 @@ enum calibration_mode {
> >
> > enum soc_type {
> > SOC_ARCH_EXYNOS4210 = 1,
> > + SOC_ARCH_EXYNOS4412,
> > SOC_ARCH_EXYNOS,
> > SOC_ARCH_EXYNOS5440,
> > };
>
> I believe the above enum needs some documentation. SOC_ARCH_EXYNOS
> seams to be a bit confusing.
This is fixed at patch 4/6 of the series.
>
> > diff --git a/drivers/thermal/samsung/exynos_tmu_data.c
> > b/drivers/thermal/samsung/exynos_tmu_data.c index 9002499..bd08093
> > 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c
> > +++ b/drivers/thermal/samsung/exynos_tmu_data.c
> > @@ -90,8 +90,8 @@ struct exynos_tmu_init_data const
> > exynos4210_default_tmu_data = { };
> > #endif
> >
> > -#if defined(CONFIG_SOC_EXYNOS5250) ||
> > defined(CONFIG_SOC_EXYNOS4412) -static const struct
> > exynos_tmu_registers exynos5250_tmu_registers = { +#if
> > defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250)
> > +static const struct exynos_tmu_registers exynos4412_tmu_registers
> > = { .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, .triminfo_25_shift =
> > EXYNOS_TRIMINFO_25_SHIFT, .triminfo_85_shift =
> > EXYNOS_TRIMINFO_85_SHIFT, @@ -128,7 +128,7 @@ static const struct
> > exynos_tmu_registers exynos5250_tmu_registers = { .emul_time_mask =
> > EXYNOS_EMUL_TIME_MASK, };
> >
> > -#define EXYNOS5250_TMU_DATA \
> > +#define EXYNOS4412_TMU_DATA \
> > .threshold_falling = 10, \
> > .trigger_levels[0] = 85, \
> > .trigger_levels[1] = 103, \
> > @@ -162,15 +162,29 @@ static const struct exynos_tmu_registers
> > exynos5250_tmu_registers = { .temp_level = 103, \
> > }, \
> > .freq_tab_count = 2, \
> > - .type = SOC_ARCH_EXYNOS, \
> > - .registers = &exynos5250_tmu_registers, \
> > + .registers = &exynos4412_tmu_registers, \
> > .features = (TMU_SUPPORT_EMULATION |
> > TMU_SUPPORT_TRIM_RELOAD | \ TMU_SUPPORT_FALLING_TRIP |
> > TMU_SUPPORT_READY_STATUS | \ TMU_SUPPORT_EMUL_TIME)
> > +#endif
> >
> > +#if defined(CONFIG_SOC_EXYNOS4412)
> > +struct exynos_tmu_init_data const exynos4412_default_tmu_data = {
> > + .tmu_data = {
> > + { EXYNOS4412_TMU_DATA,
> > + .type = SOC_ARCH_EXYNOS4412,
> > + },
> > + },
> > + .tmu_count = 1,
> > +};
> > +#endif
> > +
> > +#if defined(CONFIG_SOC_EXYNOS5250)
> > struct exynos_tmu_init_data const exynos5250_default_tmu_data = {
> > .tmu_data = {
> > - { EXYNOS5250_TMU_DATA },
> > + { EXYNOS4412_TMU_DATA,
> > + .type = SOC_ARCH_EXYNOS,
> > + },
>
> Please add a comment on this initialization, specially because we
> start to mix macros with inline initialization. Starts to be hard to
> follow.
>
> Besides, I believe
> + {
> + EXYNOS4412_TMU_DATA,
> + .type = SOC_ARCH_EXYNOS,
> + },
>
> is a much more common style.
Ok.
>
>
> > },
> > .tmu_count = 1,
> > };
> > diff --git a/drivers/thermal/samsung/exynos_tmu_data.h
> > b/drivers/thermal/samsung/exynos_tmu_data.h index dc7feb5..b130b1e
> > 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.h
> > +++ b/drivers/thermal/samsung/exynos_tmu_data.h
> > @@ -138,7 +138,14 @@ extern struct exynos_tmu_init_data const
> > exynos4210_default_tmu_data; #define EXYNOS4210_TMU_DRV_DATA (NULL)
> > #endif
> >
> > -#if (defined(CONFIG_SOC_EXYNOS5250) ||
> > defined(CONFIG_SOC_EXYNOS4412)) +#if defined(CONFIG_SOC_EXYNOS4412)
> > +extern struct exynos_tmu_init_data const
> > exynos4412_default_tmu_data; +#define EXYNOS4412_TMU_DRV_DATA
> > (&exynos4412_default_tmu_data) +#else
> > +#define EXYNOS4412_TMU_DRV_DATA (NULL)
> > +#endif
> > +
> > +#if defined(CONFIG_SOC_EXYNOS5250)
> > extern struct exynos_tmu_init_data const
> > exynos5250_default_tmu_data; #define EXYNOS5250_TMU_DRV_DATA
> > (&exynos5250_default_tmu_data) #else
> >
>
>
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2013-10-04 10:04 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 8:08 [PATCH 0/6] thermal: exynos: Fixes for v3.12 Lukasz Majewski
2013-09-24 8:08 ` [PATCH 1/6] thermal: exynos: fix: Return from exynos_report_trigger() when therm_dev is NULL Lukasz Majewski
2013-09-30 10:52 ` amit daniel kachhap
2013-10-03 21:40 ` Eduardo Valentin
2013-10-03 21:40 ` Eduardo Valentin
[not found] ` <524DE45E.1060606-l0cyMroinI0@public.gmane.org>
2013-10-04 9:56 ` Lukasz Majewski
2013-10-04 9:56 ` Lukasz Majewski
2013-09-24 8:08 ` [PATCH 2/6] thermal: exynos: Provide separate TMU data for Exynos4412 Lukasz Majewski
2013-09-30 11:43 ` amit daniel kachhap
2013-10-03 22:01 ` Eduardo Valentin
2013-10-03 22:01 ` Eduardo Valentin
2013-10-04 10:04 ` Lukasz Majewski [this message]
2013-09-24 8:08 ` [PATCH 3/6] thermal: exynos: Provide initial setting for TMU's test MUX address at Exynos4412 Lukasz Majewski
2013-09-30 11:59 ` amit daniel kachhap
[not found] ` <CADGdYn6a1jSR17v0N6kVFZFsn71FUbXJHjeSya-xy_wX9GtYpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-01 6:55 ` Lukasz Majewski
2013-10-01 6:55 ` Lukasz Majewski
[not found] ` <1380010102-25817-4-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-03 22:05 ` Eduardo Valentin
2013-10-03 22:05 ` Eduardo Valentin
2013-10-04 10:20 ` Lukasz Majewski
2013-09-24 8:08 ` [PATCH 4/6] thermal: exynos: Replace SOC_ARCH_EXYNOS with SOC_ARCH_EXYNOS5250 Lukasz Majewski
[not found] ` <1380010102-25817-5-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-30 12:02 ` amit daniel kachhap
2013-09-30 12:02 ` amit daniel kachhap
2013-10-03 22:08 ` Eduardo Valentin
2013-10-03 22:08 ` Eduardo Valentin
2013-10-04 10:13 ` Bartlomiej Zolnierkiewicz
2013-10-04 10:23 ` Lukasz Majewski
2013-10-04 10:47 ` Bartlomiej Zolnierkiewicz
2013-10-04 15:07 ` Eduardo Valentin
2013-10-04 15:07 ` Eduardo Valentin
2013-09-24 8:08 ` [PATCH 5/6] ARM: dts: exynos4x12: Device tree node definition for TMU on Exynos4x12 Lukasz Majewski
2013-09-24 8:08 ` [PATCH 6/6] ARM: dts: exynos4412-trats2: Enable TMU support at Trats2 Lukasz Majewski
2013-09-24 9:29 ` [PATCH 0/6] thermal: exynos: Fixes for v3.12 Tomasz Figa
2013-10-03 13:29 ` Lukasz Majewski
2013-10-09 6:29 ` [PATCH v2 0/5] " Lukasz Majewski
[not found] ` <1381300194-13134-1-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-09 6:29 ` [PATCH v2 1/5] thermal: exynos: Remove check for thermal device pointer at exynos_report_trigger() Lukasz Majewski
2013-10-09 6:29 ` Lukasz Majewski
2013-10-09 6:29 ` [PATCH v2 2/5] thermal: exynos: Provide separate TMU data for Exynos4412 Lukasz Majewski
2013-10-09 6:29 ` Lukasz Majewski
2013-10-14 14:20 ` Eduardo Valentin
2013-10-14 14:20 ` Eduardo Valentin
2013-10-14 14:52 ` Lukasz Majewski
2013-10-09 6:29 ` [PATCH v2 3/5] thermal: exynos: Provide initial setting for TMU's test MUX address at Exynos4412 Lukasz Majewski
2013-10-14 14:24 ` Eduardo Valentin
2013-10-14 14:24 ` Eduardo Valentin
2013-10-14 15:00 ` Lukasz Majewski
2013-10-14 19:20 ` Eduardo Valentin
2013-10-14 19:20 ` Eduardo Valentin
2013-10-09 6:29 ` [PATCH v2 4/5] ARM: dts: exynos4x12: Device tree node definition for TMU on Exynos4x12 Lukasz Majewski
2013-10-15 6:27 ` Lukasz Majewski
2013-10-15 13:37 ` Eduardo Valentin
2013-11-27 7:11 ` Lukasz Majewski
2013-11-27 11:34 ` kgene
2013-11-27 12:39 ` Lukasz Majewski
2013-12-09 8:33 ` Lukasz Majewski
[not found] ` <1381300194-13134-5-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-14 10:03 ` [RESEND PATCH 1/2] " Lukasz Majewski
2014-11-14 10:03 ` Lukasz Majewski
2014-11-14 10:03 ` Lukasz Majewski
[not found] ` <1415959405-14157-1-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-14 10:03 ` [RESEND PATCH 2/2] ARM: dts: exynos4412-trats2: Enable TMU support at Trats2 Lukasz Majewski
2014-11-14 10:03 ` Lukasz Majewski
2014-11-14 10:03 ` Lukasz Majewski
2013-10-09 6:29 ` [PATCH v2 5/5] " Lukasz Majewski
2013-10-15 6:29 ` Lukasz Majewski
2013-11-27 7:12 ` Lukasz Majewski
2013-11-27 11:36 ` kgene
2014-11-14 9:26 ` Lukasz Majewski
2013-10-14 5:46 ` [PATCH v2 0/5] thermal: exynos: Fixes for v3.12 Lukasz Majewski
2013-10-14 5:52 ` Zhang, Rui
[not found] ` <744357E9AAD1214791ACBA4B0B90926301190077-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-10-14 19:13 ` Eduardo Valentin
2013-10-14 19:13 ` Eduardo Valentin
2013-10-14 19:22 ` Eduardo Valentin
2013-10-15 6:23 ` Lukasz Majewski
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=20131004120400.397019e4@amdc308.digital.local \
--to=l.majewski@samsung.com \
--cc=amit.daniel@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=eduardo.valentin@ti.com \
--cc=jonghwa3.lee@samsung.com \
--cc=l.majewski@majess.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rjw@sisk.pl \
--cc=rui.zhang@intel.com \
--cc=t.figa@samsung.com \
/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 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.