From: Kalle Valo <kvalo@qca.qualcomm.com> To: <ath10k@lists.infradead.org> Cc: <linux-wireless@vger.kernel.org> Subject: [PATCH 7/7] ath10k: remove unused sdio wrappers Date: Wed, 5 Apr 2017 10:07:49 +0300 [thread overview] Message-ID: <149137606916.4898.873080560482504845.stgit@potku.adurom.net> (raw) In-Reply-To: <149137591893.4898.2318291094351440261.stgit@potku.adurom.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> --- drivers/net/wireless/ath/ath10k/sdio.c | 44 -------------------------------- drivers/net/wireless/ath/ath10k/sdio.h | 35 ------------------------- 2 files changed, 79 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 8ea1629c7bae..a5ed4282b3b3 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -219,50 +219,6 @@ static int ath10k_sdio_config(struct ath10k *ar) return ret; } -static int ath10k_sdio_io(struct ath10k *ar, u32 request, u32 addr, - u8 *buf, u32 len) -{ - struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); - struct sdio_func *func = ar_sdio->func; - int ret; - - sdio_claim_host(func); - - if (request & HIF_WRITE) { - if (request & HIF_FIXED_ADDRESS) - ret = sdio_writesb(func, addr, buf, len); - else - ret = sdio_memcpy_toio(func, addr, buf, len); - } else { - if (request & HIF_FIXED_ADDRESS) - ret = sdio_readsb(func, buf, addr, len); - else - ret = sdio_memcpy_fromio(func, buf, addr, len); - } - - sdio_release_host(func); - - ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio %s addr 0x%x%s buf 0x%p len %d\n", - request & HIF_WRITE ? "wr" : "rd", addr, - request & HIF_FIXED_ADDRESS ? " (fixed)" : "", buf, len); - ath10k_dbg_dump(ar, ATH10K_DBG_SDIO_DUMP, NULL, - request & HIF_WRITE ? "sdio wr " : "sdio rd ", - buf, len); - - return ret; -} - -static int ath10k_sdio_read_write_sync(struct ath10k *ar, u32 addr, u8 *buf, - u32 len, u32 request) -{ - struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); - - if (request & HIF_BLOCK_BASIS) - len = round_down(len, ar_sdio->mbox_info.block_size); - - return ath10k_sdio_io(ar, request, addr, buf, len); -} - static int ath10k_sdio_write32(struct ath10k *ar, u32 addr, u32 val) { struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); diff --git a/drivers/net/wireless/ath/ath10k/sdio.h b/drivers/net/wireless/ath/ath10k/sdio.h index 1bce56447e53..62d2699123ec 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.h +++ b/drivers/net/wireless/ath/ath10k/sdio.h @@ -136,41 +136,6 @@ struct ath10k_sdio_rx_data { int status; }; -/* direction of transfer (read/write) */ -#define HIF_READ 0x00000001 -#define HIF_WRITE 0x00000002 - -/* dmode - An interface may support different kinds of commands based on - * the tradeoff between the amount of data it can carry and the - * setup time. Byte and Block modes are supported (HIF_BYTE_BASIS/ - * HIF_BLOCK_BASIS). In case of latter, the data is rounded off - * to the nearest block size by padding. The size of the block is - * configurable at compile time using the HIF_BLOCK_SIZE and is - * negotiated with the target during initialization after the - * ATH10K interrupts are enabled. - */ -#define HIF_BYTE_BASIS 0x00000040 -#define HIF_BLOCK_BASIS 0x00000080 - -/* amode - This indicates if the address has to be incremented on ATH10K - * after every read/write operation (HIF?FIXED_ADDRESS/ - * HIF_INCREMENTAL_ADDRESS). - */ -#define HIF_FIXED_ADDRESS 0x00000100 -#define HIF_INCREMENTAL_ADDRESS 0x00000200 - -#define HIF_WR_SYNC_BYTE_FIX \ - (HIF_WRITE | HIF_BYTE_BASIS | HIF_FIXED_ADDRESS) - -#define HIF_WR_SYNC_BYTE_INC \ - (HIF_WRITE | HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS) - -#define HIF_RD_SYNC_BYTE_INC \ - (HIF_READ | HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS) - -#define HIF_RD_SYNC_BLOCK_FIX \ - (HIF_READ | HIF_BLOCK_BASIS | HIF_FIXED_ADDRESS) - struct ath10k_sdio_irq_proc_regs { u8 host_int_status; u8 cpu_int_status;
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com> To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH 7/7] ath10k: remove unused sdio wrappers Date: Wed, 5 Apr 2017 10:07:49 +0300 [thread overview] Message-ID: <149137606916.4898.873080560482504845.stgit@potku.adurom.net> (raw) In-Reply-To: <149137591893.4898.2318291094351440261.stgit@potku.adurom.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> --- drivers/net/wireless/ath/ath10k/sdio.c | 44 -------------------------------- drivers/net/wireless/ath/ath10k/sdio.h | 35 ------------------------- 2 files changed, 79 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 8ea1629c7bae..a5ed4282b3b3 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -219,50 +219,6 @@ static int ath10k_sdio_config(struct ath10k *ar) return ret; } -static int ath10k_sdio_io(struct ath10k *ar, u32 request, u32 addr, - u8 *buf, u32 len) -{ - struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); - struct sdio_func *func = ar_sdio->func; - int ret; - - sdio_claim_host(func); - - if (request & HIF_WRITE) { - if (request & HIF_FIXED_ADDRESS) - ret = sdio_writesb(func, addr, buf, len); - else - ret = sdio_memcpy_toio(func, addr, buf, len); - } else { - if (request & HIF_FIXED_ADDRESS) - ret = sdio_readsb(func, buf, addr, len); - else - ret = sdio_memcpy_fromio(func, buf, addr, len); - } - - sdio_release_host(func); - - ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio %s addr 0x%x%s buf 0x%p len %d\n", - request & HIF_WRITE ? "wr" : "rd", addr, - request & HIF_FIXED_ADDRESS ? " (fixed)" : "", buf, len); - ath10k_dbg_dump(ar, ATH10K_DBG_SDIO_DUMP, NULL, - request & HIF_WRITE ? "sdio wr " : "sdio rd ", - buf, len); - - return ret; -} - -static int ath10k_sdio_read_write_sync(struct ath10k *ar, u32 addr, u8 *buf, - u32 len, u32 request) -{ - struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); - - if (request & HIF_BLOCK_BASIS) - len = round_down(len, ar_sdio->mbox_info.block_size); - - return ath10k_sdio_io(ar, request, addr, buf, len); -} - static int ath10k_sdio_write32(struct ath10k *ar, u32 addr, u32 val) { struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); diff --git a/drivers/net/wireless/ath/ath10k/sdio.h b/drivers/net/wireless/ath/ath10k/sdio.h index 1bce56447e53..62d2699123ec 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.h +++ b/drivers/net/wireless/ath/ath10k/sdio.h @@ -136,41 +136,6 @@ struct ath10k_sdio_rx_data { int status; }; -/* direction of transfer (read/write) */ -#define HIF_READ 0x00000001 -#define HIF_WRITE 0x00000002 - -/* dmode - An interface may support different kinds of commands based on - * the tradeoff between the amount of data it can carry and the - * setup time. Byte and Block modes are supported (HIF_BYTE_BASIS/ - * HIF_BLOCK_BASIS). In case of latter, the data is rounded off - * to the nearest block size by padding. The size of the block is - * configurable at compile time using the HIF_BLOCK_SIZE and is - * negotiated with the target during initialization after the - * ATH10K interrupts are enabled. - */ -#define HIF_BYTE_BASIS 0x00000040 -#define HIF_BLOCK_BASIS 0x00000080 - -/* amode - This indicates if the address has to be incremented on ATH10K - * after every read/write operation (HIF?FIXED_ADDRESS/ - * HIF_INCREMENTAL_ADDRESS). - */ -#define HIF_FIXED_ADDRESS 0x00000100 -#define HIF_INCREMENTAL_ADDRESS 0x00000200 - -#define HIF_WR_SYNC_BYTE_FIX \ - (HIF_WRITE | HIF_BYTE_BASIS | HIF_FIXED_ADDRESS) - -#define HIF_WR_SYNC_BYTE_INC \ - (HIF_WRITE | HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS) - -#define HIF_RD_SYNC_BYTE_INC \ - (HIF_READ | HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS) - -#define HIF_RD_SYNC_BLOCK_FIX \ - (HIF_READ | HIF_BLOCK_BASIS | HIF_FIXED_ADDRESS) - struct ath10k_sdio_irq_proc_regs { u8 host_int_status; u8 cpu_int_status; _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2017-04-05 7:08 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-05 7:06 [PATCH 0/7] ath10k: remove ath10k_sdio_io() Kalle Valo 2017-04-05 7:06 ` Kalle Valo 2017-04-05 7:06 ` [PATCH 1/7] ath10k: add ath10k_sdio_write32/read32() Kalle Valo 2017-04-05 7:06 ` [PATCH 2/7] ath10k: add ath10k_sdio_writesb() Kalle Valo 2017-04-05 7:06 ` Kalle Valo 2017-04-05 7:06 ` [PATCH 3/7] ath10k: add ath10k_sdio_read() Kalle Valo 2017-04-05 7:06 ` Kalle Valo 2017-04-05 7:07 ` [PATCH 4/7] ath10k: add ath10k_sdio_write() Kalle Valo 2017-04-05 7:07 ` Kalle Valo 2017-04-05 7:07 ` [PATCH 5/7] ath10k: add ath10k_sdio_readsb() Kalle Valo 2017-04-05 7:07 ` Kalle Valo 2017-04-05 7:07 ` [PATCH 6/7] ath10k: convert __ath10k_sdio_write_async() to use ath10k_sdio_write() Kalle Valo 2017-04-05 7:07 ` Kalle Valo 2017-04-05 7:07 ` Kalle Valo [this message] 2017-04-05 7:07 ` [PATCH 7/7] ath10k: remove unused sdio wrappers Kalle Valo 2017-04-05 16:08 ` [PATCH 0/7] ath10k: remove ath10k_sdio_io() Erik Stromdahl 2017-04-05 16:08 ` Erik Stromdahl 2017-04-05 16:53 ` Kalle Valo 2017-04-05 16:53 ` Kalle Valo 2017-04-05 17:14 ` Erik Stromdahl 2017-04-05 17:14 ` Erik Stromdahl 2017-04-09 18:04 ` Erik Stromdahl 2017-04-09 18:04 ` Erik Stromdahl
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=149137606916.4898.873080560482504845.stgit@potku.adurom.net \ --to=kvalo@qca.qualcomm.com \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.