From patchwork Wed Apr 5 07:07:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 9663099 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBFE560352 for ; Wed, 5 Apr 2017 07:08:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB8A228509 for ; Wed, 5 Apr 2017 07:08:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C03C328526; Wed, 5 Apr 2017 07:08:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CC2628509 for ; Wed, 5 Apr 2017 07:08:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753300AbdDEHIB (ORCPT ); Wed, 5 Apr 2017 03:08:01 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:52906 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbdDEHIA (ORCPT ); Wed, 5 Apr 2017 03:08:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1491376080; x=1522912080; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KHnD5OxOv6royV+23oLkAO7Ulpe+qkYPtlQtfMFR018=; b=lm2YfMvq4J+Em+SnJgiqHKUaS50LbLZ19I+SpEP3n4+bc9bbbPYhhjtZ WcO+Z73SxB4fOtHt2Lh5MBDntKaoBHpySxVrFq7vy9WePbJq//UHgxdrD IvN2BLDvoTTgnYMwmBW/OoEYqKHJzpFZb+8Cy2HAfWAeAm54QDmzDVBPW A=; X-IronPort-AV: E=Sophos;i="5.36,277,1486454400"; d="scan'208";a="371494221" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by wolverine02.qualcomm.com with ESMTP; 05 Apr 2017 00:08:00 -0700 X-IronPort-AV: E=McAfee;i="5800,7501,8488"; a="1345450244" X-MGA-submission: =?us-ascii?q?MDFBEZBr+PYOveOnMfBplwTi+QQOQbtCv6b5zc?= =?us-ascii?q?nNWMnq5x/CHiYP5jSebtlRvd+TPxstE2dG4w43I9oXuGyQAZALFQK1hx?= =?us-ascii?q?4wopWDI2/RTrguFePFp0J5RseTUoUSqhR7qGJu7B7aa4zSF/eXP81lIW?= =?us-ascii?q?Sv?= Received: from nasanexm02b.na.qualcomm.com ([10.85.0.42]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 05 Apr 2017 00:08:00 -0700 Received: from euamsexm01a.eu.qualcomm.com (10.251.127.40) by nasanexm02b.na.qualcomm.com (10.85.0.42) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 5 Apr 2017 00:07:59 -0700 Received: from potku.adurom.net (10.80.80.8) by euamsexm01a.eu.qualcomm.com (10.251.127.40) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 5 Apr 2017 09:07:54 +0200 Subject: [PATCH 7/7] ath10k: remove unused sdio wrappers From: Kalle Valo To: CC: Date: Wed, 5 Apr 2017 10:07:49 +0300 Message-ID: <149137606916.4898.873080560482504845.stgit@potku.adurom.net> In-Reply-To: <149137591893.4898.2318291094351440261.stgit@potku.adurom.net> References: <149137591893.4898.2318291094351440261.stgit@potku.adurom.net> User-Agent: StGit/0.17.1-17-ge4e0 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) To euamsexm01a.eu.qualcomm.com (10.251.127.40) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Kalle Valo --- 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;