diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_spi.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_spi.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.h b/drivers/net/wireless/wl12xx/wl1251_spi.h index 82b009c3e9e..6e8daf4e108 100644 --- a/drivers/net/wireless/wl12xx/wl1251_spi.h +++ b/drivers/net/wireless/wl12xx/wl1251_spi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of wl12xx | 2 | * This file is part of wl1251 |
3 | * | 3 | * |
4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated | 4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated |
5 | * Copyright (C) 2008 Nokia Corporation | 5 | * Copyright (C) 2008 Nokia Corporation |
@@ -22,8 +22,8 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef __WL12XX_SPI_H__ | 25 | #ifndef __WL1251_SPI_H__ |
26 | #define __WL12XX_SPI_H__ | 26 | #define __WL1251_SPI_H__ |
27 | 27 | ||
28 | #include "wl1251_cmd.h" | 28 | #include "wl1251_cmd.h" |
29 | #include "wl1251_acx.h" | 29 | #include "wl1251_acx.h" |
@@ -66,50 +66,50 @@ | |||
66 | #define WSPI_INIT_CMD_LEN 8 | 66 | #define WSPI_INIT_CMD_LEN 8 |
67 | 67 | ||
68 | #define HW_ACCESS_WSPI_FIXED_BUSY_LEN \ | 68 | #define HW_ACCESS_WSPI_FIXED_BUSY_LEN \ |
69 | ((WL12XX_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 | 72 | ||
73 | /* Raw target IO, address is not translated */ | 73 | /* Raw target IO, address is not translated */ |
74 | void wl12xx_spi_write(struct wl12xx *wl, int addr, void *buf, | 74 | void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, |
75 | size_t len, bool fixed); | 75 | size_t len, bool fixed); |
76 | void wl12xx_spi_read(struct wl12xx *wl, int addr, void *buf, | 76 | void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, |
77 | size_t len, bool fixed); | 77 | size_t len, bool fixed); |
78 | 78 | ||
79 | /* Memory target IO, address is tranlated to partition 0 */ | 79 | /* Memory target IO, address is tranlated to partition 0 */ |
80 | void wl12xx_spi_mem_read(struct wl12xx *wl, int addr, void *buf, size_t len); | 80 | void wl1251_spi_mem_read(struct wl1251 *wl, int addr, void *buf, size_t len); |
81 | void wl12xx_spi_mem_write(struct wl12xx *wl, int addr, void *buf, size_t len); | 81 | void wl1251_spi_mem_write(struct wl1251 *wl, int addr, void *buf, size_t len); |
82 | u32 wl12xx_mem_read32(struct wl12xx *wl, int addr); | 82 | u32 wl1251_mem_read32(struct wl1251 *wl, int addr); |
83 | void wl12xx_mem_write32(struct wl12xx *wl, int addr, u32 val); | 83 | void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val); |
84 | 84 | ||
85 | /* Registers IO */ | 85 | /* Registers IO */ |
86 | void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len, | 86 | void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len, |
87 | bool fixed); | 87 | bool fixed); |
88 | void wl12xx_spi_reg_write(struct wl12xx *wl, int addr, void *buf, size_t len, | 88 | void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len, |
89 | bool fixed); | 89 | bool fixed); |
90 | u32 wl12xx_reg_read32(struct wl12xx *wl, int addr); | 90 | u32 wl1251_reg_read32(struct wl1251 *wl, int addr); |
91 | void wl12xx_reg_write32(struct wl12xx *wl, int addr, u32 val); | 91 | void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val); |
92 | 92 | ||
93 | /* INIT and RESET words */ | 93 | /* INIT and RESET words */ |
94 | void wl12xx_spi_reset(struct wl12xx *wl); | 94 | void wl1251_spi_reset(struct wl1251 *wl); |
95 | void wl12xx_spi_init(struct wl12xx *wl); | 95 | void wl1251_spi_init(struct wl1251 *wl); |
96 | int wl12xx_set_partition(struct wl12xx *wl, | 96 | int wl1251_set_partition(struct wl1251 *wl, |
97 | u32 part_start, u32 part_size, | 97 | u32 part_start, u32 part_size, |
98 | u32 reg_start, u32 reg_size); | 98 | u32 reg_start, u32 reg_size); |
99 | 99 | ||
100 | static inline u32 wl12xx_read32(struct wl12xx *wl, int addr) | 100 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) |
101 | { | 101 | { |
102 | wl12xx_spi_read(wl, addr, &wl->buffer_32, | 102 | wl1251_spi_read(wl, addr, &wl->buffer_32, |
103 | sizeof(wl->buffer_32), false); | 103 | sizeof(wl->buffer_32), false); |
104 | 104 | ||
105 | return wl->buffer_32; | 105 | return wl->buffer_32; |
106 | } | 106 | } |
107 | 107 | ||
108 | static inline void wl12xx_write32(struct wl12xx *wl, int addr, u32 val) | 108 | static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val) |
109 | { | 109 | { |
110 | wl->buffer_32 = val; | 110 | wl->buffer_32 = val; |
111 | wl12xx_spi_write(wl, addr, &wl->buffer_32, | 111 | wl1251_spi_write(wl, addr, &wl->buffer_32, |
112 | sizeof(wl->buffer_32), false); | 112 | sizeof(wl->buffer_32), false); |
113 | } | 113 | } |
114 | 114 | ||
115 | #endif /* __WL12XX_SPI_H__ */ | 115 | #endif /* __WL1251_SPI_H__ */ |