aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_spi.h
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-12 08:08:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:05 -0400
commit746214178774bc7f9adbeaef7d43a634570eb870 (patch)
tree7a1b6e9875351b89b9abbe9a836ec8c5c805a8ee /drivers/net/wireless/wl12xx/wl1271_spi.h
parent207347e498cbe25fa2a8369edd49df43e56000be (diff)
wl1271: Remove outdated SPI functions
With the change to the new firmware, there was a change to firmware memory partitioning. Along with that change, the translation of all partitions was unified, and separate functions for reg and mem access became unnecessary. Cleanup the unnecessary functions. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_spi.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_spi.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.h b/drivers/net/wireless/wl12xx/wl1271_spi.h
index 4f1608e99c29..cb7df1c56314 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.h
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.h
@@ -85,24 +85,18 @@
85#define OCP_STATUS_RESP_ERROR 0x30000 85#define OCP_STATUS_RESP_ERROR 0x30000
86 86
87/* Raw target IO, address is not translated */ 87/* Raw target IO, address is not translated */
88void wl1271_spi_write(struct wl1271 *wl, int addr, void *buf, 88void wl1271_spi_raw_write(struct wl1271 *wl, int addr, void *buf,
89 size_t len, bool fixed); 89 size_t len, bool fixed);
90void wl1271_spi_read(struct wl1271 *wl, int addr, void *buf, 90void wl1271_spi_raw_read(struct wl1271 *wl, int addr, void *buf,
91 size_t len, bool fixed); 91 size_t len, bool fixed);
92 92
93/* Memory target IO, address is tranlated to partition 0 */ 93/* Translated target IO */
94void wl1271_spi_mem_read(struct wl1271 *wl, int addr, void *buf, size_t len); 94void wl1271_spi_read(struct wl1271 *wl, int addr, void *buf, size_t len,
95void wl1271_spi_mem_write(struct wl1271 *wl, int addr, void *buf, size_t len); 95 bool fixed);
96u32 wl1271_mem_read32(struct wl1271 *wl, int addr); 96void wl1271_spi_write(struct wl1271 *wl, int addr, void *buf, size_t len,
97void wl1271_mem_write32(struct wl1271 *wl, int addr, u32 val); 97 bool fixed);
98 98u32 wl1271_spi_read32(struct wl1271 *wl, int addr);
99/* Registers IO */ 99void wl1271_spi_write32(struct wl1271 *wl, int addr, u32 val);
100void wl1271_spi_reg_read(struct wl1271 *wl, int addr, void *buf, size_t len,
101 bool fixed);
102void wl1271_spi_reg_write(struct wl1271 *wl, int addr, void *buf, size_t len,
103 bool fixed);
104u32 wl1271_reg_read32(struct wl1271 *wl, int addr);
105void wl1271_reg_write32(struct wl1271 *wl, int addr, u32 val);
106 100
107/* Top Register IO */ 101/* Top Register IO */
108void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val); 102void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val);
@@ -114,19 +108,19 @@ void wl1271_spi_init(struct wl1271 *wl);
114int wl1271_set_partition(struct wl1271 *wl, 108int wl1271_set_partition(struct wl1271 *wl,
115 struct wl1271_partition_set *p); 109 struct wl1271_partition_set *p);
116 110
117static inline u32 wl1271_read32(struct wl1271 *wl, int addr) 111static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
118{ 112{
119 wl1271_spi_read(wl, addr, &wl->buffer_32, 113 wl1271_spi_raw_read(wl, addr, &wl->buffer_32,
120 sizeof(wl->buffer_32), false); 114 sizeof(wl->buffer_32), false);
121 115
122 return wl->buffer_32; 116 return wl->buffer_32;
123} 117}
124 118
125static inline void wl1271_write32(struct wl1271 *wl, int addr, u32 val) 119static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val)
126{ 120{
127 wl->buffer_32 = val; 121 wl->buffer_32 = val;
128 wl1271_spi_write(wl, addr, &wl->buffer_32, 122 wl1271_spi_raw_write(wl, addr, &wl->buffer_32,
129 sizeof(wl->buffer_32), false); 123 sizeof(wl->buffer_32), false);
130} 124}
131 125
132#endif /* __WL1271_SPI_H__ */ 126#endif /* __WL1271_SPI_H__ */