2012-05-04 08:30:27

by AnilKumar, Chimata

[permalink] [raw]
Subject: RE: [PATCH V3 04/10] ARM: OMAP3: hwmod: rename the smartreflex entries

On Thu, Apr 26, 2012 at 23:10:35, J, KEERTHY wrote:
> From: Jean Pihet <[email protected]>
>
> Change the name field value to better reflect the smartreflex
> integration in the system.
>
> Signed-off-by: Jean Pihet <[email protected]>
> Signed-off-by: J Keerthy <[email protected]>
> ---
> arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 ++++----
> arch/arm/mach-omap2/smartreflex.c | 2 +-
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 144d118..15907b0 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -1324,7 +1324,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
> };
>
> static struct omap_hwmod omap34xx_sr1_hwmod = {
> - .name = "sr1",
> + .name = "smartreflex_mpu_iva",
> .class = &omap34xx_smartreflex_hwmod_class,
> .main_clk = "sr1_fck",
> .prcm = {
> @@ -1342,7 +1342,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
> };
>
> static struct omap_hwmod omap36xx_sr1_hwmod = {
> - .name = "sr1",
> + .name = "smartreflex_mpu_iva",
> .class = &omap36xx_smartreflex_hwmod_class,
> .main_clk = "sr1_fck",
> .prcm = {
> @@ -1369,7 +1369,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
> };
>
> static struct omap_hwmod omap34xx_sr2_hwmod = {
> - .name = "sr2",
> + .name = "smartreflex_core",
> .class = &omap34xx_smartreflex_hwmod_class,
> .main_clk = "sr2_fck",
> .prcm = {
> @@ -1387,7 +1387,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
> };
>
> static struct omap_hwmod omap36xx_sr2_hwmod = {
> - .name = "sr2",
> + .name = "smartreflex_core",
> .class = &omap36xx_smartreflex_hwmod_class,
> .main_clk = "sr2_fck",
> .prcm = {
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 2edd1e2..d859277 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -183,7 +183,7 @@ static void sr_set_regfields(struct omap_sr *sr)
> sr->err_weight = OMAP3430_SR_ERRWEIGHT;
> sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
> sr->accum_data = OMAP3430_SR_ACCUMDATA;
> - if (!(strcmp(sr->name, "sr1"))) {
> + if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {

What if voltage rail is different for mpu and iva? I have seen some devices
supports SmartReflex have different voltage rails for mpu and iva.

Regards
AnilKumar


2012-05-04 10:11:38

by Keerthy

[permalink] [raw]
Subject: Re: [PATCH V3 04/10] ARM: OMAP3: hwmod: rename the smartreflex entries

Hi AnilKumar,

Thanks for reviewing.

On Fri, May 4, 2012 at 2:00 PM, AnilKumar, Chimata <[email protected]> wrote:
> On Thu, Apr 26, 2012 at 23:10:35, J, KEERTHY wrote:
>> From: Jean Pihet <[email protected]>
>>
>> Change the name field value to better reflect the smartreflex
>> integration in the system.
>>
>> Signed-off-by: Jean Pihet <[email protected]>
>> Signed-off-by: J Keerthy <[email protected]>
>> ---
>> ?arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | ? ?8 ++++----
>> ?arch/arm/mach-omap2/smartreflex.c ? ? ? ? ?| ? ?2 +-
>> ?2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>> index 144d118..15907b0 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>> @@ -1324,7 +1324,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
>> ?};
>>
>> ?static struct omap_hwmod omap34xx_sr1_hwmod = {
>> - ? ? .name ? ? ? ? ? = "sr1",
>> + ? ? .name ? ? ? ? ? = "smartreflex_mpu_iva",
>> ? ? ? .class ? ? ? ? ?= &omap34xx_smartreflex_hwmod_class,
>> ? ? ? .main_clk ? ? ? = "sr1_fck",
>> ? ? ? .prcm ? ? ? ? ? = {
>> @@ -1342,7 +1342,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
>> ?};
>>
>> ?static struct omap_hwmod omap36xx_sr1_hwmod = {
>> - ? ? .name ? ? ? ? ? = "sr1",
>> + ? ? .name ? ? ? ? ? = "smartreflex_mpu_iva",
>> ? ? ? .class ? ? ? ? ?= &omap36xx_smartreflex_hwmod_class,
>> ? ? ? .main_clk ? ? ? = "sr1_fck",
>> ? ? ? .prcm ? ? ? ? ? = {
>> @@ -1369,7 +1369,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
>> ?};
>>
>> ?static struct omap_hwmod omap34xx_sr2_hwmod = {
>> - ? ? .name ? ? ? ? ? = "sr2",
>> + ? ? .name ? ? ? ? ? = "smartreflex_core",
>> ? ? ? .class ? ? ? ? ?= &omap34xx_smartreflex_hwmod_class,
>> ? ? ? .main_clk ? ? ? = "sr2_fck",
>> ? ? ? .prcm ? ? ? ? ? = {
>> @@ -1387,7 +1387,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
>> ?};
>>
>> ?static struct omap_hwmod omap36xx_sr2_hwmod = {
>> - ? ? .name ? ? ? ? ? = "sr2",
>> + ? ? .name ? ? ? ? ? = "smartreflex_core",
>> ? ? ? .class ? ? ? ? ?= &omap36xx_smartreflex_hwmod_class,
>> ? ? ? .main_clk ? ? ? = "sr2_fck",
>> ? ? ? .prcm ? ? ? ? ? = {
>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>> index 2edd1e2..d859277 100644
>> --- a/arch/arm/mach-omap2/smartreflex.c
>> +++ b/arch/arm/mach-omap2/smartreflex.c
>> @@ -183,7 +183,7 @@ static void sr_set_regfields(struct omap_sr *sr)
>> ? ? ? ? ? ? ? sr->err_weight = OMAP3430_SR_ERRWEIGHT;
>> ? ? ? ? ? ? ? sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
>> ? ? ? ? ? ? ? sr->accum_data = OMAP3430_SR_ACCUMDATA;
>> - ? ? ? ? ? ? if (!(strcmp(sr->name, "sr1"))) {
>> + ? ? ? ? ? ? if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {
>
> What if voltage rail is different for mpu and iva? I have seen some devices
> supports SmartReflex have different voltage rails for mpu and iva.
>

I get the point. OMAP3 iva and mpu have a common rail. OMAP4 onwards
even we have different rails for mpu and iva. I will enhance the checks here.

> Regards
> AnilKumar



--
Regards and Thanks,
Keerthy

2012-05-07 23:39:43

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH V3 04/10] ARM: OMAP3: hwmod: rename the smartreflex entries

"J, KEERTHY" <[email protected]> writes:

> Hi AnilKumar,
>
> Thanks for reviewing.
>
> On Fri, May 4, 2012 at 2:00 PM, AnilKumar, Chimata <[email protected]> wrote:
>> On Thu, Apr 26, 2012 at 23:10:35, J, KEERTHY wrote:
>>> From: Jean Pihet <[email protected]>
>>>
>>> Change the name field value to better reflect the smartreflex
>>> integration in the system.
>>>
>>> Signed-off-by: Jean Pihet <[email protected]>
>>> Signed-off-by: J Keerthy <[email protected]>
>>> ---
>>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    8 ++++----
>>>  arch/arm/mach-omap2/smartreflex.c          |    2 +-
>>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>>> index 144d118..15907b0 100644
>>> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>>> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>>> @@ -1324,7 +1324,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
>>>  };
>>>
>>>  static struct omap_hwmod omap34xx_sr1_hwmod = {
>>> -     .name           = "sr1",
>>> +     .name           = "smartreflex_mpu_iva",
>>>       .class          = &omap34xx_smartreflex_hwmod_class,
>>>       .main_clk       = "sr1_fck",
>>>       .prcm           = {
>>> @@ -1342,7 +1342,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
>>>  };
>>>
>>>  static struct omap_hwmod omap36xx_sr1_hwmod = {
>>> -     .name           = "sr1",
>>> +     .name           = "smartreflex_mpu_iva",
>>>       .class          = &omap36xx_smartreflex_hwmod_class,
>>>       .main_clk       = "sr1_fck",
>>>       .prcm           = {
>>> @@ -1369,7 +1369,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
>>>  };
>>>
>>>  static struct omap_hwmod omap34xx_sr2_hwmod = {
>>> -     .name           = "sr2",
>>> +     .name           = "smartreflex_core",
>>>       .class          = &omap34xx_smartreflex_hwmod_class,
>>>       .main_clk       = "sr2_fck",
>>>       .prcm           = {
>>> @@ -1387,7 +1387,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
>>>  };
>>>
>>>  static struct omap_hwmod omap36xx_sr2_hwmod = {
>>> -     .name           = "sr2",
>>> +     .name           = "smartreflex_core",
>>>       .class          = &omap36xx_smartreflex_hwmod_class,
>>>       .main_clk       = "sr2_fck",
>>>       .prcm           = {
>>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>>> index 2edd1e2..d859277 100644
>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>> @@ -183,7 +183,7 @@ static void sr_set_regfields(struct omap_sr *sr)
>>>               sr->err_weight = OMAP3430_SR_ERRWEIGHT;
>>>               sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
>>>               sr->accum_data = OMAP3430_SR_ACCUMDATA;
>>> -             if (!(strcmp(sr->name, "sr1"))) {
>>> +             if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {
>>
>> What if voltage rail is different for mpu and iva? I have seen some devices
>> supports SmartReflex have different voltage rails for mpu and iva.
>>
>
> I get the point. OMAP3 iva and mpu have a common rail. OMAP4 onwards
> even we have different rails for mpu and iva. I will enhance the checks here.

Rather than enhancing the checks, this SoC specific data should probably
just be made part of the SoC specific hwmod dev_attr.

Kevin

2012-05-07 23:55:24

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH V3 04/10] ARM: OMAP3: hwmod: rename the smartreflex entries

Kevin Hilman <[email protected]> writes:

> "J, KEERTHY" <[email protected]> writes:

[...]

>>>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>>>> index 2edd1e2..d859277 100644
>>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>>> @@ -183,7 +183,7 @@ static void sr_set_regfields(struct omap_sr *sr)
>>>>               sr->err_weight = OMAP3430_SR_ERRWEIGHT;
>>>>               sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
>>>>               sr->accum_data = OMAP3430_SR_ACCUMDATA;
>>>> -             if (!(strcmp(sr->name, "sr1"))) {
>>>> +             if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {
>>>
>>> What if voltage rail is different for mpu and iva? I have seen some devices
>>> supports SmartReflex have different voltage rails for mpu and iva.
>>>
>>
>> I get the point. OMAP3 iva and mpu have a common rail. OMAP4 onwards
>> even we have different rails for mpu and iva. I will enhance the checks here.
>
> Rather than enhancing the checks, this SoC specific data should probably
> just be made part of the SoC specific hwmod dev_attr.

That being said, this is an additional feature we can add after this
driver is moved.

I would like this series to concentrate on the cleanups necessary to
move to drivers/*, then additional features to support other SoCs can be
added on top.

Keerthy, please prepare a patch to generalize this to other SoCs by
using dev_attr for this SoC specific data. We can add it after this
series is merged upstream.

Thanks,

Kevin

2012-05-08 03:50:04

by Keerthy

[permalink] [raw]
Subject: Re: [PATCH V3 04/10] ARM: OMAP3: hwmod: rename the smartreflex entries

On Tue, May 8, 2012 at 5:25 AM, Kevin Hilman <[email protected]> wrote:
> Kevin Hilman <[email protected]> writes:
>
>> "J, KEERTHY" <[email protected]> writes:
>
> [...]
>
>>>>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>>>>> index 2edd1e2..d859277 100644
>>>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>>>> @@ -183,7 +183,7 @@ static void sr_set_regfields(struct omap_sr *sr)
>>>>> ? ? ? ? ? ? ? sr->err_weight = OMAP3430_SR_ERRWEIGHT;
>>>>> ? ? ? ? ? ? ? sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
>>>>> ? ? ? ? ? ? ? sr->accum_data = OMAP3430_SR_ACCUMDATA;
>>>>> - ? ? ? ? ? ? if (!(strcmp(sr->name, "sr1"))) {
>>>>> + ? ? ? ? ? ? if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {
>>>>
>>>> What if voltage rail is different for mpu and iva? I have seen some devices
>>>> supports SmartReflex have different voltage rails for mpu and iva.
>>>>
>>>
>>> I get the point. OMAP3 iva and mpu have a common rail. OMAP4 onwards
>>> even we have different rails for mpu and iva. I will enhance the checks here.
>>
>> Rather than enhancing the checks, this SoC specific data should probably
>> just be made part of the SoC specific hwmod dev_attr.
>
> That being said, this is an additional feature we can add after this
> driver is moved.
>
> I would like this series to concentrate on the cleanups necessary to
> move to drivers/*, then additional features to support other SoCs can be
> added on top.
>
> Keerthy, please prepare a patch to generalize this to other SoCs by
> using dev_attr for this SoC specific data. ? We can add it after this
> series is merged upstream.
Kevin,

Ok. I will do that.

>
> Thanks,
>
> Kevin



--
Regards and Thanks,
Keerthy