aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_io.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-07 06:33:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:37 -0400
commit08d9f57251841e4870cfd286e867ffcbef81d9a4 (patch)
tree98cff0725677bd4126b9e4fb0a095fe1be83741e /drivers/net/wireless/wl12xx/wl1251_io.h
parent6c766f413c81d5a11588552934fa093eab6ae06e (diff)
wl1251: introduce wl1251_if_operations struct
Introduce an ops struct with read, write, and reset functions to abstract away the details of the wl1251 bus interface. Doing this will allow SDIO to coexist with SPI by supplying its own I/O routines. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_io.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_io.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_io.h b/drivers/net/wireless/wl12xx/wl1251_io.h
index e2bb9546fa6..1fa2ab18a9e 100644
--- a/drivers/net/wireless/wl12xx/wl1251_io.h
+++ b/drivers/net/wireless/wl12xx/wl1251_io.h
@@ -22,24 +22,19 @@
22#define __WL1251_IO_H__ 22#define __WL1251_IO_H__
23 23
24#include "wl1251.h" 24#include "wl1251.h"
25#include "wl1251_spi.h"
26
27/* Raw target IO, address is not translated */
28void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, size_t len);
29void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, size_t len);
30 25
31static inline u32 wl1251_read32(struct wl1251 *wl, int addr) 26static inline u32 wl1251_read32(struct wl1251 *wl, int addr)
32{ 27{
33 u32 response; 28 u32 response;
34 29
35 wl1251_spi_read(wl, addr, &response, sizeof(u32)); 30 wl->if_ops->read(wl, addr, &response, sizeof(u32));
36 31
37 return response; 32 return response;
38} 33}
39 34
40static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val) 35static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val)
41{ 36{
42 wl1251_spi_write(wl, addr, &val, sizeof(u32)); 37 wl->if_ops->write(wl, addr, &val, sizeof(u32));
43} 38}
44 39
45/* Memory target IO, address is translated to partition 0 */ 40/* Memory target IO, address is translated to partition 0 */