powerpc/8xx: Drop CONFIG_8xx_COPYBACK option
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 May 2020 05:49:07 +0000 (05:49 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 May 2020 12:22:20 +0000 (22:22 +1000)
CONFIG_8xx_COPYBACK was there to help disabling copyback cache mode
for debuging hardware. But nobody will design new boards with 8xx now.

All 8xx platforms select it, so make it the default and remove
the option.

Also remove the Mx_RESETVAL values which are pretty useless and hide
the real value while reading code.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/bcc968cda075516eb76e2f25e09821f582c566b4.1589866984.git.christophe.leroy@csgroup.eu
arch/powerpc/configs/adder875_defconfig
arch/powerpc/configs/ep88xc_defconfig
arch/powerpc/configs/mpc866_ads_defconfig
arch/powerpc/configs/mpc885_ads_defconfig
arch/powerpc/configs/tqm8xx_defconfig
arch/powerpc/include/asm/nohash/32/mmu-8xx.h
arch/powerpc/kernel/head_8xx.S
arch/powerpc/platforms/8xx/Kconfig

index f55e23c..5326bc7 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_EXPERT=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_PPC_ADDER875=y
-CONFIG_8xx_COPYBACK=y
 CONFIG_GEN_RTC=y
 CONFIG_HZ_1000=y
 # CONFIG_SECCOMP is not set
index 0e2e5e8..f5c3e72 100644 (file)
@@ -12,7 +12,6 @@ CONFIG_EXPERT=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_PPC_EP88XC=y
-CONFIG_8xx_COPYBACK=y
 CONFIG_GEN_RTC=y
 CONFIG_HZ_100=y
 # CONFIG_SECCOMP is not set
index 5320735..5c56d36 100644 (file)
@@ -12,7 +12,6 @@ CONFIG_EXPERT=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_MPC86XADS=y
-CONFIG_8xx_COPYBACK=y
 CONFIG_GEN_RTC=y
 CONFIG_HZ_1000=y
 CONFIG_MATH_EMULATION=y
index 82a008c..949ff9c 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_EXPERT=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-CONFIG_8xx_COPYBACK=y
 CONFIG_GEN_RTC=y
 CONFIG_HZ_100=y
 # CONFIG_SECCOMP is not set
index eda8bfb..77857d5 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_TQM8XX=y
-CONFIG_8xx_COPYBACK=y
 # CONFIG_8xx_CPU15 is not set
 CONFIG_GEN_RTC=y
 CONFIG_HZ_100=y
index 76af5b0..26b7cee 100644 (file)
@@ -19,7 +19,6 @@
 #define MI_RSV4I       0x08000000      /* Reserve 4 TLB entries */
 #define MI_PPCS                0x02000000      /* Use MI_RPN prob/priv state */
 #define MI_IDXMASK     0x00001f00      /* TLB index to be loaded */
-#define MI_RESETVAL    0x00000000      /* Value of register at reset */
 
 /* These are the Ks and Kp from the PowerPC books.  For proper operation,
  * Ks = 0, Kp = 1.
@@ -95,7 +94,6 @@
 #define MD_TWAM                0x04000000      /* Use 4K page hardware assist */
 #define MD_PPCS                0x02000000      /* Use MI_RPN prob/priv state */
 #define MD_IDXMASK     0x00001f00      /* TLB index to be loaded */
-#define MD_RESETVAL    0x04000000      /* Value of register at reset */
 
 #define SPRN_M_CASID   793     /* Address space ID (context) to match */
 #define MC_ASIDMASK    0x0000000f      /* Bits used for ASID value */
index 073a651..905205c 100644 (file)
@@ -779,10 +779,7 @@ start_here:
 initial_mmu:
        li      r8, 0
        mtspr   SPRN_MI_CTR, r8         /* remove PINNED ITLB entries */
-       lis     r10, MD_RESETVAL@h
-#ifndef CONFIG_8xx_COPYBACK
-       oris    r10, r10, MD_WTDEF@h
-#endif
+       lis     r10, MD_TWAM@h
        mtspr   SPRN_MD_CTR, r10        /* remove PINNED DTLB entries */
 
        tlbia                   /* Invalidate all TLB entries */
@@ -857,17 +854,7 @@ initial_mmu:
        mtspr   SPRN_DC_CST, r8
        lis     r8, IDC_ENABLE@h
        mtspr   SPRN_IC_CST, r8
-#ifdef CONFIG_8xx_COPYBACK
-       mtspr   SPRN_DC_CST, r8
-#else
-       /* For a debug option, I left this here to easily enable
-        * the write through cache mode
-        */
-       lis     r8, DC_SFWT@h
        mtspr   SPRN_DC_CST, r8
-       lis     r8, IDC_ENABLE@h
-       mtspr   SPRN_DC_CST, r8
-#endif
        /* Disable debug mode entry on breakpoints */
        mfspr   r8, SPRN_DER
 #ifdef CONFIG_PERF_EVENTS
index e0fe670..b37de62 100644 (file)
@@ -98,15 +98,6 @@ menu "MPC8xx CPM Options"
 # 8xx specific questions.
 comment "Generic MPC8xx Options"
 
-config 8xx_COPYBACK
-       bool "Copy-Back Data Cache (else Writethrough)"
-       help
-         Saying Y here will cause the cache on an MPC8xx processor to be used
-         in Copy-Back mode.  If you say N here, it is used in Writethrough
-         mode.
-
-         If in doubt, say Y here.
-
 config 8xx_GPIO
        bool "GPIO API Support"
        select GPIOLIB