Skip to contentSkip to conversation

85xx: properly document MPC85xx_PORDEVSR2_SEC_CFG

PATCH New Timur Tabi 2 participants 3 messages Oct 17, 2008 – Oct 18, 2008

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 85xx: properly document MPC85xx_PORDEVSR2_SEC_CFG

Commit f7d190b1 corrected the value of MPC85xx_PORDEVSR2_SEC_CFG, but forgot to add a comment that the correct value disagrees with the 8544 reference manual. Without this comment, a developer looking at the code would get confused.

---
 include/asm-ppc/immap_85xx.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/asm-ppc/immap_85xx.h +1 -0
index 6c81c39..920afd2 100644
@@ -1579,6 +1579,7 @@ typedef struct ccsr_gur {
 #define MPC85xx_PORDEVSR_RIO_DEV_ID	0x00000007
 	uint	pordbgmsr;	/* 0xe0010 - POR debug mode status register */
 	uint	pordevsr2;	/* 0xe0014 - POR I/O device status regsiter 2 */
+/* The 8544 RM says this is bit 26, but it's really bit 28 */
 #define MPC85xx_PORDEVSR2_SEC_CFG	0x00000080
 	char	res1[8];
 	uint	gpporcr;	/* 0xe0020 - General-purpose POR configuration register */
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/1 85xx: properly document MPC85xx_PORDEVSR2_SEC_CFG

Dear Timur Tabi,

Quoted 4 lines · In message <[email protected]> you wrote:

Commit f7d190b1 corrected the value of MPC85xx_PORDEVSR2_SEC_CFG, but forgot to add a comment that the correct value disagrees with the 8544 reference manual. Without this comment, a developer looking at the code would get confused.

Hmm... The developer looking at the code is indeed confused ;-)

Quoted 2 lines

+/* The 8544 RM says this is bit 26, but it's really bit 28 */
#define MPC85xx_PORDEVSR2_SEC_CFG 0x00000080

But 0x00000080 is bit 24; bit 28 would be 0x00000008 - or not?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
author
#2 lore raw

PATCH 1/1 85xx: properly document MPC85xx_PORDEVSR2_SEC_CFG

Quoted 4 lines · Wolfgang Denk
Quoted 2 lines

+/* The 8544 RM says this is bit 26, but it's really bit 28 */
#define MPC85xx_PORDEVSR2_SEC_CFG 0x00000080

But 0x00000080 is bit 24; bit 28 would be 0x00000008 - or not?

I just based my comment on the changelog of the previous patch, so that means that either the git changelog or the code for that patch is wrong. I guess that's a good reason not to use git changelogs as a substitute for code comments. Changelogs can't be edited.

The previous patch had this:

The MPC8544 RM incorrect shows the SEC_CFG bit in PORDEVSR2 as being bit 26, instead it should be bit 28.
...
-#define MPC85xx_PORDEVSR2_SEC_CFG 0x00000020
+#define MPC85xx_PORDEVSR2_SEC_CFG 0x00000080

x80 is definitely bit 24. So the question for Kumar is: which is the right value for MPC85xx_PORDEVSR2_SEC_CFG: 0x80 (bit 24) or 0x08 (bit 28)?

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale