diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-12-07 21:48:06 +0100 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-12-13 18:46:55 -0500 |
commit | 45173d5ed4c9a397db31623bf6469efbd3a239cd (patch) | |
tree | d4efe8af8c7b23ed2a97d2686a88037ea6bc7758 /arch/arm/plat-orion | |
parent | b6d1c33a31deb1784c1d34070db6e84fd6f9d870 (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.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/addr-map.h | 3 |
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 d3abb34a10a..c27ad88bc40 100644 --- a/arch/arm/plat-orion/addr-map.c +++ b/arch/arm/plat-orion/addr-map.c @@ -14,6 +14,8 @@ #include <linux/io.h> #include <plat/addr-map.h> +struct mbus_dram_target_info orion_mbus_dram_info; + /* * DDR target is the same on all Orion platforms. */ @@ -134,14 +136,13 @@ void __init orion_config_wins(struct orion_addr_map_cfg * cfg, * Setup MBUS dram target info. */ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, - struct mbus_dram_target_info *info, const u32 ddr_window_cpu_base) { void __iomem *addr; int i; int cs; - info->mbus_dram_target_id = TARGET_DDR; + orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; addr = (void __iomem *)ddr_window_cpu_base; @@ -155,12 +156,12 @@ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, if (size & 1) { struct mbus_dram_window *w; - w = &info->cs[cs++]; + w = &orion_mbus_dram_info.cs[cs++]; w->cs_index = i; w->mbus_attr = 0xf & ~(1 << i); w->base = base & 0xffff0000; w->size = (size | 0x0000ffff) + 1; } } - info->num_cs = cs; + orion_mbus_dram_info.num_cs = cs; } diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h index 55e40f43f1e..fd556f77562 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 @@ #ifndef __PLAT_ADDR_MAP_H #define __PLAT_ADDR_MAP_H +extern struct mbus_dram_target_info orion_mbus_dram_info; + struct orion_addr_map_cfg { const int num_wins; /* Total number of windows */ const int remappable_wins; @@ -47,6 +49,5 @@ void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg, const u8 attr, const int remap); void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, - struct mbus_dram_target_info *info, const u32 ddr_window_cpu_base); #endif |