9a237ec9b90eea74b0fe386e6ee4a4a3944f2c19
[openwrt/staging/chunkeey.git] / target / linux / mvebu / patches-3.8 / 030-arm_plat_orion_introduce_win_ctrl_enable.patch
1 Instead of hardcoding "1" as being the bit value to enable an address
2 decoding window, introduce and use a WIN_CTRL_ENABLE definition.
3
4 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5 ---
6 arch/arm/plat-orion/addr-map.c | 4 +++-
7 1 file changed, 3 insertions(+), 1 deletion(-)
8
9 --- a/arch/arm/plat-orion/addr-map.c
10 +++ b/arch/arm/plat-orion/addr-map.c
11 @@ -38,6 +38,7 @@ EXPORT_SYMBOL_GPL(mv_mbus_dram_info);
12 * CPU Address Decode Windows registers
13 */
14 #define WIN_CTRL_OFF 0x0000
15 +#define WIN_CTRL_ENABLE BIT(0)
16 #define WIN_BASE_OFF 0x0004
17 #define WIN_REMAP_LO_OFF 0x0008
18 #define WIN_REMAP_HI_OFF 0x000c
19 @@ -79,7 +80,8 @@ void __init orion_setup_cpu_win(const st
20 }
21
22 base_high = base & 0xffff0000;
23 - ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
24 + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) |
25 + WIN_CTRL_ENABLE;
26
27 writel(base_high, addr + WIN_BASE_OFF);
28 writel(ctrl, addr + WIN_CTRL_OFF);