summaryrefslogtreecommitdiff
path: root/src/arch/armv7/lib/cache-cp15.c
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-01-28 12:24:54 -0800
committerDavid Hendricks <dhendrix@chromium.org>2013-01-29 00:02:53 +0100
commit1fb9bfa0f90c73c73bf0b9b7d9d5a2af6d7fe530 (patch)
tree16521e78bbd6b5721ee33b8392356f4c78853385 /src/arch/armv7/lib/cache-cp15.c
parent4a484203d011c6fb3dd6f0edb2fadb3f2b07220c (diff)
armv7: nuke global_data.h and remove some references to gd struct
This begins to remove references to global data which u-boot used. There are still many commented out references to gd-> and bd-> which we'll fix once we're happy with the replacements. Change-Id: Ie1b40a997e28a118f8f3ad96a2f9a2462d32fbe3 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/2210 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/armv7/lib/cache-cp15.c')
-rw-r--r--src/arch/armv7/lib/cache-cp15.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/arch/armv7/lib/cache-cp15.c b/src/arch/armv7/lib/cache-cp15.c
index c684d65dfd..221befa952 100644
--- a/src/arch/armv7/lib/cache-cp15.c
+++ b/src/arch/armv7/lib/cache-cp15.c
@@ -24,9 +24,8 @@
#include <common.h>
#include <stdlib.h>
#include <system.h>
-#include <global_data.h>
-DECLARE_GLOBAL_DATA_PTR;
+static unsigned int tlb_addr;
static void cp_delay (void)
{
@@ -41,9 +40,7 @@ static void cp_delay (void)
static void set_section_dcache(int section, enum dcache_option option)
{
u32 value = section << MMU_SECTION_SHIFT | (3 << 10);
-// u32 *page_table = (u32 *)gd->tlb_addr;
u32 *page_table;
- unsigned int tlb_addr;
unsigned int tlb_size = 4096 * 4;
/*
@@ -82,7 +79,7 @@ void __mmu_page_table_flush(unsigned long start, unsigned long stop)
void mmu_set_region_dcache(unsigned long start, int size, enum dcache_option option)
{
- u32 *page_table = (u32 *)gd->tlb_addr;
+ u32 *page_table = &tlb_addr;
u32 upto, end;
end = ALIGN(start + size, MMU_SECTION_SIZE) >> MMU_SECTION_SHIFT;
@@ -113,8 +110,6 @@ static inline void dram_bank_mmu_setup(int bank)
}
#endif
-/* FIXME(dhendrix): modified to take arguments from the caller (mainboard's
- romstage.c) so it doesn't rely on global data struct */
/**
* dram_bank_mmu_set - set up the data cache policy for a given dram bank
*
@@ -163,7 +158,7 @@ static inline void mmu_setup(void)
/* Copy the page table address to cp15 */
asm volatile("mcr p15, 0, %0, c2, c0, 0"
- : : "r" (gd->tlb_addr) : "memory");
+ : : "r" (tlb_addr) : "memory");
/* Set the access control to all-supervisor */
asm volatile("mcr p15, 0, %0, c3, c0, 0"
: : "r" (~0));