powerpc/fsl-booke: Add support for FSL 64-bit e5500 core
Subsystems (2)
PATCH v2 1/1 powerpc/fsl-booke: Add support for FSL 64-bit e5500 core
The new e5500 core is similar to the e500mc core but adds 64-bit support. We support running it in 32-bit mode as it is identical to the e500mc.
---
* Updated to remove CONFIG_PPC_E5500 and use E500MC
arch/powerpc/include/asm/reg_booke.h | 3 ++- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/cpu_setup_fsl_booke.S | 15 +++++++++++++++ arch/powerpc/kernel/cputable.c | 26 +++++++++++++++++++++++++- arch/powerpc/kernel/traps.c | 8 +++++++- arch/powerpc/platforms/85xx/Kconfig | 4 ++++ arch/powerpc/platforms/Kconfig.cputype | 19 ++++++++++++------- 7 files changed, 66 insertions(+), 10 deletions(-)
arch/powerpc/include/asm/reg_booke.h +2 -1
@@ -203,7 +203,8 @@#define PPC47x_MCSR_FPR 0x00800000/* FPR parity error */ #define PPC47x_MCSR_IPR 0x00400000/* Imprecise Machine Check Exception */ -#ifdef CONFIG_E500 +#if defined(CONFIG_E500 ) || defined(CONFIG_PPC_E500MC ) \ + || defined(CONFIG_PPC_BOOK3E_64 )/* All e500 */ #define MCSR_MCP 0x80000000UL/* Machine Check Input Pin */ #define MCSR_ICPERR 0x40000000UL/* I-Cache Parity Error */
arch/powerpc/kernel/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ paca.o nvram_64.o firmware.o obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o +obj-$(CONFIG_PPC_BOOK3E_64) += cpu_setup_fsl_booke.o obj64-$(CONFIG_RELOCATABLE) += reloc_64.o obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o obj-$(CONFIG_PPC64) += vdso64/
arch/powerpc/kernel/cpu_setup_fsl_booke.S +15 -0
@@ -51,6 +51,7 @@ _GLOBAL(__e500_dcache_setup) isync blr +#ifdef CONFIG_PPC32 _GLOBAL(__setup_cpu_e200) /* enable dedicated debug exception handling resources (Debug APU) */ mfspr r3,SPRN_HID0
@@ -72,3 +73,17 @@ _GLOBAL(__setup_cpu_e500mc) bl __setup_e500mc_ivors mtlr r4 blr +#endif +/* Right now, restore and setup are the same thing */ +_GLOBAL(__restore_cpu_e5500) +_GLOBAL(__setup_cpu_e5500) + mflr r4 + bl __e500_icache_setup + bl __e500_dcache_setup +#ifdef CONFIG_PPC_BOOK3E_64 + bl .__setup_base_ivors +#else + bl __setup_e500mc_ivors +#endif + mtlr r4 + blr
arch/powerpc/kernel/cputable.c +25 -1
@@ -66,6 +66,10 @@ extern void __restore_cpu_ppc970(void);extern void __setup_cpu_power7 (unsigned long offset,struct cpu_spec * spec);extern void __restore_cpu_power7 (void );#endif /* CONFIG_PPC64 */ +#if defined(CONFIG_PPC_BOOK3E_64 ) || defined(CONFIG_E500 ) +extern void __setup_cpu_e5500 (unsigned long offset,struct cpu_spec * spec); +extern void __restore_cpu_e5500 (void ); +#endif /* CONFIG_PPC_BOOK3E_64 || CONFIG_E500 */ /* This table only contains "desktop" CPUs, it need to be filled with embedded * ones as well...
@@ -1891,6 +1895,27 @@ static struct cpu_spec __initdata cpu_specs[] = { .platform = "ppc5554", }#endif /* CONFIG_E200 */ +#endif /* CONFIG_PPC32 */ +#if defined(CONFIG_PPC_BOOK3E_64 ) || defined(CONFIG_E500 ) + {/* e5500 */ + .pvr_mask = 0xffff0000, + .pvr_value = 0x80240000, + .cpu_name = "e5500", + .cpu_features = CPU_FTRS_E500MC, + .cpu_user_features = COMMON_USER_BOOKE, + .mmu_features =MMU_FTR_TYPE_FSL_E |MMU_FTR_BIG_PHYS | + MMU_FTR_USE_TLBILX, + .icache_bsize = 64, + .dcache_bsize = 64, + .num_pmcs = 4, + .oprofile_cpu_type = "ppc/e500mc", + .oprofile_type = PPC_OPROFILE_FSL_EMB, + .cpu_setup = __setup_cpu_e5500, + .cpu_restore = __restore_cpu_e5500, + .machine_check = machine_check_e500mc, + .platform ="ppce5500" , + }, +#endif #ifdef CONFIG_E500 { /* e500 */ .pvr_mask = 0xffff0000,
@@ -1961,7 +1986,6 @@ static struct cpu_spec __initdata cpu_specs[] = { .platform = "powerpc", }#endif /* CONFIG_E500 */ -#endif /* CONFIG_PPC32 */ #ifdef CONFIG_PPC_BOOK3E_64 {/* This is a default entry to get going, to be replaced by
arch/powerpc/kernel/traps.c +7 -1
@@ -418,7 +418,8 @@ int machine_check_47x(struct pt_regs *regs) return 0; } -#elif defined(CONFIG_E500) +#elif defined(CONFIG_E500) || defined(CONFIG_PPC_E500MC) \ + || defined(CONFIG_PPC_BOOK3E_64)int machine_check_e500mc (struct pt_regs *regs) {unsigned long mcsr =mfspr (SPRN_MCSR );
@@ -538,6 +539,11 @@ int machine_check_e500(struct pt_regs *regs) return 0; } + +int machine_check_generic (struct pt_regs *regs) +{ +return 0 ; +}#elif defined(CONFIG_E200)int machine_check_e200 (struct pt_regs *regs) {
arch/powerpc/platforms/85xx/Kconfig +4 -0
@@ -11,6 +11,8 @@ menuconfig FSL_SOC_BOOKE if FSL_SOC_BOOKE +if PPC32 + config MPC8540_ADS bool "Freescale MPC8540 ADS" select DEFAULT_UIMAGE
@@ -177,6 +179,8 @@ config P4080_DS help This option enables support for the P4080 DS board +endif # PPC32 + endif # FSL_SOC_BOOKE config TQM85xx
arch/powerpc/platforms/Kconfig.cputype +12 -7
@@ -130,7 +130,7 @@ config E500 config PPC_E500MC bool "e500mc Support" select PPC_FPU - depends on E500 + depends on E500 || PPC_BOOK3E_64 config PPC_FPU bool
@@ -138,7 +138,7 @@ config PPC_FPU config FSL_EMB_PERFMON bool "Freescale Embedded Perfmon" - depends on E500 || PPC_83xx + depends on E500 || PPC_E500MC || PPC_83xx help This is the Performance Monitor support found on the e500 core and some e300 cores (c3 and c4). Select this only if your
@@ -151,7 +151,7 @@ config FSL_EMB_PERF_EVENT config FSL_EMB_PERF_EVENT_E500 bool - depends on FSL_EMB_PERF_EVENT && E500 + depends on FSL_EMB_PERF_EVENT && (E500 || PPC_E500MC) default y config 4xx
@@ -161,7 +161,7 @@ config 4xx config BOOKE bool - depends on E200 || E500 || 44x || PPC_BOOK3E + depends on E200 || E500 || PPC_E500MC || 44x || PPC_BOOK3E default y config FSL_BOOKE
@@ -169,15 +169,20 @@ config FSL_BOOKE depends on E200 || E500 default y +# this is for common code between PPC32 & PPC64 FSL BOOKE +config PPC_FSL_BOOK3E + bool + select FSL_EMB_PERFMON + default y if FSL_BOOKE config PTE_64BIT bool - depends on 44x || E500 || PPC_86xx + depends on 44x || E500 || PPC_E500MC || PPC_86xx default y if PHYS_64BIT config PHYS_64BIT - bool 'Large physical address support' if E500 || PPC_86xx - depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx + bool 'Large physical address support' if E500 || PPC_E500MC || PPC_86xx + depends on (44x || E500 || PPC_E500MC || PPC_86xx) && !PPC_83xx && !PPC_82xx ---help--- This option enables kernel support for larger than 32-bit physical addresses. This feature may not be available on all cores.
Signature · 1 line
1.7.2.3
PATCH v2 1/1 powerpc/fsl-booke: Add p5020 DS board support
The P5020DS is in the same family of boards as the P4080 DS and thus shares the corenet_ds code.
---
* Updated based on removal of CONFIG_PPC_E5500
arch/powerpc/platforms/85xx/Kconfig | 12 ++++++ arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/p5020_ds.c | 69 ++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/p5020_ds.c
arch/powerpc/platforms/85xx/Kconfig +12 -0
@@ -181,6 +181,18 @@ config P4080_DS endif # PPC32 +config P5020_DS + bool "Freescale P5020 DS" + select DEFAULT_UIMAGE + select PPC_FSL_BOOK3E + select PPC_E500MC + select PHYS_64BIT + select SWIOTLB + select MPC8xxx_GPIO + select HAS_RAPIDIO + help + This option enables support for the P5020 DS board + endif # FSL_SOC_BOOKE config TQM85xx
arch/powerpc/platforms/85xx/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P3041_DS) += p3041_ds.o corenet_ds.o obj-$(CONFIG_P4080_DS) += p4080_ds.o corenet_ds.o +obj-$(CONFIG_P5020_DS) += p5020_ds.o corenet_ds.o obj-$(CONFIG_STX_GP3) += stx_gp3.o obj-$(CONFIG_TQM85xx) += tqm85xx.o obj-$(CONFIG_SBC8560) += sbc8560.o
arch/powerpc/platforms/85xx/p5020_ds.c new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
1.7.2.3
Quoted 7 lines · On Tue, 12 Oct 2010 10:50:52 -0500 Kumar Gala <[email protected]> wrote:
The new e5500 core is similar to the e500mc core but adds 64-bit support. We support running it in 32-bit mode as it is identical to the e500mc.
Signed-off-by Kumar Gala <[email protected]>---
* Updated to removeCONFIG_PPC_E5500and use E500MC
It still has E500 || E500MC all over the place...
If E500MC is not going to imply E500 that should be consistent for both 32 and 64 bit -- though I think it would make more sense that E500MC does imply E500.
-Scott
Quoted 5 lines · Scott Wood
On Tue, 12 Oct 2010 10:50:52 -0500
Kumar Gala <[email protected]> wrote:
=20Quoted 2 lines
The new e5500 core is similar to the e500mc core but adds 64-bit support. We support running it in 32-bit mode as it is identical to =
the
Quoted 9 lines
Quoted 5 lines
e500mc.
=20Signed-off-by Kumar Gala <[email protected]>---
* Updated to removeCONFIG_PPC_E5500and use E500MC=20
It still has E500 || E500MC all over the place...
=20
If E500MC is not going to imply E500 that should be consistent for =
both
Quoted 4 lines
32 and 64 bit -- though I think it would make more sense that E500MC does imply E500.
=20
-Scott
I have a problem with Kconfig and getting E500MC option to only exist in = the proper cases.
- k=
Quoted 16 lines · On Tue, 12 Oct 2010 14:55:42 -0500 Kumar Gala <[email protected]> wrote:
Quoted 13 lines · Scott Wood
Quoted 7 lines · On Tue, 12 Oct 2010 10:50:52 -0500 Kumar Gala <[email protected]> wrote:
The new e5500 core is similar to the e500mc core but adds 64-bit support. We support running it in 32-bit mode as it is identical to the e500mc.
Signed-off-by Kumar Gala <[email protected]>---
* Updated to removeCONFIG_PPC_E5500and use E500MCIt still has E500 || E500MC all over the place...
Quoted 7 lines
Quoted 5 lines
If E500MC is not going to imply E500 that should be consistent for both 32 and 64 bit -- though I think it would make more sense that E500MC does imply E500.
-Scott
I have a problem with
Kconfigand getting E500MC option to only exist in the proper cases.
Does having P5020DS (and any future 64-bit-capable board) explicitly select E500 as well as PPC_E500MC avoid the issue?
-Scott
Quoted 11 lines · Scott Wood
On Tue, 12 Oct 2010 14:55:42 -0500
Kumar Gala <[email protected]> wrote:
=20Quoted 8 lines
=20
On Oct 12, 2010, at 12:33 PM, Scott Wood wrote:
=20Quoted 5 lines
On Tue, 12 Oct 2010 10:50:52 -0500
Kumar Gala <[email protected]> wrote:
=20Quoted 2 lines
The new e5500 core is similar to the e500mc core but adds 64-bit support. We support running it in 32-bit mode as it is identical =
to the
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines
e500mc.
=20Signed-off-by Kumar Gala <[email protected]>---
* Updated to removeCONFIG_PPC_E5500and use E500MC=20
It still has E500 || E500MC all over the place...
=20
If E500MC is not going to imply E500 that should be consistent for =
both
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
32 and 64 bit -- though I think it would make more sense that E500MC does imply E500.
=20
-Scott=20
I have a problem withKconfigand getting E500MC option to only exist =
in the proper cases.
Quoted 3 lines
=20
Does having P5020DS (and any future 64-bit-capable board) explicitly select E500 as well asPPC_E500MCavoid the issue?
it does, kinda ugly but oh well.
- k