[U-Boot] [PATCH v4 17/28] Drop CONFIG_INIT_CRITICAL

Lukas Auer lukas.auer at aisec.fraunhofer.de
Thu Nov 22 10:26:26 UTC 2018


From: Bin Meng <bmeng.cn at gmail.com>

This is now deprecated and no board is using it. Drop it.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- New patch to replace patch "riscv: remove CONFIG_INIT_CRITICAL"

 arch/nds32/cpu/n1213/start.S   | 51 ----------------------------------
 arch/riscv/cpu/start.S         | 13 ---------
 board/armltd/integrator/README |  4 +--
 include/common.h               |  5 ----
 scripts/config_whitelist.txt   |  1 -
 5 files changed, 1 insertion(+), 73 deletions(-)

diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index aa9457f5e4..cf966e2132 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -200,14 +200,6 @@ update_gp:
 	jal	turnoff_watchdog
 #endif
 
-/*
- * Do CPU critical regs init only at reboot,
- * not when booting from ram
- */
-#ifdef CONFIG_INIT_CRITICAL
-	jal	cpu_init_crit		! Do CPU critical regs init
-#endif
-
 /*
  * Set stackpointer in internal RAM to call board_init_f
  * $sp must be 8-byte alignment for ABI compliance.
@@ -318,49 +310,6 @@ call_board_init_r:
 	/* jump to it ... */
 	jr	$lp			/* jump to board_init_r() */
 
-/*
- * Initialize CPU critical registers
- *
- *	1.	Setup control registers
- *		1.1 Mask all IRQs
- *		1.2 Flush cache and TLB
- *		1.3 Disable MMU and cache
- *	2.	Setup memory timing
- */
-
-cpu_init_crit:
-
-	move	$r0, $lp		/* push	ra */
-
-	/* Disable Interrupts by clear GIE in $PSW reg */
-	setgie.d
-
-	/* Flush caches and TLB */
-	/* Invalidate caches */
-	jal	invalidate_icac
-	jal	invalidate_dcac
-
-	/* Flush TLB */
-	mfsr	$p0, $MMU_CFG
-	andi	$p0, $p0, 0x3			! MMPS
-	li	$p1, 0x2			! TLB MMU
-	bne	$p0, $p1, 1f
-	tlbop	flushall			! Flush TLB
-
-1:
-	! Disable MMU, Dcache
-	! Whitiger is MMU disabled when reset
-	! Disable the D$
-	mfsr	$p0, MR_CAC_CTL			! Get the $CACHE_CTL reg
-	li	$p1, DIS_DCAC
-	and	$p0, $p0, $p1			! Set DC_EN bit
-	mtsr	$p0, MR_CAC_CTL			! write back the $CACHE_CTL reg
-	isb
-
-	move	$lp, $r0
-2:
-	ret
-
 /*
  * Invalidate I$
  */
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index 88b4aaa1c0..9804a8ac44 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -50,14 +50,6 @@ handle_reset:
 	csrwi	mstatus, 0
 	csrwi	mie, 0
 
-/*
- * Do CPU critical regs init only at reboot,
- * not when booting from ram
- */
-#ifdef CONFIG_INIT_CRITICAL
-	jal	cpu_init_crit		/* Do CPU critical regs init */
-#endif
-
 /*
  * Set stackpointer in internal/ex RAM to call board_init_f
  */
@@ -285,8 +277,3 @@ trap_entry:
 	LREG	x31, 31*REGBYTES(sp)
 	addi	sp, sp, 32*REGBYTES
 	mret
-
-#ifdef CONFIG_INIT_CRITICAL
-cpu_init_crit:
-    ret
-#endif
diff --git a/board/armltd/integrator/README b/board/armltd/integrator/README
index 5a0e934924..af9dcc1f4f 100644
--- a/board/armltd/integrator/README
+++ b/board/armltd/integrator/README
@@ -36,9 +36,7 @@ In case c) it may be necessary for U-Boot to perform CM dependent initialization
 Configuring U-Boot :
 ------------------
 	The makefile contains targets for Integrator platforms of both types
-fitted with all current variants of CM. If these targets are to be used with
-boot process c) above then CONFIG_INIT_CRITICAL may need to be defined to ensure
-that the CM is correctly configured.
+fitted with all current variants of CM.
 
 	There are also targets independent of CM. These may not be suitable for
 boot process c) above. They have been preserved for backward compatibility with
diff --git a/include/common.h b/include/common.h
index 3f69943887..8b56137032 100644
--- a/include/common.h
+++ b/include/common.h
@@ -549,11 +549,6 @@ int cpu_release(u32 nr, int argc, char * const argv[]);
 #endif
 #endif
 
-#ifdef CONFIG_INIT_CRITICAL
-#error CONFIG_INIT_CRITICAL is deprecated!
-#error Read section CONFIG_SKIP_LOWLEVEL_INIT in README.
-#endif
-
 #define ROUND(a,b)		(((a) + (b) - 1) & ~((b) - 1))
 
 /*
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index abfb0ff89f..7dd9d60541 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -961,7 +961,6 @@ CONFIG_IMX_OTP
 CONFIG_IMX_VIDEO_SKIP
 CONFIG_INETSPACE_V2
 CONFIG_INITRD_TAG
-CONFIG_INIT_CRITICAL
 CONFIG_INIT_IGNORE_ERROR
 CONFIG_INI_ALLOW_MULTILINE
 CONFIG_INI_CASE_INSENSITIVE
-- 
2.17.2



More information about the U-Boot mailing list