Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Cousson, Benoit
Hi Thara,

On 12/20/2010 6:00 PM, Gopinath, Thara wrote:
 From: Benoit Coussonb-cous...@ti.com
 
 This patch adds the hwmod details for OMAP4 smartreflex modules.
 
 Signed-off-by: Benoit Coussonb-cous...@ti.com

You're s-o-b is missing, along with the changed you did to the patch.

 ---
   arch/arm/mach-omap2/omap_hwmod_44xx_data.c |  168 
 
   1 files changed, 168 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
 b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
 index 7367648..0a6e674 100644
 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
 +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
 @@ -1740,6 +1740,169 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
   .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
   };
 
 +/*
 + * 'smartreflex' class
 + * smartreflex module (monitor silicon performance and outputs a measure of
 + * performance error)
 + */
 +
 +/* The IP is not compliant to type1 / type2 scheme */
 +static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
 + .sidle_shift= 24,
 + .enwkup_shift   = 26,
 +};
 +
 +static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
 + .sysc_offs  = 0x0038,
 + .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
 + .idlemodes  = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),

The newly added SIDLE_SMART_WKUP flag is missing. 

 + .sysc_fields=omap_hwmod_sysc_type_smartreflex,
 +};
 +
 +static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
 + .name = smartreflex,
 + .sysc =omap44xx_smartreflex_sysc,
 + .rev  = 2,
 +};
 +
 +/* smartreflex_core */
 +static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
 +static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
 + { .irq = 19 + OMAP44XX_IRQ_GIC_START },
 +};
 +
 +static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
 + {
 + .pa_start   = 0x4a0dd000,
 + .pa_end = 0x4a0dd03f,
 + .flags  = ADDR_TYPE_RT
 + },
 +};
 +
 +/* l4_cfg -  smartreflex_core */
 +static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
 + .master =omap44xx_l4_cfg_hwmod,
 + .slave  =omap44xx_smartreflex_core_hwmod,
 + .clk= l4_div_ck,
 + .addr   = omap44xx_smartreflex_core_addrs,
 + .addr_cnt   = ARRAY_SIZE(omap44xx_smartreflex_core_addrs),
 + .user   = OCP_USER_MPU | OCP_USER_SDMA,
 +};
 +
 +/* smartreflex_core slave ports */
 +static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
 + omap44xx_l4_cfg__smartreflex_core,
 +};
 +
 +static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
 + .name   = smartreflex_core,
 + .class  =omap44xx_smartreflex_hwmod_class,
 + .mpu_irqs   = omap44xx_smartreflex_core_irqs,
 + .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_smartreflex_core_irqs),
 + .main_clk   = smartreflex_core_fck,
 + .vdd_name   = core,
 + .prcm = {
 + .omap4 = {
 + .clkctrl_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
 + },
 + },
 + .slaves = omap44xx_smartreflex_core_slaves,
 + .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
 + .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 +};
 +
 +/* smartreflex_iva */
 +static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
 +static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
 + { .irq = 102 + OMAP44XX_IRQ_GIC_START },
 +};
 +
 +static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
 + {
 + .pa_start   = 0x4a0db000,
 + .pa_end = 0x4a0db03f,
 + .flags  = ADDR_TYPE_RT
 + },
 +};
 +
 +/* l4_cfg -  smartreflex_iva */
 +static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
 + .master =omap44xx_l4_cfg_hwmod,
 + .slave  =omap44xx_smartreflex_iva_hwmod,
 + .clk= l4_div_ck,
 + .addr   = omap44xx_smartreflex_iva_addrs,
 + .addr_cnt   = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs),
 + .user   = OCP_USER_MPU | OCP_USER_SDMA,
 +};
 +
 +/* smartreflex_iva slave ports */
 +static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
 + omap44xx_l4_cfg__smartreflex_iva,
 +};
 +
 +static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
 + .name   = smartreflex_iva,
 + .class  =omap44xx_smartreflex_hwmod_class,
 + .mpu_irqs   = omap44xx_smartreflex_iva_irqs,
 + .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_smartreflex_iva_irqs),
 + .main_clk   = smartreflex_iva_fck,
 + .vdd_name   = iva,
 + .prcm = {
 + .omap4 = {
 + .clkctrl_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
 + },
 + },
 + .slaves

Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Menon, Nishanth
On Thu, Dec 23, 2010 at 06:07, Cousson, Benoit b-cous...@ti.com wrote:


 Please note the following log when enabling SR in Class 3 on an OMAP4430/sdp:

 [    2.362182] omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu
 [    2.369384] omap2_set_init_voltage: Unable to put vdd_mpu to its init 
 voltage
 [    2.369384]
 [    2.378875] omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
 [    2.386108] omap2_set_init_voltage: Unable to put vdd_iva to its init 
 voltage
 [    2.386108]
 [    2.396484] Power Management for TI OMAP4.
 [    2.401031] sr_init: No PMIC hook to init smartreflex
 [    2.406494] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver 
 initialized
 [    2.414825] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver 
 initialized
 [    2.423187] smartreflex smartreflex.2: omap_sr_probe: SmartReflex driver 
 initialized
 [    2.431732] SmartReflex Class3 initialized

