41 static int wl1251_translate_reg_addr(
struct wl1251 *wl,
int addr)
52 addr = wl1251_io_reg_table[
addr];
58 static int wl1251_translate_mem_addr(
struct wl1251 *wl,
int addr)
67 physical = wl1251_translate_mem_addr(wl, addr);
69 wl->
if_ops->read(wl, physical, buf, len);
76 physical = wl1251_translate_mem_addr(wl, addr);
78 wl->
if_ops->write(wl, physical, buf, len);
83 return wl1251_read32(wl, wl1251_translate_mem_addr(wl, addr));
88 wl1251_write32(wl, wl1251_translate_mem_addr(wl, addr), val);
93 return wl1251_read32(wl, wl1251_translate_reg_addr(wl, addr));
98 wl1251_write32(wl, wl1251_translate_reg_addr(wl, addr), val);
136 u32 reg_start,
u32 reg_size)
141 mem_start, mem_size);
143 reg_start, reg_size);
149 " address range. Truncating partition[0].");
152 mem_start, mem_size);
154 reg_start, reg_size);
157 if ((mem_start < reg_start) &&
158 ((mem_start + mem_size) > reg_start)) {
162 "overlapping partition[1]. Adjusted.");
165 mem_start, mem_size);
167 reg_start, reg_size);
168 }
else if ((reg_start < mem_start) &&
169 ((reg_start + reg_size) > mem_start)) {
173 " overlapping partition[0]. Adjusted.");
174 reg_size = mem_start - reg_start;
176 mem_start, mem_size);
178 reg_start, reg_size);
183 partition[1].
start = reg_start;
184 partition[1].
size = reg_size;