aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_spi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_spi.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_spi.h44
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 */
74void wl12xx_spi_write(struct wl12xx *wl, int addr, void *buf, 74void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf,
75 size_t len, bool fixed); 75 size_t len, bool fixed);
76void wl12xx_spi_read(struct wl12xx *wl, int addr, void *buf, 76void 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 */
80void wl12xx_spi_mem_read(struct wl12xx *wl, int addr, void *buf, size_t len); 80void wl1251_spi_mem_read(struct wl1251 *wl, int addr, void *buf, size_t len);
81void wl12xx_spi_mem_write(struct wl12xx *wl, int addr, void *buf, size_t len); 81void wl1251_spi_mem_write(struct wl1251 *wl, int addr, void *buf, size_t len);
82u32 wl12xx_mem_read32(struct wl12xx *wl, int addr); 82u32 wl1251_mem_read32(struct wl1251 *wl, int addr);
83void wl12xx_mem_write32(struct wl12xx *wl, int addr, u32 val); 83void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val);
84 84
85/* Registers IO */ 85/* Registers IO */
86void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len, 86void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len,
87 bool fixed); 87 bool fixed);
88void wl12xx_spi_reg_write(struct wl12xx *wl, int addr, void *buf, size_t len, 88void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len,
89 bool fixed); 89 bool fixed);
90u32 wl12xx_reg_read32(struct wl12xx *wl, int addr); 90u32 wl1251_reg_read32(struct wl1251 *wl, int addr);
91void wl12xx_reg_write32(struct wl12xx *wl, int addr, u32 val); 91void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val);
92 92
93/* INIT and RESET words */ 93/* INIT and RESET words */
94void wl12xx_spi_reset(struct wl12xx *wl); 94void wl1251_spi_reset(struct wl1251 *wl);
95void wl12xx_spi_init(struct wl12xx *wl); 95void wl1251_spi_init(struct wl1251 *wl);
96int wl12xx_set_partition(struct wl12xx *wl, 96int 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
100static inline u32 wl12xx_read32(struct wl12xx *wl, int addr) 100static 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
108static inline void wl12xx_write32(struct wl12xx *wl, int addr, u32 val) 108static 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__ */