aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-12-07 15:48:06 -0500
committerNicolas Pitre <nico@fluxnic.net>2011-12-13 18:46:55 -0500
commit45173d5ed4c9a397db31623bf6469efbd3a239cd (patch)
treed4efe8af8c7b23ed2a97d2686a88037ea6bc7758 /arch/arm/plat-orion
parentb6d1c33a31deb1784c1d34070db6e84fd6f9d870 (diff)
ARM: Orion: mbus_dram_info consolidation
Move the *_mbus_dram_info structure into the orion platform and call it orion_mbus_dram_info everywhere. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Michael Walle <michael@walle.cc> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r--arch/arm/plat-orion/addr-map.c9
-rw-r--r--arch/arm/plat-orion/include/plat/addr-map.h3
2 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c
index d3abb34a10aa..c27ad88bc400 100644
--- a/arch/arm/plat-orion/addr-map.c
+++ b/arch/arm/plat-orion/addr-map.c
@@ -14,6 +14,8 @@
14#include <linux/io.h> 14#include <linux/io.h>
15#include <plat/addr-map.h> 15#include <plat/addr-map.h>
16 16
17struct mbus_dram_target_info orion_mbus_dram_info;
18
17/* 19/*
18 * DDR target is the same on all Orion platforms. 20 * DDR target is the same on all Orion platforms.
19 */ 21 */
@@ -134,14 +136,13 @@ void __init orion_config_wins(struct orion_addr_map_cfg * cfg,
134 * Setup MBUS dram target info. 136 * Setup MBUS dram target info.
135 */ 137 */
136void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, 138void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
137 struct mbus_dram_target_info *info,
138 const u32 ddr_window_cpu_base) 139 const u32 ddr_window_cpu_base)
139{ 140{
140 void __iomem *addr; 141 void __iomem *addr;
141 int i; 142 int i;
142 int cs; 143 int cs;
143 144
144 info->mbus_dram_target_id = TARGET_DDR; 145 orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
145 146
146 addr = (void __iomem *)ddr_window_cpu_base; 147 addr = (void __iomem *)ddr_window_cpu_base;
147 148
@@ -155,12 +156,12 @@ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
155 if (size & 1) { 156 if (size & 1) {
156 struct mbus_dram_window *w; 157 struct mbus_dram_window *w;
157 158
158 w = &info->cs[cs++]; 159 w = &orion_mbus_dram_info.cs[cs++];
159 w->cs_index = i; 160 w->cs_index = i;
160 w->mbus_attr = 0xf & ~(1 << i); 161 w->mbus_attr = 0xf & ~(1 << i);
161 w->base = base & 0xffff0000; 162 w->base = base & 0xffff0000;
162 w->size = (size | 0x0000ffff) + 1; 163 w->size = (size | 0x0000ffff) + 1;
163 } 164 }
164 } 165 }
165 info->num_cs = cs; 166 orion_mbus_dram_info.num_cs = cs;
166} 167}
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h
index 55e40f43f1e6..fd556f77562c 100644
--- a/arch/arm/plat-orion/include/plat/addr-map.h
+++ b/arch/arm/plat-orion/include/plat/addr-map.h
@@ -11,6 +11,8 @@
11#ifndef __PLAT_ADDR_MAP_H 11#ifndef __PLAT_ADDR_MAP_H
12#define __PLAT_ADDR_MAP_H 12#define __PLAT_ADDR_MAP_H
13 13
14extern struct mbus_dram_target_info orion_mbus_dram_info;
15
14struct orion_addr_map_cfg { 16struct orion_addr_map_cfg {
15 const int num_wins; /* Total number of windows */ 17 const int num_wins; /* Total number of windows */
16 const int remappable_wins; 18 const int remappable_wins;
@@ -47,6 +49,5 @@ void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg,
47 const u8 attr, const int remap); 49 const u8 attr, const int remap);
48 50
49void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, 51void __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 const u32 ddr_window_cpu_base);
52#endif 53#endif