[U-Boot] [PATCH v8 2/8] arm: make mmu_enabled() a global function

Kuo-Jung Su dantesu at gmail.com
Mon Dec 30 10:23:05 CET 2013


From: Kuo-Jung Su <dantesu at faraday-tech.com>

By making mmu_enabled() a global function, we could reuse the code
in other mmu/d-cache related routines.

Signed-off-by: Kuo-Jung Su <dantesu at faraday-tech.com>
CC: Albert Aribaud <albert.u.boot at aribaud.net>
---
Changes for v8:
	- Initial commit

 arch/arm/lib/cache-cp15.c |    2 +-
 include/common.h          |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 550cced..61264e8 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -119,7 +119,7 @@ static inline void mmu_setup(void)
 	set_cr(reg | CR_M);
 }

-static int mmu_enabled(void)
+int mmu_enabled(void)
 {
 	return get_cr() & CR_M;
 }
diff --git a/include/common.h b/include/common.h
index d49c514..44c6bab 100644
--- a/include/common.h
+++ b/include/common.h
@@ -549,6 +549,7 @@ void	icache_disable(void);
 int	dcache_status (void);
 void	dcache_enable (void);
 void	dcache_disable(void);
+int	mmu_enabled(void);
 void	mmu_disable(void);
 #if defined(CONFIG_ARM)
 void	relocate_code(ulong);
--
1.7.9.5



More information about the U-Boot mailing list