aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion/include/plat/addr-map.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-orion/include/plat/addr-map.h')
-rw-r--r--arch/arm/plat-orion/include/plat/addr-map.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h
new file mode 100644
index 00000000000..55e40f43f1e
--- /dev/null
+++ b/arch/arm/plat-orion/include/plat/addr-map.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/plat-orion/include/plat/addr-map.h
3 *
4 * Marvell Orion SoC address map handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __PLAT_ADDR_MAP_H
12#define __PLAT_ADDR_MAP_H
13
14struct orion_addr_map_cfg {
15 const int num_wins; /* Total number of windows */
16 const int remappable_wins;
17 const u32 bridge_virt_base;
18
19 /* If NULL, the default cpu_win_can_remap will be used, using
20 the value in remappable_wins */
21 int (*cpu_win_can_remap) (const struct orion_addr_map_cfg *cfg,
22 const int win);
23 /* If NULL, the default win_cfg_base will be used, using the
24 value in bridge_virt_base */
25 void __iomem *(*win_cfg_base) (const struct orion_addr_map_cfg *cfg,
26 const int win);
27};
28
29/*
30 * Information needed to setup one address mapping.
31 */
32struct orion_addr_map_info {
33 const int win;
34 const u32 base;
35 const u32 size;
36 const u8 target;
37 const u8 attr;
38 const int remap;
39};
40
41void __init orion_config_wins(struct orion_addr_map_cfg *cfg,
42 const struct orion_addr_map_info *info);
43
44void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg,
45 const int win, const u32 base,
46 const u32 size, const u8 target,
47 const u8 attr, const int remap);
48
49void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
50 struct mbus_dram_target_info *info,
51 const u32 ddr_window_cpu_base);
52#endif