From 4a484203d011c6fb3dd6f0edb2fadb3f2b07220c Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 28 Jan 2013 12:11:27 -0800 Subject: armv7: Clean out weak symbols and unnecessary #ifdef's in cache files This just removes unused code. If for some reason we don't want to initialize cache, then the CPU or mainboard specific init routines don't need to call these. Change-Id: Ieb7393b6cbc103e490753da4ed27114156466ded Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/2209 Reviewed-by: Ronald G. Minnich Tested-by: build bot (Jenkins) --- src/arch/armv7/lib/cache-cp15.c | 52 ----------------------------------------- 1 file changed, 52 deletions(-) (limited to 'src/arch/armv7/lib/cache-cp15.c') diff --git a/src/arch/armv7/lib/cache-cp15.c b/src/arch/armv7/lib/cache-cp15.c index 1786725148..c684d65dfd 100644 --- a/src/arch/armv7/lib/cache-cp15.c +++ b/src/arch/armv7/lib/cache-cp15.c @@ -21,25 +21,13 @@ * MA 02111-1307 USA */ -/* FIXME(dhendrix): clean-up weak symbols if it looks unlikely we'll - want to override them with anything other than what's in cache_v7. */ #include #include #include #include -#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) - DECLARE_GLOBAL_DATA_PTR; -#if 0 -void __arm_init_before_mmu(void) -{ -} -void arm_init_before_mmu(void) - __attribute__((weak, alias("__arm_init_before_mmu"))); -#endif - static void cp_delay (void) { volatile int i; @@ -92,11 +80,6 @@ void __mmu_page_table_flush(unsigned long start, unsigned long stop) } #endif -#if 0 -void mmu_page_table_flush(unsigned long start, unsigned long stop) - __attribute__((weak, alias("__mmu_page_table_flush"))); -#endif - void mmu_set_region_dcache(unsigned long start, int size, enum dcache_option option) { u32 *page_table = (u32 *)gd->tlb_addr; @@ -237,24 +220,7 @@ static void cache_disable(uint32_t cache_bit) flush_dcache_all(); set_cr(reg & ~cache_bit); } -#endif - -#ifdef CONFIG_SYS_ICACHE_OFF -void icache_enable (void) -{ - return; -} - -void icache_disable (void) -{ - return; -} -int icache_status (void) -{ - return 0; /* always off */ -} -#else void icache_enable(void) { cache_enable(CR_I); @@ -269,24 +235,7 @@ int icache_status(void) { return (get_cr() & CR_I) != 0; } -#endif - -#ifdef CONFIG_SYS_DCACHE_OFF -void dcache_enable (void) -{ - return; -} -void dcache_disable (void) -{ - return; -} - -int dcache_status (void) -{ - return 0; /* always off */ -} -#else void dcache_enable(void) { cache_enable(CR_C); @@ -301,4 +250,3 @@ int dcache_status(void) { return (get_cr() & CR_C) != 0; } -#endif -- cgit v1.2.3