aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-17 11:25:06 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-22 21:16:07 -0400
commitfa48f84a8cc722ca48b32fa0c338b6c3b358717d (patch)
treeaa2d2d5f1ec674b2d4c70b506ef9cd0249715e14 /arch/blackfin/mach-bf561
parent985895bd8d1e41079b41da32cdc57876a4a74126 (diff)
Blackfin: unify memory map headers
Many aspects of the Blackfin memory map is exactly the same across all variants. Rather than copy and paste all of these duplicated values in each header, unify all of these into the common Blackfin memory map header file. In the process, push down BF561 SMP specific stuff to the BF561 specific header to keep the noise down. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561')
-rw-r--r--arch/blackfin/mach-bf561/include/mach/blackfin.h1
-rw-r--r--arch/blackfin/mach-bf561/include/mach/mem_map.h58
2 files changed, 43 insertions, 16 deletions
diff --git a/arch/blackfin/mach-bf561/include/mach/blackfin.h b/arch/blackfin/mach-bf561/include/mach/blackfin.h
index f79f6626b7e..8be31358ef8 100644
--- a/arch/blackfin/mach-bf561/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf561/include/mach/blackfin.h
@@ -34,7 +34,6 @@
34#define BF561_FAMILY 34#define BF561_FAMILY
35 35
36#include "bf561.h" 36#include "bf561.h"
37#include "mem_map.h"
38#include "defBF561.h" 37#include "defBF561.h"
39#include "anomaly.h" 38#include "anomaly.h"
40 39
diff --git a/arch/blackfin/mach-bf561/include/mach/mem_map.h b/arch/blackfin/mach-bf561/include/mach/mem_map.h
index 419dffdc96e..a63e15c86d9 100644
--- a/arch/blackfin/mach-bf561/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf561/include/mach/mem_map.h
@@ -1,13 +1,16 @@
1/* 1/*
2 * Memory MAP 2 * BF561 memory map
3 * Common header file for blackfin BF561 of processors. 3 *
4 * Copyright 2004-2009 Analog Devices Inc.
5 * Licensed under the GPL-2 or later.
4 */ 6 */
5 7
6#ifndef _MEM_MAP_561_H_ 8#ifndef __BFIN_MACH_MEM_MAP_H__
7#define _MEM_MAP_561_H_ 9#define __BFIN_MACH_MEM_MAP_H__
8 10
9#define COREMMR_BASE 0xFFE00000 /* Core MMRs */ 11#ifndef __BFIN_MEM_MAP_H__
10#define SYSMMR_BASE 0xFFC00000 /* System MMRs */ 12# error "do not include mach/mem_map.h directly -- use asm/mem_map.h"
13#endif
11 14
12/* Async Memory Banks */ 15/* Async Memory Banks */
13#define ASYNC_BANK3_BASE 0x2C000000 /* Async Bank 3 */ 16#define ASYNC_BANK3_BASE 0x2C000000 /* Async Bank 3 */
@@ -82,9 +85,6 @@
82#define COREA_L1_SCRATCH_START 0xFFB00000 85#define COREA_L1_SCRATCH_START 0xFFB00000
83#define COREB_L1_SCRATCH_START 0xFF700000 86#define COREB_L1_SCRATCH_START 0xFF700000
84 87
85#define L1_SCRATCH_START COREA_L1_SCRATCH_START
86#define L1_SCRATCH_LENGTH 0x1000
87
88#ifdef __ASSEMBLY__ 88#ifdef __ASSEMBLY__
89 89
90/* 90/*
@@ -155,14 +155,42 @@
155 dreg = ROT dreg BY -1; \ 155 dreg = ROT dreg BY -1; \
156 dreg = CC; 156 dreg = CC;
157 157
158#else 158static inline unsigned long get_l1_scratch_start_cpu(int cpu)
159#define GET_PDA_SAFE(preg) \ 159{
160 preg.l = _cpu_pda; \ 160 return cpu ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
161 preg.h = _cpu_pda; 161}
162static inline unsigned long get_l1_code_start_cpu(int cpu)
163{
164 return cpu ? COREB_L1_CODE_START : COREA_L1_CODE_START;
165}
166static inline unsigned long get_l1_data_a_start_cpu(int cpu)
167{
168 return cpu ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START;
169}
170static inline unsigned long get_l1_data_b_start_cpu(int cpu)
171{
172 return cpu ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START;
173}
174
175static inline unsigned long get_l1_scratch_start(void)
176{
177 return get_l1_scratch_start_cpu(blackfin_core_id());
178}
179static inline unsigned long get_l1_code_start(void)
180{
181 return get_l1_code_start_cpu(blackfin_core_id());
182}
183static inline unsigned long get_l1_data_a_start(void)
184{
185 return get_l1_data_a_start_cpu(blackfin_core_id());
186}
187static inline unsigned long get_l1_data_b_start(void)
188{
189 return get_l1_data_b_start_cpu(blackfin_core_id());
190}
162 191
163#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
164#endif /* CONFIG_SMP */ 192#endif /* CONFIG_SMP */
165 193
166#endif /* __ASSEMBLY__ */ 194#endif /* __ASSEMBLY__ */
167 195
168#endif /* _MEM_MAP_533_H_ */ 196#endif