11 #include <linux/kernel.h>
12 #include <linux/module.h>
34 #define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
35 #define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
40 #define WIN_CTRL_OFF 0x0000
41 #define WIN_BASE_OFF 0x0004
42 #define WIN_REMAP_LO_OFF 0x0008
43 #define WIN_REMAP_HI_OFF 0x000c
60 if (win < cfg->remappable_wins)
67 const int win,
const u32 base,
69 const u8 attr,
const int remap)
72 u32 ctrl, base_high, remap_addr;
76 "%d when only %d allowed\n", win, cfg->
num_wins);
79 base_high = base & 0xffff0000;
80 ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
100 while (info->
win != -1) {
112 for (i = 0; i < cfg->
num_wins; i++) {
136 orion_disable_wins(cfg);
139 orion_setup_cpu_wins(cfg, info);
146 const void __iomem *ddr_window_cpu_base)
153 for (i = 0, cs = 0; i < 4; i++) {
161 struct mbus_dram_window *
w;
165 w->mbus_attr = 0xf & ~(1 <<
i);
166 w->base = base & 0xffff0000;
167 w->size = (size | 0x0000ffff) + 1;