2011-12-08 04:48:05 +08:00
|
|
|
/*
|
|
|
|
* arch/arm/plat-orion/include/plat/addr-map.h
|
|
|
|
*
|
|
|
|
* Marvell Orion SoC address map handling.
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PLAT_ADDR_MAP_H
|
|
|
|
#define __PLAT_ADDR_MAP_H
|
|
|
|
|
2011-12-08 04:48:06 +08:00
|
|
|
extern struct mbus_dram_target_info orion_mbus_dram_info;
|
|
|
|
|
2011-12-08 04:48:05 +08:00
|
|
|
struct orion_addr_map_cfg {
|
|
|
|
const int num_wins; /* Total number of windows */
|
|
|
|
const int remappable_wins;
|
2012-09-11 20:27:28 +08:00
|
|
|
void __iomem *bridge_virt_base;
|
2012-10-12 23:59:48 +08:00
|
|
|
int hw_io_coherency;
|
2011-12-08 04:48:05 +08:00
|
|
|
|
|
|
|
/* If NULL, the default cpu_win_can_remap will be used, using
|
|
|
|
the value in remappable_wins */
|
|
|
|
int (*cpu_win_can_remap) (const struct orion_addr_map_cfg *cfg,
|
|
|
|
const int win);
|
|
|
|
/* If NULL, the default win_cfg_base will be used, using the
|
|
|
|
value in bridge_virt_base */
|
|
|
|
void __iomem *(*win_cfg_base) (const struct orion_addr_map_cfg *cfg,
|
|
|
|
const int win);
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Information needed to setup one address mapping.
|
|
|
|
*/
|
|
|
|
struct orion_addr_map_info {
|
|
|
|
const int win;
|
|
|
|
const u32 base;
|
|
|
|
const u32 size;
|
|
|
|
const u8 target;
|
|
|
|
const u8 attr;
|
|
|
|
const int remap;
|
|
|
|
};
|
|
|
|
|
|
|
|
void __init orion_config_wins(struct orion_addr_map_cfg *cfg,
|
|
|
|
const struct orion_addr_map_info *info);
|
|
|
|
|
|
|
|
void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg,
|
|
|
|
const int win, const u32 base,
|
|
|
|
const u32 size, const u8 target,
|
|
|
|
const u8 attr, const int remap);
|
|
|
|
|
|
|
|
void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
|
2012-09-11 20:27:26 +08:00
|
|
|
const void __iomem *ddr_window_cpu_base);
|
2011-12-08 04:48:05 +08:00
|
|
|
#endif
|