summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/mem_map.h
blob: e92b31051bb7ad1e5015e2110d6ac80239d1d4f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
 * mem_map.h
 * Common header file for blackfin family of processors.
 *
 */

#ifndef _MEM_MAP_H_
#define _MEM_MAP_H_

#include <mach/mem_map.h>

#ifndef __ASSEMBLY__

#ifdef CONFIG_SMP
static inline ulong get_l1_scratch_start_cpu(int cpu)
{
	return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
}
static inline ulong get_l1_code_start_cpu(int cpu)
{
	return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START;
}
static inline ulong get_l1_data_a_start_cpu(int cpu)
{
	return (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START;
}
static inline ulong get_l1_data_b_start_cpu(int cpu)
{
	return (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START;
}

static inline ulong get_l1_scratch_start(void)
{
	return get_l1_scratch_start_cpu(blackfin_core_id());
}
static inline ulong get_l1_code_start(void)
{
	return get_l1_code_start_cpu(blackfin_core_id());
}
static inline ulong get_l1_data_a_start(void)
{
	return get_l1_data_a_start_cpu(blackfin_core_id());
}
static inline ulong get_l1_data_b_start(void)
{
	return get_l1_data_b_start_cpu(blackfin_core_id());
}

#else /* !CONFIG_SMP */

static inline ulong get_l1_scratch_start_cpu(int cpu)
{
	return L1_SCRATCH_START;
}
static inline ulong get_l1_code_start_cpu(int cpu)
{
	return L1_CODE_START;
}
static inline ulong get_l1_data_a_start_cpu(int cpu)
{
	return L1_DATA_A_START;
}
static inline ulong get_l1_data_b_start_cpu(int cpu)
{
	return L1_DATA_B_START;
}
static inline ulong get_l1_scratch_start(void)
{
	return get_l1_scratch_start_cpu(0);
}
static inline ulong get_l1_code_start(void)
{
	return  get_l1_code_start_cpu(0);
}
static inline ulong get_l1_data_a_start(void)
{
	return get_l1_data_a_start_cpu(0);
}
static inline ulong get_l1_data_b_start(void)
{
	return get_l1_data_b_start_cpu(0);
}

#endif /* CONFIG_SMP */
#endif /* __ASSEMBLY__ */

#endif				/* _MEM_MAP_H_ */
OpenPOWER on IntegriCloud