diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-08-07 06:32:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:36 -0400 |
commit | 0764de64c8628f653c7e8493017d6bd8d43f4e3b (patch) | |
tree | 31a9f7ed97caf521e37166c79d3a39fbad920941 /drivers/net/wireless/wl12xx/wl1251_spi.h | |
parent | b8010790c480f495520fd458197f86d758f0c83a (diff) |
wl1251: separate bus i/o code into io.c
In order to eventually support wl1251 spi and sdio interfaces, move
the register and memory transfer functions to a common file. Also
rename wl1251_spi_mem_{read,write} to indicate its common usage.
We still use spi_read internally until SDIO interface is introduced
so nothing functional should change here.
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_spi.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_spi.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.h b/drivers/net/wireless/wl12xx/wl1251_spi.h index 70763528db27..ca9a85118ec5 100644 --- a/drivers/net/wireless/wl12xx/wl1251_spi.h +++ b/drivers/net/wireless/wl12xx/wl1251_spi.h | |||
@@ -69,23 +69,6 @@ | |||
69 | ((WL1251_BUSY_WORD_LEN - 4) / sizeof(u32)) | 69 | ((WL1251_BUSY_WORD_LEN - 4) / sizeof(u32)) |
70 | #define HW_ACCESS_WSPI_INIT_CMD_MASK 0 | 70 | #define HW_ACCESS_WSPI_INIT_CMD_MASK 0 |
71 | 71 | ||
72 | |||
73 | /* Raw target IO, address is not translated */ | ||
74 | void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
75 | void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
76 | |||
77 | /* Memory target IO, address is tranlated to partition 0 */ | ||
78 | void wl1251_spi_mem_read(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
79 | void wl1251_spi_mem_write(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
80 | u32 wl1251_mem_read32(struct wl1251 *wl, int addr); | ||
81 | void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val); | ||
82 | |||
83 | /* Registers IO */ | ||
84 | void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
85 | void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len); | ||
86 | u32 wl1251_reg_read32(struct wl1251 *wl, int addr); | ||
87 | void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val); | ||
88 | |||
89 | /* INIT and RESET words */ | 72 | /* INIT and RESET words */ |
90 | void wl1251_spi_reset(struct wl1251 *wl); | 73 | void wl1251_spi_reset(struct wl1251 *wl); |
91 | void wl1251_spi_init(struct wl1251 *wl); | 74 | void wl1251_spi_init(struct wl1251 *wl); |
@@ -93,17 +76,4 @@ int wl1251_set_partition(struct wl1251 *wl, | |||
93 | u32 part_start, u32 part_size, | 76 | u32 part_start, u32 part_size, |
94 | u32 reg_start, u32 reg_size); | 77 | u32 reg_start, u32 reg_size); |
95 | 78 | ||
96 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) | ||
97 | { | ||
98 | wl1251_spi_read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32)); | ||
99 | |||
100 | return wl->buffer_32; | ||
101 | } | ||
102 | |||
103 | static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val) | ||
104 | { | ||
105 | wl->buffer_32 = val; | ||
106 | wl1251_spi_write(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32)); | ||
107 | } | ||
108 | |||
109 | #endif /* __WL1251_SPI_H__ */ | 79 | #endif /* __WL1251_SPI_H__ */ |