diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-08-07 06:33:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:37 -0400 |
commit | 0d77e141331b25adf190ce30d69fe5744a69c5bd (patch) | |
tree | 1e62aa4ab8d08c0653443e2bf086ea55f04a8441 /drivers/net/wireless/wl12xx/wl1251_io.h | |
parent | 08d9f57251841e4870cfd286e867ffcbef81d9a4 (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.h | 15 |
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 @@ | |||
23 | 23 | ||
24 | #include "wl1251.h" | 24 | #include "wl1251.h" |
25 | 25 | ||
26 | #define HW_ACCESS_MEMORY_MAX_RANGE 0x1FFC0 | ||
27 | |||
28 | #define HW_ACCESS_PART0_SIZE_ADDR 0x1FFC0 | ||
29 | #define HW_ACCESS_PART0_START_ADDR 0x1FFC4 | ||
30 | #define HW_ACCESS_PART1_SIZE_ADDR 0x1FFC8 | ||
31 | #define HW_ACCESS_PART1_START_ADDR 0x1FFCC | ||
32 | |||
33 | #define HW_ACCESS_REGISTER_SIZE 4 | ||
34 | |||
35 | #define HW_ACCESS_PRAM_MAX_RANGE 0x3c000 | ||
36 | |||
26 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) | 37 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) |
27 | { | 38 | { |
28 | u32 response; | 39 | u32 response; |
@@ -46,4 +57,8 @@ void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val); | |||
46 | u32 wl1251_reg_read32(struct wl1251 *wl, int addr); | 57 | u32 wl1251_reg_read32(struct wl1251 *wl, int addr); |
47 | void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val); | 58 | void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val); |
48 | 59 | ||
60 | void wl1251_set_partition(struct wl1251 *wl, | ||
61 | u32 part_start, u32 part_size, | ||
62 | u32 reg_start, u32 reg_size); | ||
63 | |||
49 | #endif | 64 | #endif |