Skip to contentSkip to conversation

DaVinci: correct MDSTAT_STATE_MASK

PATCH New Sergei Shtylyov 3 participants 5 messages Jul 8, 2011 – Sep 6, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DaVinci: correct MDSTAT_STATE_MASK

MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been harmless though...

This was noticed by me back in 2009 but I didn't follow up with the patch back then... :-/

---
The patch is against the recent DaVinci tree.

 arch/arm/mach-davinci/include/mach/psc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-davinci/include/mach/psc.h +1 -1
Index: linux-davinci/arch/arm/mach-davinci/include/mach/psc.h
===================================================================
@@ -243,7 +243,7 @@
 #define PSC_STATE_DISABLE	2
 #define PSC_STATE_ENABLE	3
 
-#define MDSTAT_STATE_MASK	0x1f
+#define MDSTAT_STATE_MASK	0x3f
 #define MDCTL_FORCE		BIT(31)
 
 #ifndef __ASSEMBLER__
#1 lore raw

PATCH 1/1 DaVinci: correct MDSTAT_STATE_MASK

Hello.

Quoted 3 lines · I wrote:

MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been harmless though...

Except maybe sleep.S -- davinci_ddr_psc_config() could exit too early when
disabling DDR clock. The same is true with davinci_psc_config() in general but I don't think that anything depended on its timely return in that case.

Quoted 2 lines

This was noticed by me back in 2009 but I didn't follow up with the patch back then... :-/

Shame on me. :-)

Quoted 1 line

WBR, Sergei

#2 lore raw

PATCH 1/1 DaVinci: correct MDSTAT_STATE_MASK

In reply to Sergei Shtylyov
Quoted 8 lines · Sergei Shtylyov

MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been harmless though...

This was noticed by me back in 2009 but I didn't follow up with the patch back then... :-/

I applied this with two changes.

Changed the headline to "ARM: davinci: correct MDSTAT_STATE_MASK" to get the standardization requested by Arnd.

Also dropped the second paragraph of the commit text since it doesn't really belong to the permanent history ;)

Thanks,
Sekhar

#3 lore raw

PATCH 1/1 DaVinci: correct MDSTAT_STATE_MASK

Hello.

Quoted 9 lines · Sekhar
Quoted 8 lines

MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been harmless though...

This was noticed by me back in 2009 but I didn't follow up with the patch back then... :-/

Quoted 7 lines

I applied this with two changes.

Changed the headline to "ARM: davinci: correct MDSTAT_STATE_MASK" to get the standardization requested by Arnd.

Also dropped the second paragraph of the commit text since it doesn't really belong to the permanent history ;)

You have queued it for 3.2, right?

Quoted 2 lines

Thanks,
Sekhar

WBR, Sergei

#4 lore raw

PATCH 1/1 DaVinci: correct MDSTAT_STATE_MASK

Hi Sergei,

Quoted 15 lines · Sergei Shtylyov

Hello.

Quoted 10 lines · Sekhar
Quoted 8 lines

MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been harmless though...

This was noticed by me back in 2009 but I didn't follow up with the patch back then... :-/

I applied this with two changes.

Quoted 7 lines
Quoted 5 lines

Changed the headline to "ARM: davinci: correct MDSTAT_STATE_MASK" to get the standardization requested by Arnd.

Also dropped the second paragraph of the commit text since it doesn't really belong to the permanent history ;)

You have queued it for 3.2, right?

No, actually planning to send for v3.1. Have been delayed a bit due to my recent travel.

Thanks,
Sekhar