• Home
  • Raw
  • Download

Lines Matching refs:wl

48 void wlcore_disable_interrupts(struct wl1271 *wl);
49 void wlcore_disable_interrupts_nosync(struct wl1271 *wl);
50 void wlcore_enable_interrupts(struct wl1271 *wl);
51 void wlcore_synchronize_interrupts(struct wl1271 *wl);
53 void wl1271_io_reset(struct wl1271 *wl);
54 void wl1271_io_init(struct wl1271 *wl);
55 int wlcore_translate_addr(struct wl1271 *wl, int addr);
58 static inline int __must_check wlcore_raw_write(struct wl1271 *wl, int addr, in wlcore_raw_write() argument
64 if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags) || in wlcore_raw_write()
65 WARN_ON((test_bit(WL1271_FLAG_IN_ELP, &wl->flags) && in wlcore_raw_write()
69 ret = wl->if_ops->write(wl->dev, addr, buf, len, fixed); in wlcore_raw_write()
70 if (ret && wl->state != WLCORE_STATE_OFF) in wlcore_raw_write()
71 set_bit(WL1271_FLAG_IO_FAILED, &wl->flags); in wlcore_raw_write()
76 static inline int __must_check wlcore_raw_read(struct wl1271 *wl, int addr, in wlcore_raw_read() argument
82 if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags) || in wlcore_raw_read()
83 WARN_ON((test_bit(WL1271_FLAG_IN_ELP, &wl->flags) && in wlcore_raw_read()
87 ret = wl->if_ops->read(wl->dev, addr, buf, len, fixed); in wlcore_raw_read()
88 if (ret && wl->state != WLCORE_STATE_OFF) in wlcore_raw_read()
89 set_bit(WL1271_FLAG_IO_FAILED, &wl->flags); in wlcore_raw_read()
94 static inline int __must_check wlcore_raw_read_data(struct wl1271 *wl, int reg, in wlcore_raw_read_data() argument
98 return wlcore_raw_read(wl, wl->rtable[reg], buf, len, fixed); in wlcore_raw_read_data()
101 static inline int __must_check wlcore_raw_write_data(struct wl1271 *wl, int reg, in wlcore_raw_write_data() argument
105 return wlcore_raw_write(wl, wl->rtable[reg], buf, len, fixed); in wlcore_raw_write_data()
108 static inline int __must_check wlcore_raw_read32(struct wl1271 *wl, int addr, in wlcore_raw_read32() argument
113 ret = wlcore_raw_read(wl, addr, wl->buffer_32, in wlcore_raw_read32()
114 sizeof(*wl->buffer_32), false); in wlcore_raw_read32()
119 *val = le32_to_cpu(*wl->buffer_32); in wlcore_raw_read32()
124 static inline int __must_check wlcore_raw_write32(struct wl1271 *wl, int addr, in wlcore_raw_write32() argument
127 *wl->buffer_32 = cpu_to_le32(val); in wlcore_raw_write32()
128 return wlcore_raw_write(wl, addr, wl->buffer_32, in wlcore_raw_write32()
129 sizeof(*wl->buffer_32), false); in wlcore_raw_write32()
132 static inline int __must_check wlcore_read(struct wl1271 *wl, int addr, in wlcore_read() argument
137 physical = wlcore_translate_addr(wl, addr); in wlcore_read()
139 return wlcore_raw_read(wl, physical, buf, len, fixed); in wlcore_read()
142 static inline int __must_check wlcore_write(struct wl1271 *wl, int addr, in wlcore_write() argument
147 physical = wlcore_translate_addr(wl, addr); in wlcore_write()
149 return wlcore_raw_write(wl, physical, buf, len, fixed); in wlcore_write()
152 static inline int __must_check wlcore_write_data(struct wl1271 *wl, int reg, in wlcore_write_data() argument
156 return wlcore_write(wl, wl->rtable[reg], buf, len, fixed); in wlcore_write_data()
159 static inline int __must_check wlcore_read_data(struct wl1271 *wl, int reg, in wlcore_read_data() argument
163 return wlcore_read(wl, wl->rtable[reg], buf, len, fixed); in wlcore_read_data()
166 static inline int __must_check wlcore_read_hwaddr(struct wl1271 *wl, int hwaddr, in wlcore_read_hwaddr() argument
174 addr = wl->ops->convert_hwaddr(wl, hwaddr); in wlcore_read_hwaddr()
176 physical = wlcore_translate_addr(wl, addr); in wlcore_read_hwaddr()
178 return wlcore_raw_read(wl, physical, buf, len, fixed); in wlcore_read_hwaddr()
181 static inline int __must_check wlcore_read32(struct wl1271 *wl, int addr, in wlcore_read32() argument
184 return wlcore_raw_read32(wl, wlcore_translate_addr(wl, addr), val); in wlcore_read32()
187 static inline int __must_check wlcore_write32(struct wl1271 *wl, int addr, in wlcore_write32() argument
190 return wlcore_raw_write32(wl, wlcore_translate_addr(wl, addr), val); in wlcore_write32()
193 static inline int __must_check wlcore_read_reg(struct wl1271 *wl, int reg, in wlcore_read_reg() argument
196 return wlcore_raw_read32(wl, in wlcore_read_reg()
197 wlcore_translate_addr(wl, wl->rtable[reg]), in wlcore_read_reg()
201 static inline int __must_check wlcore_write_reg(struct wl1271 *wl, int reg, in wlcore_write_reg() argument
204 return wlcore_raw_write32(wl, in wlcore_write_reg()
205 wlcore_translate_addr(wl, wl->rtable[reg]), in wlcore_write_reg()
209 static inline void wl1271_power_off(struct wl1271 *wl) in wl1271_power_off() argument
213 if (!test_bit(WL1271_FLAG_GPIO_POWER, &wl->flags)) in wl1271_power_off()
216 if (wl->if_ops->power) in wl1271_power_off()
217 ret = wl->if_ops->power(wl->dev, false); in wl1271_power_off()
219 clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); in wl1271_power_off()
222 static inline int wl1271_power_on(struct wl1271 *wl) in wl1271_power_on() argument
226 if (wl->if_ops->power) in wl1271_power_on()
227 ret = wl->if_ops->power(wl->dev, true); in wl1271_power_on()
229 set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); in wl1271_power_on()
234 int wlcore_set_partition(struct wl1271 *wl,
237 bool wl1271_set_block_size(struct wl1271 *wl);
241 int wl1271_tx_dummy_packet(struct wl1271 *wl);