From: Kalle Valo <kalle.valo@iki.fi>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-wireless@vger.kernel.org
Subject: [RFC PATCH v2 1/8] wl1251: remove fixed address support from spi commands
Date: Fri, 17 Jul 2009 21:47:48 +0300 [thread overview]
Message-ID: <20090717184747.25883.59949.stgit@tikku> (raw)
In-Reply-To: <20090717184643.25883.95065.stgit@tikku>
From: Kalle Valo <kalle.valo@nokia.com>
The fixed addresses are not used in wl1251, only in wl1271. So it can
be safely removed.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
---
drivers/net/wireless/wl12xx/wl1251_spi.c | 26 ++++++++------------------
drivers/net/wireless/wl12xx/wl1251_spi.h | 18 ++++++------------
2 files changed, 14 insertions(+), 30 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.c b/drivers/net/wireless/wl12xx/wl1251_spi.c
index c5da79d..c2b813f 100644
--- a/drivers/net/wireless/wl12xx/wl1251_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1251_spi.c
@@ -255,8 +255,7 @@ int wl1251_set_partition(struct wl1251 *wl,
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;
@@ -271,9 +270,6 @@ void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf,
*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));
@@ -298,8 +294,7 @@ void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf,
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;
@@ -312,9 +307,6 @@ void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf,
*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));
@@ -339,7 +331,7 @@ void wl1251_spi_mem_read(struct wl1251 *wl, int addr, void *buf,
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,
@@ -349,27 +341,25 @@ 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)
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.h b/drivers/net/wireless/wl12xx/wl1251_spi.h
index 6e8daf4..7076352 100644
--- a/drivers/net/wireless/wl12xx/wl1251_spi.h
+++ b/drivers/net/wireless/wl12xx/wl1251_spi.h
@@ -71,10 +71,8 @@
/* 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);
@@ -83,10 +81,8 @@ u32 wl1251_mem_read32(struct wl1251 *wl, int addr);
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);
@@ -99,8 +95,7 @@ int wl1251_set_partition(struct wl1251 *wl,
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;
}
@@ -108,8 +103,7 @@ static inline u32 wl1251_read32(struct wl1251 *wl, int addr)
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__ */
next prev parent reply other threads:[~2009-07-17 18:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 18:47 [RFC PATCH v2 0/8] wl1251 sdio interface Kalle Valo
2009-07-17 18:47 ` Kalle Valo [this message]
2009-07-17 18:47 ` [RFC PATCH v2 2/8] wl1251: separate bus i/o code into io.c Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 3/8] wl1251: use wiphy_dev instead of wl->spi->dev Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 4/8] wl1251: introduce wl1251_if_operations struct Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 5/8] wl1251: make wl1251_set_partition bus agnostic Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 6/8] wl1251: move module probe methods into spi.c Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 7/8] wl1251: split spi interface into separate module Kalle Valo
2009-07-17 18:48 ` [RFC PATCH v2 8/8] wl1251: add sdio support Kalle Valo
2009-07-17 19:04 ` [RFC PATCH v2 0/8] wl1251 sdio interface Kalle Valo
2009-07-17 19:20 ` Bob Copeland
2009-07-18 5:32 ` Bob Copeland
2009-07-19 13:03 ` Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090717184747.25883.59949.stgit@tikku \
--to=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=me@bobcopeland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).