[U-Boot-Users] [PATCH] PPC440 Power Management Registers

Hello Stefan,
I had a look at all PPC440 processor manuals from AMCC and see that my patch applies to all of them. In other words the #else portion is never used. Therefore I am submitting a patch that cleans up this code quite nicely.
Another observation that I made is that the PPC440EPx and PPC440GPx require more than 32 bits to control the power management functions. Therefore I defined a second set of registers cpc1_er, cpc1_fr, cpc1_sr for these processors. These can be used as placeholders for future development.
Let me know if this sounds good to you.
Regards, Eugene
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: April 4, 2008 10:05 AM To: Eugene O'Brien Subject: Re: Patch for PPC440EP
Hi Eugene,
On Friday 04 April 2008, Eugene O'Brien wrote:
Here is patch for the PPC440EP. The DCR addresses of the power management registers were not correctly defined. This patch corrects that. You can check the PPC440EP UM p301 to confirm. I also used the BDI2000 to double check.
Thanks.
I suggest the following change:
Instead of:
-#if defined(CONFIG_440GX) || \ +#if defined(CONFIG_440GX) || defined(CONFIG_440EP) || \
please use:
+ defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
This way 440GP will be added too. And if we're at it, please check if 440EPx and 440GRx also need this change. If yes, please include them too.
And please post the patch to the mailing list for review. I can't accept
patches without public review nowadays, since we changed the development
process.
Thanks for your input.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Hi Eugene,
On Monday 07 April 2008, Eugene O'Brien wrote:
I had a look at all PPC440 processor manuals from AMCC and see that my patch applies to all of them. In other words the #else portion is never used. Therefore I am submitting a patch that cleans up this code quite nicely.
Great, thanks.
Another observation that I made is that the PPC440EPx and PPC440GPx require more than 32 bits to control the power management functions. Therefore I defined a second set of registers cpc1_er, cpc1_fr, cpc1_sr for these processors. These can be used as placeholders for future development.
I would prefer to add those when really needed. Let's try to include only defines that are used. This way the headers don't get "polluted" even more.
Let me know if this sounds good to you.
Could you please resend you patch without those new registers? And please send it inline and add a proper Signed-off-by line as described here:
http://www.denx.de/wiki/UBoot/Patches
I suggest to use git-send-email for sending patches.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Hello Stefan,
Here is an updated patch correcting only the pre-existing power management register definitions. (I might add that these definitions are not currently used in the U-Boot source tree either.)
CHANGELOG:
ppc440: Fix power mgt definitions for PPC440
Corrected DCR addresses of PPC440 power management registers. All AMCC PPC440 processors conform to the same DCR address usage for these registers.
Signed-off-by: Eugene O'Brien eugene.obrien@advantechamt.com
diff --git a/include/ppc440.h b/include/ppc440.h index 80dd332..34963c5 100644 --- a/include/ppc440.h +++ b/include/ppc440.h @@ -1726,17 +1726,10 @@ #else #define CNTRL_DCR_BASE 0x0b0 #endif -#if defined(CONFIG_440GX) || \ - defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \ - defined(CONFIG_460EX) || defined(CONFIG_460GT) + #define cpc0_er (CNTRL_DCR_BASE+0x00) /* CPM enable register */ #define cpc0_fr (CNTRL_DCR_BASE+0x01) /* CPM force register */ #define cpc0_sr (CNTRL_DCR_BASE+0x02) /* CPM status register */ -#else -#define cpc0_sr (CNTRL_DCR_BASE+0x00) /* CPM status register */ -#define cpc0_er (CNTRL_DCR_BASE+0x01) /* CPM enable register */ -#define cpc0_fr (CNTRL_DCR_BASE+0x02) /* CPM force register */ -#endif
#define cpc0_sys0 (CNTRL_DCR_BASE+0x30) /* System configuration reg 0 */ #define cpc0_sys1 (CNTRL_DCR_BASE+0x31) /* System configuration reg 1 */
Regards, Eugene
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: April 8, 2008 7:30 AM To: u-boot-users@lists.sourceforge.net Cc: Eugene O'Brien Subject: Re: [U-Boot-Users] [PATCH] PPC440 Power Management Registers
Hi Eugene,
On Monday 07 April 2008, Eugene O'Brien wrote:
I had a look at all PPC440 processor manuals from AMCC and see that my patch applies to all of them. In other words the #else portion is
never
used. Therefore I am submitting a patch that cleans up this code quite nicely.
Great, thanks.
Another observation that I made is that the PPC440EPx and PPC440GPx require more than 32 bits to control the power management functions. Therefore I defined a second set of registers cpc1_er, cpc1_fr,
cpc1_sr
for these processors. These can be used as placeholders for future development.
I would prefer to add those when really needed. Let's try to include only defines that are used. This way the headers don't get "polluted" even more.
Let me know if this sounds good to you.
Could you please resend you patch without those new registers? And please send it inline and add a proper Signed-off-by line as described here:
http://www.denx.de/wiki/UBoot/Patches
I suggest to use git-send-email for sending patches.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Hi Eugene,
On Thursday 10 April 2008, Eugene O'Brien wrote:
Here is an updated patch correcting only the pre-existing power management register definitions. (I might add that these definitions are not currently used in the U-Boot source tree either.)
CHANGELOG:
ppc440: Fix power mgt definitions for PPC440
Corrected DCR addresses of PPC440 power management registers. All AMCC PPC440 processors conform to the same DCR address usage for these registers.
Signed-off-by: Eugene O'Brien eugene.obrien@advantechamt.com
Unfortunately now your patch is line wrapped. And even if it wasn't line wrapped, it couldn't be applied using git-am (which makes life so much easier for me) because of the lines above and below the real patch.
I there a chance that you can create this patch by using git-format-patch? I know it is a lot of work for such a small patch, but once you've got all this git patch stuff working, you can send patches much easier in the future.
Thanks.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