Dumb question: how are you testing this? just boot log? or additional
patch for DVFS?


Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Cousson, Benoit

On 12/23/2010 2:25 PM, Menon, Nishanth wrote:

On Thu, Dec 23, 2010 at 06:07, Cousson, Benoitb-cous...@ti.com  wrote:



Please note the following log when enabling SR in Class 3 on an OMAP4430/sdp:

[2.362182] omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu
[2.369384] omap2_set_init_voltage: Unable to put vdd_mpu to its init voltage
[2.369384]
[2.378875] omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
[2.386108] omap2_set_init_voltage: Unable to put vdd_iva to its init voltage
[2.386108]
[2.396484] Power Management for TI OMAP4.
[2.401031] sr_init: No PMIC hook to init smartreflex
[2.406494] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver 
initialized
[2.414825] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver 
initialized
[2.423187] smartreflex smartreflex.2: omap_sr_probe: SmartReflex driver 
initialized
[2.431732] SmartReflex Class3 initialized


Dumb question: how are you testing this? just boot log? or additional
patch for DVFS?


Unfortunately, it is just a boot log since I do not have any DVFS code 
on top of it :-(


That's why I was not expecting any errors at that time.

Benoit

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Vishwanath Sripathy
Benoit,

 -Original Message-
 From: Cousson, Benoit [mailto:b-cous...@ti.com]
 Sent: Thursday, December 23, 2010 5:37 PM
 To: Gopinath, Thara
 Cc: linux-omap@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
 khil...@deeprootsystems.com; p...@pwsan.com; Sripathy,
 Vishwanath; Sawant, Anand; Menon, Nishanth
 Subject: Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for
 smartreflex modules.

 Hi Thara,

 On 12/20/2010 6:00 PM, Gopinath, Thara wrote:
  From: Benoit Coussonb-cous...@ti.com
 
  This patch adds the hwmod details for OMAP4 smartreflex modules.
 
  Signed-off-by: Benoit Coussonb-cous...@ti.com

 You're s-o-b is missing, along with the changed you did to the patch.

  ---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c |  168
 
1 files changed, 168 insertions(+), 0 deletions(-)
 
  diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
 b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
  index 7367648..0a6e674 100644
  --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
  +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
  @@ -1740,6 +1740,169 @@ static struct omap_hwmod
 omap44xx_wd_timer3_hwmod = {
  .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};
 
  +/*
  + * 'smartreflex' class
  + * smartreflex module (monitor silicon performance and outputs a
 measure of
  + * performance error)
  + */
  +
  +/* The IP is not compliant to type1 / type2 scheme */
  +static struct omap_hwmod_sysc_fields
 omap_hwmod_sysc_type_smartreflex = {
  +   .sidle_shift= 24,
  +   .enwkup_shift   = 26,
  +};
  +
  +static struct omap_hwmod_class_sysconfig
 omap44xx_smartreflex_sysc = {
  +   .sysc_offs  = 0x0038,
  +   .sysc_flags = (SYSC_HAS_ENAWAKEUP |
 SYSC_HAS_SIDLEMODE),
  +   .idlemodes  = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),

 The newly added SIDLE_SMART_WKUP flag is missing.

  +   .sysc_fields=omap_hwmod_sysc_type_smartreflex,
  +};
  +
  +static struct omap_hwmod_class
 omap44xx_smartreflex_hwmod_class = {
  +   .name = smartreflex,
  +   .sysc =omap44xx_smartreflex_sysc,
  +   .rev  = 2,
  +};
  +
  +/* smartreflex_core */
  +static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
  +static struct omap_hwmod_irq_info
 omap44xx_smartreflex_core_irqs[] = {
  +   { .irq = 19 + OMAP44XX_IRQ_GIC_START },
  +};
  +
  +static struct omap_hwmod_addr_space
 omap44xx_smartreflex_core_addrs[] = {
  +   {
  +   .pa_start   = 0x4a0dd000,
  +   .pa_end = 0x4a0dd03f,
  +   .flags  = ADDR_TYPE_RT
  +   },
  +};
  +
  +/* l4_cfg -  smartreflex_core */
  +static struct omap_hwmod_ocp_if
 omap44xx_l4_cfg__smartreflex_core = {
  +   .master =omap44xx_l4_cfg_hwmod,
  +   .slave  =omap44xx_smartreflex_core_hwmod,
  +   .clk= l4_div_ck,
  +   .addr   = omap44xx_smartreflex_core_addrs,
  +   .addr_cnt   =
 ARRAY_SIZE(omap44xx_smartreflex_core_addrs),
  +   .user   = OCP_USER_MPU | OCP_USER_SDMA,
  +};
  +
  +/* smartreflex_core slave ports */
  +static struct omap_hwmod_ocp_if
 *omap44xx_smartreflex_core_slaves[] = {
  +   omap44xx_l4_cfg__smartreflex_core,
  +};
  +
  +static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
  +   .name   = smartreflex_core,
  +   .class  =omap44xx_smartreflex_hwmod_class,
  +   .mpu_irqs   = omap44xx_smartreflex_core_irqs,
  +   .mpu_irqs_cnt   =
 ARRAY_SIZE(omap44xx_smartreflex_core_irqs),
  +   .main_clk   = smartreflex_core_fck,
  +   .vdd_name   = core,
  +   .prcm = {
  +   .omap4 = {
  +   .clkctrl_reg =
 OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
  +   },
  +   },
  +   .slaves = omap44xx_smartreflex_core_slaves,
  +   .slaves_cnt =
 ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
  +   .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  +};
  +
  +/* smartreflex_iva */
  +static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
  +static struct omap_hwmod_irq_info
 omap44xx_smartreflex_iva_irqs[] = {
  +   { .irq = 102 + OMAP44XX_IRQ_GIC_START },
  +};
  +
  +static struct omap_hwmod_addr_space
 omap44xx_smartreflex_iva_addrs[] = {
  +   {
  +   .pa_start   = 0x4a0db000,
  +   .pa_end = 0x4a0db03f,
  +   .flags  = ADDR_TYPE_RT
  +   },
  +};
  +
  +/* l4_cfg -  smartreflex_iva */
  +static struct omap_hwmod_ocp_if
 omap44xx_l4_cfg__smartreflex_iva = {
  +   .master =omap44xx_l4_cfg_hwmod,
  +   .slave  =omap44xx_smartreflex_iva_hwmod,
  +   .clk= l4_div_ck,
  +   .addr   = omap44xx_smartreflex_iva_addrs,
  +   .addr_cnt   = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs),
  +   .user   = OCP_USER_MPU | OCP_USER_SDMA,
  +};
  +
  +/* smartreflex_iva slave ports */
  +static struct omap_hwmod_ocp_if
 *omap44xx_smartreflex_iva_slaves[] = {
  +   omap44xx_l4_cfg__smartreflex_iva,
  +};
  +
  +static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
  +   .name

Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Kevin Hilman
Vishwanath Sripathy vishwanath...@ti.com writes:

