diff options
| author | Kumar Gala <galak@kernel.crashing.org> | 2010-10-08 09:32:11 -0400 |
|---|---|---|
| committer | Kumar Gala <galak@kernel.crashing.org> | 2010-10-14 01:55:03 -0400 |
| commit | 4490c06b581ad7d6392bb398960ef86dfd203a91 (patch) | |
| tree | c5ca19d817020b204b2a046d9f32b72191df5c51 | |
| parent | 6db92cc9d07db9f713da8554b4bcdfc8e54ad386 (diff) | |
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.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| -rw-r--r-- | arch/powerpc/kernel/Makefile | 4 | ||||
| -rw-r--r-- | arch/powerpc/kernel/cpu_setup_fsl_booke.S | 15 | ||||
| -rw-r--r-- | arch/powerpc/kernel/cputable.c | 28 | ||||
| -rw-r--r-- | arch/powerpc/kernel/traps.c | 5 | ||||
| -rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 5 | ||||
| -rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 8 |
6 files changed, 61 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 1dda70129141..4ed076a4db24 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
| @@ -55,7 +55,9 @@ obj-$(CONFIG_IBMVIO) += vio.o | |||
| 55 | obj-$(CONFIG_IBMEBUS) += ibmebus.o | 55 | obj-$(CONFIG_IBMEBUS) += ibmebus.o |
| 56 | obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o | 56 | obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o |
| 57 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 57 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
| 58 | ifeq ($(CONFIG_PPC32),y) | ||
| 58 | obj-$(CONFIG_E500) += idle_e500.o | 59 | obj-$(CONFIG_E500) += idle_e500.o |
| 60 | endif | ||
| 59 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o | 61 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o |
| 60 | obj-$(CONFIG_TAU) += tau_6xx.o | 62 | obj-$(CONFIG_TAU) += tau_6xx.o |
| 61 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o | 63 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o |
| @@ -67,7 +69,7 @@ endif | |||
| 67 | obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o | 69 | obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o |
| 68 | obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o | 70 | obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o |
| 69 | obj-$(CONFIG_44x) += cpu_setup_44x.o | 71 | obj-$(CONFIG_44x) += cpu_setup_44x.o |
| 70 | obj-$(CONFIG_FSL_BOOKE) += cpu_setup_fsl_booke.o dbell.o | 72 | obj-$(CONFIG_PPC_FSL_BOOK3E) += cpu_setup_fsl_booke.o dbell.o |
| 71 | obj-$(CONFIG_PPC_BOOK3E_64) += dbell.o | 73 | obj-$(CONFIG_PPC_BOOK3E_64) += dbell.o |
| 72 | 74 | ||
| 73 | extra-y := head_$(CONFIG_WORD_SIZE).o | 75 | extra-y := head_$(CONFIG_WORD_SIZE).o |
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 0adb50ad8031..894e64fa481e 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
| @@ -51,6 +51,7 @@ _GLOBAL(__e500_dcache_setup) | |||
| 51 | isync | 51 | isync |
| 52 | blr | 52 | blr |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_PPC32 | ||
| 54 | _GLOBAL(__setup_cpu_e200) | 55 | _GLOBAL(__setup_cpu_e200) |
| 55 | /* enable dedicated debug exception handling resources (Debug APU) */ | 56 | /* enable dedicated debug exception handling resources (Debug APU) */ |
| 56 | mfspr r3,SPRN_HID0 | 57 | mfspr r3,SPRN_HID0 |
| @@ -72,3 +73,17 @@ _GLOBAL(__setup_cpu_e500mc) | |||
| 72 | bl __setup_e500mc_ivors | 73 | bl __setup_e500mc_ivors |
| 73 | mtlr r4 | 74 | mtlr r4 |
| 74 | blr | 75 | blr |
| 76 | #endif | ||
| 77 | /* Right now, restore and setup are the same thing */ | ||
| 78 | _GLOBAL(__restore_cpu_e5500) | ||
| 79 | _GLOBAL(__setup_cpu_e5500) | ||
| 80 | mflr r4 | ||
| 81 | bl __e500_icache_setup | ||
| 82 | bl __e500_dcache_setup | ||
| 83 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
| 84 | bl .__setup_base_ivors | ||
| 85 | #else | ||
| 86 | bl __setup_e500mc_ivors | ||
| 87 | #endif | ||
| 88 | mtlr r4 | ||
| 89 | blr | ||
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 1f9123f412ec..cd5519133f86 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
| @@ -66,6 +66,10 @@ extern void __restore_cpu_ppc970(void); | |||
| 66 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); | 66 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); |
| 67 | extern void __restore_cpu_power7(void); | 67 | extern void __restore_cpu_power7(void); |
| 68 | #endif /* CONFIG_PPC64 */ | 68 | #endif /* CONFIG_PPC64 */ |
| 69 | #if defined(CONFIG_E500) | ||
| 70 | extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec); | ||
| 71 | extern void __restore_cpu_e5500(void); | ||
| 72 | #endif /* CONFIG_E500 */ | ||
| 69 | 73 | ||
| 70 | /* This table only contains "desktop" CPUs, it need to be filled with embedded | 74 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
| 71 | * ones as well... | 75 | * ones as well... |
| @@ -1891,7 +1895,9 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1891 | .platform = "ppc5554", | 1895 | .platform = "ppc5554", |
| 1892 | } | 1896 | } |
| 1893 | #endif /* CONFIG_E200 */ | 1897 | #endif /* CONFIG_E200 */ |
| 1898 | #endif /* CONFIG_PPC32 */ | ||
| 1894 | #ifdef CONFIG_E500 | 1899 | #ifdef CONFIG_E500 |
| 1900 | #ifdef CONFIG_PPC32 | ||
| 1895 | { /* e500 */ | 1901 | { /* e500 */ |
| 1896 | .pvr_mask = 0xffff0000, | 1902 | .pvr_mask = 0xffff0000, |
| 1897 | .pvr_value = 0x80200000, | 1903 | .pvr_value = 0x80200000, |
| @@ -1946,6 +1952,26 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1946 | .machine_check = machine_check_e500mc, | 1952 | .machine_check = machine_check_e500mc, |
| 1947 | .platform = "ppce500mc", | 1953 | .platform = "ppce500mc", |
| 1948 | }, | 1954 | }, |
| 1955 | #endif /* CONFIG_PPC32 */ | ||
| 1956 | { /* e5500 */ | ||
| 1957 | .pvr_mask = 0xffff0000, | ||
| 1958 | .pvr_value = 0x80240000, | ||
| 1959 | .cpu_name = "e5500", | ||
| 1960 | .cpu_features = CPU_FTRS_E500MC, | ||
| 1961 | .cpu_user_features = COMMON_USER_BOOKE, | ||
| 1962 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | | ||
| 1963 | MMU_FTR_USE_TLBILX, | ||
| 1964 | .icache_bsize = 64, | ||
| 1965 | .dcache_bsize = 64, | ||
| 1966 | .num_pmcs = 4, | ||
| 1967 | .oprofile_cpu_type = "ppc/e500mc", | ||
| 1968 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | ||
| 1969 | .cpu_setup = __setup_cpu_e5500, | ||
| 1970 | .cpu_restore = __restore_cpu_e5500, | ||
| 1971 | .machine_check = machine_check_e500mc, | ||
| 1972 | .platform = "ppce5500", | ||
| 1973 | }, | ||
| 1974 | #ifdef CONFIG_PPC32 | ||
| 1949 | { /* default match */ | 1975 | { /* default match */ |
| 1950 | .pvr_mask = 0x00000000, | 1976 | .pvr_mask = 0x00000000, |
| 1951 | .pvr_value = 0x00000000, | 1977 | .pvr_value = 0x00000000, |
| @@ -1960,8 +1986,8 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1960 | .machine_check = machine_check_e500, | 1986 | .machine_check = machine_check_e500, |
| 1961 | .platform = "powerpc", | 1987 | .platform = "powerpc", |
| 1962 | } | 1988 | } |
| 1963 | #endif /* CONFIG_E500 */ | ||
| 1964 | #endif /* CONFIG_PPC32 */ | 1989 | #endif /* CONFIG_PPC32 */ |
| 1990 | #endif /* CONFIG_E500 */ | ||
| 1965 | 1991 | ||
| 1966 | #ifdef CONFIG_PPC_BOOK3E_64 | 1992 | #ifdef CONFIG_PPC_BOOK3E_64 |
| 1967 | { /* This is a default entry to get going, to be replaced by | 1993 | { /* This is a default entry to get going, to be replaced by |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index a45a63c3a0c7..1b2cdc8eec90 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
| @@ -538,6 +538,11 @@ int machine_check_e500(struct pt_regs *regs) | |||
| 538 | 538 | ||
| 539 | return 0; | 539 | return 0; |
| 540 | } | 540 | } |
| 541 | |||
| 542 | int machine_check_generic(struct pt_regs *regs) | ||
| 543 | { | ||
| 544 | return 0; | ||
| 545 | } | ||
| 541 | #elif defined(CONFIG_E200) | 546 | #elif defined(CONFIG_E200) |
| 542 | int machine_check_e200(struct pt_regs *regs) | 547 | int machine_check_e200(struct pt_regs *regs) |
| 543 | { | 548 | { |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 068a6e3b3d76..4bac9e00fccc 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
| @@ -11,6 +11,8 @@ menuconfig FSL_SOC_BOOKE | |||
| 11 | 11 | ||
| 12 | if FSL_SOC_BOOKE | 12 | if FSL_SOC_BOOKE |
| 13 | 13 | ||
| 14 | if PPC32 | ||
| 15 | |||
| 14 | config MPC8540_ADS | 16 | config MPC8540_ADS |
| 15 | bool "Freescale MPC8540 ADS" | 17 | bool "Freescale MPC8540 ADS" |
| 16 | select DEFAULT_UIMAGE | 18 | select DEFAULT_UIMAGE |
| @@ -167,7 +169,6 @@ config P3041_DS | |||
| 167 | config P4080_DS | 169 | config P4080_DS |
| 168 | bool "Freescale P4080 DS" | 170 | bool "Freescale P4080 DS" |
| 169 | select DEFAULT_UIMAGE | 171 | select DEFAULT_UIMAGE |
| 170 | select PPC_FSL_BOOK3E | ||
| 171 | select PPC_E500MC | 172 | select PPC_E500MC |
| 172 | select PHYS_64BIT | 173 | select PHYS_64BIT |
| 173 | select SWIOTLB | 174 | select SWIOTLB |
| @@ -176,6 +177,8 @@ config P4080_DS | |||
| 176 | help | 177 | help |
| 177 | This option enables support for the P4080 DS board | 178 | This option enables support for the P4080 DS board |
| 178 | 179 | ||
| 180 | endif # PPC32 | ||
| 181 | |||
| 179 | endif # FSL_SOC_BOOKE | 182 | endif # FSL_SOC_BOOKE |
| 180 | 183 | ||
| 181 | config TQM85xx | 184 | config TQM85xx |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index d361f8119b1e..111138c55f9c 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
| @@ -125,6 +125,7 @@ config 8xx | |||
| 125 | 125 | ||
| 126 | config E500 | 126 | config E500 |
| 127 | select FSL_EMB_PERFMON | 127 | select FSL_EMB_PERFMON |
| 128 | select PPC_FSL_BOOK3E | ||
| 128 | bool | 129 | bool |
| 129 | 130 | ||
| 130 | config PPC_E500MC | 131 | config PPC_E500MC |
| @@ -166,9 +167,14 @@ config BOOKE | |||
| 166 | 167 | ||
| 167 | config FSL_BOOKE | 168 | config FSL_BOOKE |
| 168 | bool | 169 | bool |
| 169 | depends on E200 || E500 | 170 | depends on (E200 || E500) && PPC32 |
| 170 | default y | 171 | default y |
| 171 | 172 | ||
| 173 | # this is for common code between PPC32 & PPC64 FSL BOOKE | ||
| 174 | config PPC_FSL_BOOK3E | ||
| 175 | bool | ||
| 176 | select FSL_EMB_PERFMON | ||
| 177 | default y if FSL_BOOKE | ||
| 172 | 178 | ||
| 173 | config PTE_64BIT | 179 | config PTE_64BIT |
| 174 | bool | 180 | bool |
