powerpc/85xx: Add recognition of e5500 core
PATCH 1/1 powerpc/85xx: Add recognition of e5500 core
--- arch/powerpc/cpu/mpc85xx/cpu.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +10 -10
@@ -93,18 +93,18 @@ int checkcpu (void) minor =PVR_MIN (pvr);printf ("Core: " ); -switch (fam) { -case PVR_FAM (PVR_85xx): -puts ("E500" ); -break ; -default : -puts ("Unknown" ); -break ; +if (PVR_FAM (PVR_85xx)) { +if (PVR_MEM (pvr) <=0x3 ) { +puts ("E500" ); +if (PVR_MEM (pvr) ==0x03 ) +puts ("MC" ); + }else { +puts ("E5500" ); + } + }else { +puts ("Unknown" ); } -if (PVR_MEM (pvr) ==0x03 ) -puts ("MC" ); -printf (", Version: %d.%d, (0x%08x)\n" , major, minor, pvr);get_sys_info (&sysinfo);
Signature · 1 line
1.6.0.6
PATCH 1/1 powerpc/85xx: Add support for link stack & STAC on e5500
The e5500 has a link register stack and segment target address cache. Its safe to enable these bits on older e500 cores as the bits are implemented in the register.
--- arch/powerpc/include/asm/processor.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/include/asm/processor.h +3 -1
@@ -534,9 +534,11 @@#define SPRN_MCSRR0 0x23a/* Machine Check Save and Restore Register 0 */ #define SPRN_MCSRR1 0x23b/* Machine Check Save and Restore Register 1 */ #define SPRN_BUCSR 0x3f5/* Branch Control and Status Register */ +#define BUCSR_STAC_EN 0x01000000/* Segment target addr cache enable */ +#define BUCSR_LS_EN 0x00400000/* Link stack enable */ #define BUCSR_BBFI 0x00000200/* Branch buffer flash invalidate */ #define BUCSR_BPEN 0x00000001/* Branch prediction enable */ -#define BUCSR_ENABLE (BUCSR_BBFI|BUCSR_BPEN) +#define BUCSR_ENABLE (BUCSR_STAC_EN|BUCSR_LS_EN|BUCSR_BBFI|BUCSR_BPEN)#define SPRN_BBEAR 0x201/* Branch Buffer Entry Address Register */ #define SPRN_BBTAR 0x202/* Branch Buffer Target Address Register */ #define SPRN_PID1 0x279/* Process ID Register 1 */
Signature · 1 line
1.6.0.6
Kumar Gala
AppliedPATCH 1/1 powerpc/85xx: Add support for link stack & STAC on e5500
Quoted 8 lines · Kumar Gala
The e5500 has a link register stack and segment target address cache. Its safe to enable these bits on older e500 cores as the bits are implemented in the register.
Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/include/asm/processor.h| 4 +++-1 files changed, 3 insertions(+), 1 deletions(-)
applied to 85xx
- k
Kumar Gala
AppliedPATCH 1/1 powerpc/85xx: Add recognition of e5500 core
In reply to Kumar GalaQuoted 4 lines · Kumar Gala
Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/cpu/mpc85xx/cpu.c| 20 ++++++++++----------1 files changed, 10 insertions(+), 10 deletions(-)
applied to 85xx
- k
PATCH 1/1 powerpc/85xx: Add recognition of e5500 core
In reply to Kumar GalaDear Kumar Gala,
Quoted 18 lines · In message <[email protected]> you…
Signed-off-by Kumar Gala <[email protected]>--- arch/powerpc/cpu/mpc85xx/cpu.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)arch/powerpc/cpu/mpc85xx/cpu.c +0
-5@@ -93,18 +93,18 @@ int checkcpu (void) minor =PVR_MIN (pvr);printf ("Core: " ); -switch (fam) { -case PVR_FAM (PVR_85xx): -puts ("E500" ); -break ; -default :
arch/powerpc/cpu/mpc85xx/cpu.c int checkcpu (void) · line 103
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/cpu.c +8
-2-puts ("Unknown" ); -break ; +if (PVR_FAM (PVR_85xx)) { +if (PVR_MEM (pvr) <=0x3 ) { +puts ("E500" ); +if (PVR_MEM (pvr) ==0x03 ) +puts ("MC" ); + }else { +puts ("E5500" ); + }
Is it guaranteed that all higher PVR values will always be E5500? Otherwise we should rather not use an "else" here?
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 Quote from a recent meeting: "We are going to continue having these meetings everyday until I find out why no work is getting done."
PATCH v2 1/1 powerpc/85xx: Add recognition of e5500 core
In reply to Kumar Gala---
* use case statement and handle unknown values
arch/powerpc/cpu/mpc85xx/cpu.c | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +18 -10
@@ -95,18 +95,26 @@ int checkcpu (void) minor =PVR_MIN (pvr);printf ("Core: " ); -switch (fam) { -case PVR_FAM (PVR_85xx): -puts ("E500" ); -break ; -default : -puts ("Unknown" ); -break ; +if (PVR_FAM (PVR_85xx)) { +switch (PVR_MEM (pvr)) { +case 0x1 : +case 0x2 : +puts ("E500" ); +break ; +case 0x3 : +puts ("E500MC" ); +break ; +case 0x4 : +puts ("E5500" ); +break ; +default : +puts ("Unknown" ); +break ; + } + }else { +puts ("Unknown" ); } -if (PVR_MEM (pvr) ==0x03 ) -puts ("MC" ); -printf (", Version: %d.%d, (0x%08x)\n" , major, minor, pvr);get_sys_info (&sysinfo);
Signature · 1 line
1.6.0.6