summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_io.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-07 13:33:18 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:37 -0400
commit0d77e141331b25adf190ce30d69fe5744a69c5bd (patch)
tree1e62aa4ab8d08c0653443e2bf086ea55f04a8441 /drivers/net/wireless/wl12xx/wl1251_io.h
parent08d9f57251841e4870cfd286e867ffcbef81d9a4 (diff)
wl1251: make wl1251_set_partition bus agnostic
The same partition setting code can be used for both SPI and SDIO modes, if we remove the spi-specific commands and use the more generic buffer write routines. Do that and move it to io.c since it deals with register/memory address offsets. 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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_io.h b/drivers/net/wireless/wl12xx/wl1251_io.h
index 1fa2ab18a9e..b89d2ac62ef 100644
--- a/drivers/net/wireless/wl12xx/wl1251_io.h
+++ b/drivers/net/wireless/wl12xx/wl1251_io.h
@@ -23,6 +23,17 @@
#include "wl1251.h"
+#define HW_ACCESS_MEMORY_MAX_RANGE 0x1FFC0
+
+#define HW_ACCESS_PART0_SIZE_ADDR 0x1FFC0
+#define HW_ACCESS_PART0_START_ADDR 0x1FFC4
+#define HW_ACCESS_PART1_SIZE_ADDR 0x1FFC8
+#define HW_ACCESS_PART1_START_ADDR 0x1FFCC
+
+#define HW_ACCESS_REGISTER_SIZE 4
+
+#define HW_ACCESS_PRAM_MAX_RANGE 0x3c000
+
static inline u32 wl1251_read32(struct wl1251 *wl, int addr)
{
u32 response;
@@ -46,4 +57,8 @@ void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val);
u32 wl1251_reg_read32(struct wl1251 *wl, int addr);
void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val);
+void wl1251_set_partition(struct wl1251 *wl,
+ u32 part_start, u32 part_size,
+ u32 reg_start, u32 reg_size);
+
#endif