[RFC PATCH 2/3] riscv: cpu: generic: fallback to generic cleanup_before_linux()

Yao Zi ziyao at disroot.org
Thu Jan 23 10:11:34 CET 2025


The current implementation is equivalent to the fallback one, so
this shouldn't change any behaviour but cleans the code up only.

Signed-off-by: Yao Zi <ziyao at disroot.org>
---
 arch/riscv/cpu/generic/Makefile |  1 -
 arch/riscv/cpu/generic/cpu.c    | 22 ----------------------
 2 files changed, 23 deletions(-)
 delete mode 100644 arch/riscv/cpu/generic/cpu.c

diff --git a/arch/riscv/cpu/generic/Makefile b/arch/riscv/cpu/generic/Makefile
index 258e4620dd4..a9be44ec387 100644
--- a/arch/riscv/cpu/generic/Makefile
+++ b/arch/riscv/cpu/generic/Makefile
@@ -3,4 +3,3 @@
 # Copyright (C) 2018, Bin Meng <bmeng.cn at gmail.com>
 
 obj-y += dram.o
-obj-y += cpu.o
diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c
deleted file mode 100644
index f13c18942f3..00000000000
--- a/arch/riscv/cpu/generic/cpu.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2018, Bin Meng <bmeng.cn at gmail.com>
- */
-
-#include <irq_func.h>
-#include <asm/cache.h>
-
-/*
- * cleanup_before_linux() is called just before we call linux
- * it prepares the processor for linux
- *
- * we disable interrupt and caches.
- */
-int cleanup_before_linux(void)
-{
-	disable_interrupts();
-
-	cache_flush();
-
-	return 0;
-}
-- 
2.48.0



More information about the U-Boot mailing list