[...]


 Please note the following log when enabling SR in Class 3 on an
 OMAP4430/sdp:

 [2.362182] omap2_set_init_voltage: unable to find boot up OPP for
 vdd_mpu
 [2.369384] omap2_set_init_voltage: Unable to put vdd_mpu to its init
 voltage
 [2.369384]
 [2.378875] omap2_set_init_voltage: unable to find boot up OPP for
 vdd_iva
 [2.386108] omap2_set_init_voltage: Unable to put vdd_iva to its init
 voltage
 [2.386108]
 [2.396484] Power Management for TI OMAP4.
 [2.401031] sr_init: No PMIC hook to init smartreflex
 [2.406494] smartreflex smartreflex.0: omap_sr_probe: SmartReflex
 driver initialized
 [2.414825] smartreflex smartreflex.1: omap_sr_probe: SmartReflex
 driver initialized
 [2.423187] smartreflex smartreflex.2: omap_sr_probe: SmartReflex
 driver initialized
 [2.431732] SmartReflex Class3 initialized

 Is it expected?
 Why do we have that blank line in-between?

 I think turbo OPPs are disabled by default in OPP table where as uboot is
 setting mpu and iva to turbo OPP. That's why you are getting this error.

That explains the MPU OPPs, but only raises more questions.  On what
platforms was this tested?  with *and* without turbo OPPs enabled?  Does
the voltage layer properly initialized if the boot up OPP is not found,
and the initial voltage is not set?

 You should not get this error if you enable turbo opps in opp table.

