Skip to contentSkip to conversation

OMAP: HWMOD: Bug fixes in hwmod structure definitions

PATCH Superseded Thara Gopinath 2 participants 4 messages Feb 18, 2010 – Feb 23, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP: HWMOD: Bug fixes in hwmod structure definitions

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.

---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/plat/omap_hwmod.h +3 -3
index 921990e..06a7f20 100644
@@ -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;
 };
 
Signature · 1 line
1.5.4.7
#1 lore raw

Hello Thara,

some comments.

Quoted 15 lines · Thara Gopinath

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.

---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0
index 921990e..06a7f20 100644

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 261

Quoted 5 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
@@ -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.

Quoted 4 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0
 	u8 clockact;
 };
 

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 287

Quoted 10 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +2 -2
@@ -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

#2 lore raw
Quoted 42 lines
Quoted 42 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Friday, February 19, 2010 2:20 AM
To: Gopinath, Thara
Cc: [email protected]
Subject: Re: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions

Hello Thara,

some comments.

arch/arm/plat-

Quoted 11 lines · Thara Gopinath

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.

---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0

omap/include/plat/omap_hwmod.h

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 261

Quoted 9 lines

index 921990e..06a7f20 100644

arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
@@ -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.

Quoted 3 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0
 	u8 clockact;
 };
 
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
@@ -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;
Quoted 8 lines

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 287

Quoted 5 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
 	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

Quoted 3 lines
Quoted 3 lines

- Paul

#3 lore raw
Quoted 57 lines · Thara
Quoted 42 lines
Quoted 42 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Friday, February 19, 2010 2:20 AM
To: Gopinath, Thara
Cc: [email protected]
Subject: Re: [PATCH] OMAP: HWMOD: Bug fixes in hwmod structure definitions

Hello Thara,

some comments.

arch/arm/plat-

Quoted 11 lines · Thara Gopinath

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.

---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0

omap/include/plat/omap_hwmod.h

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 261

Quoted 9 lines

index 921990e..06a7f20 100644

arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
@@ -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.

Quoted 3 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0
 	u8 clockact;
 };
 
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
@@ -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;
Quoted 8 lines

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod_sysconfig { · line 287

Quoted 5 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -1
 	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?

Quoted 5 lines

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