return 0;
}
-void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf,
- size_t len, bool fixed)
+void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, size_t len)
{
struct spi_transfer t[3];
struct spi_message m;
*cmd |= (len << WSPI_CMD_BYTE_LENGTH_OFFSET) & WSPI_CMD_BYTE_LENGTH;
*cmd |= addr & WSPI_CMD_BYTE_ADDR;
- if (fixed)
- *cmd |= WSPI_CMD_FIXED;
-
spi_message_init(&m);
memset(t, 0, sizeof(t));
wl1251_dump(DEBUG_SPI, "spi_read buf <- ", buf, len);
}
-void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf,
- size_t len, bool fixed)
+void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, size_t len)
{
struct spi_transfer t[2];
struct spi_message m;
*cmd |= (len << WSPI_CMD_BYTE_LENGTH_OFFSET) & WSPI_CMD_BYTE_LENGTH;
*cmd |= addr & WSPI_CMD_BYTE_ADDR;
- if (fixed)
- *cmd |= WSPI_CMD_FIXED;
-
spi_message_init(&m);
memset(t, 0, sizeof(t));
physical = wl1251_translate_mem_addr(wl, addr);
- wl1251_spi_read(wl, physical, buf, len, false);
+ wl1251_spi_read(wl, physical, buf, len);
}
void wl1251_spi_mem_write(struct wl1251 *wl, int addr, void *buf,
physical = wl1251_translate_mem_addr(wl, addr);
- wl1251_spi_write(wl, physical, buf, len, false);
+ wl1251_spi_write(wl, physical, buf, len);
}
-void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len,
- bool fixed)
+void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len)
{
int physical;
physical = wl1251_translate_reg_addr(wl, addr);
- wl1251_spi_read(wl, physical, buf, len, fixed);
+ wl1251_spi_read(wl, physical, buf, len);
}
-void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len,
- bool fixed)
+void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len)
{
int physical;
physical = wl1251_translate_reg_addr(wl, addr);
- wl1251_spi_write(wl, physical, buf, len, fixed);
+ wl1251_spi_write(wl, physical, buf, len);
}
u32 wl1251_mem_read32(struct wl1251 *wl, int addr)
/* Raw target IO, address is not translated */
-void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf,
- size_t len, bool fixed);
-void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf,
- size_t len, bool fixed);
+void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, size_t len);
+void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, size_t len);
/* Memory target IO, address is tranlated to partition 0 */
void wl1251_spi_mem_read(struct wl1251 *wl, int addr, void *buf, size_t len);
void wl1251_mem_write32(struct wl1251 *wl, int addr, u32 val);
/* Registers IO */
-void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len,
- bool fixed);
-void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len,
- bool fixed);
+void wl1251_spi_reg_read(struct wl1251 *wl, int addr, void *buf, size_t len);
+void wl1251_spi_reg_write(struct wl1251 *wl, int addr, void *buf, size_t len);
u32 wl1251_reg_read32(struct wl1251 *wl, int addr);
void wl1251_reg_write32(struct wl1251 *wl, int addr, u32 val);
static inline u32 wl1251_read32(struct wl1251 *wl, int addr)
{
- wl1251_spi_read(wl, addr, &wl->buffer_32,
- sizeof(wl->buffer_32), false);
+ wl1251_spi_read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
return wl->buffer_32;
}
static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val)
{
wl->buffer_32 = val;
- wl1251_spi_write(wl, addr, &wl->buffer_32,
- sizeof(wl->buffer_32), false);
+ wl1251_spi_write(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
}
#endif /* __WL1251_SPI_H__ */