All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
@ 2010-02-18  9:02 Thara Gopinath
  2010-02-18 20:49 ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Thara Gopinath @ 2010-02-18  9:02 UTC (permalink / raw)
  To: linux-omap; +Cc: Thara Gopinath, Paul Walmsley

This patch corrects the width of some variables in hwmod structures
where the values to be stored in these variables exceed the current
field width.

Signed-off-by: Thara Gopinath <thara@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 921990e..06a7f20 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -258,7 +258,7 @@ struct omap_hwmod_sysconfig {
 	u16 sysc_offs;
 	u16 syss_offs;
 	u8 idlemodes;
-	u8 sysc_flags;
+	u16 sysc_flags;
 	u8 clockact;
 };
 
@@ -280,9 +280,9 @@ struct omap_hwmod_sysconfig {
 struct omap_hwmod_omap2_prcm {
 	s16 module_offs;
 	u8 prcm_reg_id;
-	u8 module_bit;
+	u32 module_bit;
 	u8 idlest_reg_id;
-	u8 idlest_idle_bit;
+	u32 idlest_idle_bit;
 	u8 idlest_stdby_bit;
 };
 
-- 
1.5.4.7


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
  2010-02-18  9:02 [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions Thara Gopinath
@ 2010-02-18 20:49 ` Paul Walmsley
  2010-02-23 14:15   ` Gopinath, Thara
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2010-02-18 20:49 UTC (permalink / raw)
  To: Thara Gopinath; +Cc: linux-omap

Hello Thara,

some comments.

On Thu, 18 Feb 2010, Thara Gopinath wrote:

> This patch corrects the width of some variables in hwmod structures
> where the values to be stored in these variables exceed the current
> field width.
> 
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> ---
>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index 921990e..06a7f20 100644
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -258,7 +258,7 @@ struct omap_hwmod_sysconfig {
>  	u16 sysc_offs;
>  	u16 syss_offs;
>  	u8 idlemodes;
> -	u8 sysc_flags;
> +	u16 sysc_flags;

This part is fine.

>  	u8 clockact;
>  };
>  
> @@ -280,9 +280,9 @@ struct omap_hwmod_sysconfig {
>  struct omap_hwmod_omap2_prcm {
>  	s16 module_offs;
>  	u8 prcm_reg_id;
> -	u8 module_bit;
> +	u32 module_bit;
>  	u8 idlest_reg_id;
> -	u8 idlest_idle_bit;
> +	u32 idlest_idle_bit;
>  	u8 idlest_stdby_bit;
>  };

This part I don't understand.  These are bit shifts in a 32 bit register, 
e.g., (1 << idlest_idle_bit), so how could these ever exceed 31?


- Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
  2010-02-18 20:49 ` Paul Walmsley
@ 2010-02-23 14:15   ` Gopinath, Thara
  2010-02-23 18:37     ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Gopinath, Thara @ 2010-02-23 14:15 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap



>>-----Original Message-----
>>From: Paul Walmsley [mailto:paul@pwsan.com]
>>Sent: Friday, February 19, 2010 2:20 AM
>>To: Gopinath, Thara
>>Cc: linux-omap@vger.kernel.org
>>Subject: Re: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
>>
>>Hello Thara,
>>
>>some comments.
>>
>>On Thu, 18 Feb 2010, Thara Gopinath wrote:
>>
>>> This patch corrects the width of some variables in hwmod structures
>>> where the values to be stored in these variables exceed the current
>>> field width.
>>>
>>> Signed-off-by: Thara Gopinath <thara@ti.com>
>>> Cc: Paul Walmsley <paul@pwsan.com>
>>> ---
>>>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
>>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-
>>omap/include/plat/omap_hwmod.h
>>> index 921990e..06a7f20 100644
>>> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
>>> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
>>> @@ -258,7 +258,7 @@ struct omap_hwmod_sysconfig {
>>>  	u16 sysc_offs;
>>>  	u16 syss_offs;
>>>  	u8 idlemodes;
>>> -	u8 sysc_flags;
>>> +	u16 sysc_flags;
>>
>>This part is fine.
>>
>>>  	u8 clockact;
>>>  };
>>>
>>> @@ -280,9 +280,9 @@ struct omap_hwmod_sysconfig {
>>>  struct omap_hwmod_omap2_prcm {
>>>  	s16 module_offs;
>>>  	u8 prcm_reg_id;
>>> -	u8 module_bit;
>>> +	u32 module_bit;
>>>  	u8 idlest_reg_id;
>>> -	u8 idlest_idle_bit;
>>> +	u32 idlest_idle_bit;
>>>  	u8 idlest_stdby_bit;
>>>  };
>>
>>This part I don't understand.  These are bit shifts in a 32 bit register,
>>e.g., (1 << idlest_idle_bit), so how could these ever exceed 31?

Hi Paul,

Oh... ok. I was under the impression these bits are to be assigned the value
1 << shift.. My bad.. Do you want me to re sumbmit the patch with just the
first fix.

Regards
Thara

>>
>>
>>- Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
  2010-02-23 14:15   ` Gopinath, Thara
@ 2010-02-23 18:37     ` Paul Walmsley
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Walmsley @ 2010-02-23 18:37 UTC (permalink / raw)
  To: Gopinath, Thara; +Cc: linux-omap

On Tue, 23 Feb 2010, Gopinath, Thara wrote:

> 
> 
> >>-----Original Message-----
> >>From: Paul Walmsley [mailto:paul@pwsan.com]
> >>Sent: Friday, February 19, 2010 2:20 AM
> >>To: Gopinath, Thara
> >>Cc: linux-omap@vger.kernel.org
> >>Subject: Re: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions
> >>
> >>Hello Thara,
> >>
> >>some comments.
> >>
> >>On Thu, 18 Feb 2010, Thara Gopinath wrote:
> >>
> >>> This patch corrects the width of some variables in hwmod structures
> >>> where the values to be stored in these variables exceed the current
> >>> field width.
> >>>
> >>> Signed-off-by: Thara Gopinath <thara@ti.com>
> >>> Cc: Paul Walmsley <paul@pwsan.com>
> >>> ---
> >>>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
> >>>  1 files changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-
> >>omap/include/plat/omap_hwmod.h
> >>> index 921990e..06a7f20 100644
> >>> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> >>> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> >>> @@ -258,7 +258,7 @@ struct omap_hwmod_sysconfig {
> >>>  	u16 sysc_offs;
> >>>  	u16 syss_offs;
> >>>  	u8 idlemodes;
> >>> -	u8 sysc_flags;
> >>> +	u16 sysc_flags;
> >>
> >>This part is fine.
> >>
> >>>  	u8 clockact;
> >>>  };
> >>>
> >>> @@ -280,9 +280,9 @@ struct omap_hwmod_sysconfig {
> >>>  struct omap_hwmod_omap2_prcm {
> >>>  	s16 module_offs;
> >>>  	u8 prcm_reg_id;
> >>> -	u8 module_bit;
> >>> +	u32 module_bit;
> >>>  	u8 idlest_reg_id;
> >>> -	u8 idlest_idle_bit;
> >>> +	u32 idlest_idle_bit;
> >>>  	u8 idlest_stdby_bit;
> >>>  };
> >>
> >>This part I don't understand.  These are bit shifts in a 32 bit register,
> >>e.g., (1 << idlest_idle_bit), so how could these ever exceed 31?
> 
> Hi Paul,
> 
> Oh... ok. I was under the impression these bits are to be assigned the value
> 1 << shift.. My bad.. Do you want me to re sumbmit the patch with just the
> first fix.

Yes.

_ Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-23 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-18  9:02 [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions Thara Gopinath
2010-02-18 20:49 ` Paul Walmsley
2010-02-23 14:15   ` Gopinath, Thara
2010-02-23 18:37     ` Paul Walmsley

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.