@@ -69,7 +69,7 @@ static int __init orion_cpu_win_can_remap(const struct orion_addr_map_cfg *cfg,
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)
+ const u8 attr, const u32 remap)
{
void __iomem *addr = cfg->win_cfg_base(cfg, win);
u32 ctrl, base_high, remap_addr;
@@ -86,7 +86,7 @@ void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg,
writel(base_high, addr + WIN_BASE_OFF);
writel(ctrl, addr + WIN_CTRL_OFF);
if (cfg->cpu_win_can_remap(cfg, win)) {
- if (remap < 0)
+ if (remap == ORION_ADDR_MAP_NO_REMAP)
remap_addr = base;
else
remap_addr = remap;
@@ -38,10 +38,10 @@ struct orion_addr_map_info {
const u32 size;
const u8 target;
const u8 attr;
- const int remap;
+ const u32 remap;
};
-#define ORION_ADDR_MAP_NO_REMAP (-1)
+#define ORION_ADDR_MAP_NO_REMAP (0xFFFFFFFF)
void __init orion_config_wins(struct orion_addr_map_cfg *cfg,
const struct orion_addr_map_info *info);
@@ -49,7 +49,7 @@ void __init orion_config_wins(struct orion_addr_map_cfg *cfg,
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);
+ const u8 attr, const u32 remap);
void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
const void __iomem *ddr_window_cpu_base);
Now that we have ORION_ADDR_MAP_NO_REMAP in place, we can easily convert the 'int remap' field to a 'u32 remap' field, and accept any remapping address, except the magical ORION_ADDR_MAP_NO_REMAP. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- arch/arm/plat-orion/addr-map.c | 4 ++-- arch/arm/plat-orion/include/plat/addr-map.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)