All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Baydarov <kbaidarov@dev.rtsoft.ru>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: b-cousson@ti.com, kishon@ti.com, santosh.shilimkar@ti.com,
	tony@atomide.com, paul@pwsan.com, amit.kucheria@linaro.org,
	Eduardo Valentin <eduardo.valentin@ti.com>,
	balbi@ti.com, linux-pm@lists.linux-foundation.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	amit.kachhap@linaro.org
Subject: Re: [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type
Date: Wed, 25 Jul 2012 16:45:53 +0400	[thread overview]
Message-ID: <500FEA81.6010100@dev.rtsoft.ru> (raw)
In-Reply-To: <500FE915.6090707@mvista.com>

  HI, Sergei.

On 07/25/2012 04:39 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 25-07-2012 15:05, Konstantin Baydarov wrote:
>
>> OMAP system control module can be probed early, then
>> omap_type is safe to use its APIs.
>
>> TODO: add support for other omap versions
>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> Signed-off-by: Konstantin Baydarov <kbaidarov@dev.rtsoft.ru>
>> ---
>>   arch/arm/mach-omap2/id.c |   11 ++++++-----
>>   1 files changed, 6 insertions(+), 5 deletions(-)
>
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index 40373db..8018cad 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
> [...]
>> @@ -43,15 +44,15 @@ int omap_type(void)
>>       u32 val = 0;
>>
>>       if (cpu_is_omap24xx()) {
>> -        val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (soc_is_am33xx()) {
>> -        val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (cpu_is_omap34xx()) {
>> -        val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (cpu_is_omap44xx()) {
>> -        val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
>> +        val = omap_control_status_read();
>
>    Isn't it better to merge now identical code into one *if*?
Good point.
>
> WBR, Sergei
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


WARNING: multiple messages have this Message-ID (diff)
From: kbaidarov@dev.rtsoft.ru (Konstantin Baydarov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type
Date: Wed, 25 Jul 2012 16:45:53 +0400	[thread overview]
Message-ID: <500FEA81.6010100@dev.rtsoft.ru> (raw)
In-Reply-To: <500FE915.6090707@mvista.com>

  HI, Sergei.

On 07/25/2012 04:39 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 25-07-2012 15:05, Konstantin Baydarov wrote:
>
>> OMAP system control module can be probed early, then
>> omap_type is safe to use its APIs.
>
>> TODO: add support for other omap versions
>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> Signed-off-by: Konstantin Baydarov <kbaidarov@dev.rtsoft.ru>
>> ---
>>   arch/arm/mach-omap2/id.c |   11 ++++++-----
>>   1 files changed, 6 insertions(+), 5 deletions(-)
>
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index 40373db..8018cad 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
> [...]
>> @@ -43,15 +44,15 @@ int omap_type(void)
>>       u32 val = 0;
>>
>>       if (cpu_is_omap24xx()) {
>> -        val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (soc_is_am33xx()) {
>> -        val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (cpu_is_omap34xx()) {
>> -        val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
>> +        val = omap_control_status_read();
>>       } else if (cpu_is_omap44xx()) {
>> -        val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
>> +        val = omap_control_status_read();
>
>    Isn't it better to merge now identical code into one *if*?
Good point.
>
> WBR, Sergei
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-07-25 12:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 11:05 [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type Konstantin Baydarov
2012-07-25 11:05 ` Konstantin Baydarov
2012-07-25 12:39 ` Sergei Shtylyov
2012-07-25 12:39   ` Sergei Shtylyov
2012-07-25 12:45   ` Konstantin Baydarov [this message]
2012-07-25 12:45     ` Konstantin Baydarov

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=500FEA81.6010100@dev.rtsoft.ru \
    --to=kbaidarov@dev.rtsoft.ru \
    --cc=amit.kachhap@linaro.org \
    --cc=amit.kucheria@linaro.org \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=eduardo.valentin@ti.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=paul@pwsan.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=sshtylyov@mvista.com \
    --cc=tony@atomide.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.