You would still get missing boot up OPP for IVA, as there are currenly
no OMAP4 OPPs for IVA.  Again, begging the question... how was this
tested.

Kevin
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Vishwanath Sripathy
Nishant,

 -Original Message-
 From: Nishanth Menon [mailto:n...@ti.com]
 Sent: Thursday, December 23, 2010 10:55 PM
 To: Kevin Hilman
 Cc: Vishwanath Sripathy; Benoit Cousson; Thara Gopinath; linux-
 o...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
 p...@pwsan.com; Anand Sawant
 Subject: Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for
 smartreflex modules.

 Kevin Hilman had written, on 12/23/2010 11:15 AM, the following:
  Vishwanath Sripathy vishwanath...@ti.com writes:
 
  [...]
 
  Please note the following log when enabling SR in Class 3 on an
  OMAP4430/sdp:
 
  [2.362182] omap2_set_init_voltage: unable to find boot up OPP
 for
  vdd_mpu
  [2.369384] omap2_set_init_voltage: Unable to put vdd_mpu to
 its init
  voltage
  [2.369384]
  [2.378875] omap2_set_init_voltage: unable to find boot up OPP
 for
  vdd_iva
  [2.386108] omap2_set_init_voltage: Unable to put vdd_iva to its
 init
  voltage
  [2.386108]
  [2.396484] Power Management for TI OMAP4.
  [2.401031] sr_init: No PMIC hook to init smartreflex
  [2.406494] smartreflex smartreflex.0: omap_sr_probe:
 SmartReflex
  driver initialized
  [2.414825] smartreflex smartreflex.1: omap_sr_probe:
 SmartReflex
  driver initialized
  [2.423187] smartreflex smartreflex.2: omap_sr_probe:
 SmartReflex
  driver initialized
  [2.431732] SmartReflex Class3 initialized
 
  Is it expected?
  Why do we have that blank line in-between?
  I think turbo OPPs are disabled by default in OPP table where as
 uboot is
  setting mpu and iva to turbo OPP. That's why you are getting this
 error.
  That explains the MPU OPPs, but only raises more questions.  On what
  platforms was this tested?  with *and* without turbo OPPs enabled?
 Does
  the voltage layer properly initialized if the boot up OPP is not
found,
  and the initial voltage is not set?
 
  You should not get this error if you enable turbo opps in opp table.
 If the platform SDP4430 is capable of booting up in higher (turbo) OPP,
 that OPP should have been enabled in the board file! I have'nt seen a
 patch for that yet

  You would still get missing boot up OPP for IVA, as there are currenly
  no OMAP4 OPPs for IVA.  Again, begging the question... how was this
  tested.
 Further, why is SR enabled by default on this platform if it does not
 have all domains available to be enabled (e.x. we dont have it on
 PandaBoard even though it is OMAP4 rt?)
Why do you think SR is enabled by default? The above log says that SR
Module is initialized. However sr auto compensation is not started by
default.

Vishwa

 --
 Regards,
 Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 4/5] OMAP4: hwmod: Add inital data for smartreflex modules.

2010-12-23 Thread Nishanth Menon

Vishwanath Sripathy had written, on 12/23/2010 11:36 AM, the following:
[..]

Further, why is SR enabled by default on this platform if it does not
have all domains available to be enabled (e.x. we dont have it on
PandaBoard even though it is OMAP4 rt?)

Why do you think SR is enabled by default? The above log says that SR
Module is initialized. However sr auto compensation is not started by
default.
oops.. my bad. Apologies, I missed that this is part of probe path not 
part of sr_classX_init path. looking at the code, I will refrain from 
commenting further on probe function at this point.


--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html