In message 200804101533.14599.sr@denx.de you wrote:
Unfortunately now your patch is line wrapped. And even if it wasn't line wrapped, it couldn't be applied using git-am (which makes life so much easier for me) because of the lines above and below the real patch.
This is not a big problem; "git-am -i" will allow you to edit the commit message if needed.
Best regards,
Wolfgang Denk

On Thursday 10 April 2008, Wolfgang Denk wrote:
In message 200804101533.14599.sr@denx.de you wrote:
Unfortunately now your patch is line wrapped. And even if it wasn't line wrapped, it couldn't be applied using git-am (which makes life so much easier for me) because of the lines above and below the real patch.
This is not a big problem; "git-am -i" will allow you to edit the commit message if needed.
Right. But it would be better if it could be avoided. Less work for us custodians. ;)
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Hello Stefan,
Well I am still trying to master GIT and the patch reporting process. On the last try I used the git diff command to create the patch. This time I created a separate U-Boot tree and committed this one change into it and used git-format-patch to generate the attached file.
Hopefully this approach meets your needs.
Regards, Eugene
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: April 11, 2008 12:31 AM To: u-boot-users@lists.sourceforge.net Cc: Wolfgang Denk; Eugene O'Brien Subject: Re: [U-Boot-Users] [PATCH] PPC440 Power Management Registers
On Thursday 10 April 2008, Wolfgang Denk wrote:
In message 200804101533.14599.sr@denx.de you wrote:
Unfortunately now your patch is line wrapped. And even if it wasn't
line
wrapped, it couldn't be applied using git-am (which makes life so
much
easier for me) because of the lines above and below the real patch.
This is not a big problem; "git-am -i" will allow you to edit the commit message if needed.
Right. But it would be better if it could be avoided. Less work for us custodians. ;)
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Hi Eugene,
On Friday 11 April 2008, Eugene O'Brien wrote:
Well I am still trying to master GIT and the patch reporting process. On the last try I used the git diff command to create the patch. This time I created a separate U-Boot tree and committed this one change into it and used git-format-patch to generate the attached file.
Hopefully this approach meets your needs.
Nearly perfect. Thanks a lot. To make it perfect you should send the generated patch inlined, best directly using the git-send-email command.
No need to send again, I have already committed this version locally and will push later. Thanks again.
BTW: You don't have to create a different tree (I suspect you cloned the repo again). All you need is a new branch. But working with branches might be another hurdle for you (as it has been for a a while ago :)).
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================
participants (3)
-
Eugene O'Brien
-
Stefan Roese
-
Wolfgang Denk