From patchwork Tue Nov 10 23:42:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7592721 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4D2509F392 for ; Tue, 10 Nov 2015 23:43:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65B12205F9 for ; Tue, 10 Nov 2015 23:43:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DBB920601 for ; Tue, 10 Nov 2015 23:43:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbbKJXnp (ORCPT ); Tue, 10 Nov 2015 18:43:45 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:56929 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752150AbbKJXnC (ORCPT ); Tue, 10 Nov 2015 18:43:02 -0500 Received: from wuerfel.lan. ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0M9eBT-1a8Afv3cqN-00CyOm; Wed, 11 Nov 2015 00:42:56 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Johnny Kim , Austin Shin , Chris Park , Tony Cho , Glen Lee , Leo Kim , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 17/20] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros Date: Wed, 11 Nov 2015 00:42:37 +0100 Message-Id: <1447198960-2760143-18-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1447198960-2760143-1-git-send-email-arnd@arndb.de> References: <1447198960-2760143-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:QRsMudV/VpLTvwnWhAJ1AlfJDL3YJdrNHfSn60KlYTbFbgxprA4 2k854+IhDK6InyuB//AGK9BnGEpp0GwwgE5RpZkSDJzO2671CnqcNZMgKxCTMLRYEdkBs+F gPg8UnKIPve1G22vL6NhlfHYCp3b21DwV7QN1gUPZvE4XaJ6tAG9wjlZvm6pqNGnmeuzWnY UOM5NyRr6b7gz6pGa1z+Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:MsY/KzgvokU=:sXL0cLSyvtpoXZNDoBRKfY dhxyZzRLPrm3zkp3Qt6pLdfdVkF1/cVf81dtzz3uf0mFSVUrMwauiwZahPZIJyBkAZMcc82sf caylaov6WWsvGiYNnL7j6TXftBjC1lnEHK5PPVwrBm9Q1CdvQDe4D7SIyus0KssDPaWEV+PdL xd6kxhnCGoXLahLrmqx3F1cGydiIN5VhjyWVeLmc79RCByrwvqEYEbQe/IwDA7sJUjrArSkV3 NDZZW/Zvbe+tUF0luuBlljOnT3UcKT/AANHigsmf4Wo2ha/V0O/rZ4/Uz4DwRp8vuLtwT+3KL LeqYk0sXRDELXe5O/mORgr1h3EpysyHrV6SDL/AaU9S5usarU68BLwHM2DckNPDzcd1rGdOKA uPP/+5OFGbx9gv219z0QHuZicwd8twMUFC0fHKvbNywv3tP29T+2OmbNObObDseTQq8+vrXSd viOM5Z+6M84rzurrqhhzdPPw7sRiNnvvXKFUPweldyC1WFuxaAmML/qT3fbsfZrCdeTkbV7X0 ipkgSOeZKs2FUYyq/hWJDlbkh9nYDAzBM7G8rrDCRCB52kvOhwVezVS7H9OLdWwChgbBex/Zs 8c1bhNEHX0MdCZP+UVkzEY4BXqDcRTFp1X2XOz9KoctBJP4if0cgAqonQuCUx/KNqVp+m4036 kiSjEruw7jalSLlO7cYjgR+uK8PtRljdAj8e4EGwZYQuf8/+iVsUxbgzAqdOwy2maX6Q= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The last remaining user of WILC_SDIO macro checks for the correct time to wait in an interrupt for the PLL to settle. We can replace this with a runtime check and remove both WILC_SDIO and WILC_SPI, as we no longer need conditional compilation based on the hardware type. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Makefile | 3 +-- drivers/staging/wilc1000/wilc_wlan.c | 5 ++++- drivers/staging/wilc1000/wilc_wlan.h | 7 ++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index fe480c76c521..dcba27bd3bce 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -1,7 +1,6 @@ obj-$(CONFIG_WILC1000) += wilc1000.o -ccflags-$(CONFIG_WILC1000_SDIO) += -DWILC_SDIO -DCOMPLEMENT_BOOT -ccflags-$(CONFIG_WILC1000_SPI) += -DWILC_SPI +ccflags-$(CONFIG_WILC1000_SDIO) += -DCOMPLEMENT_BOOT ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ -DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \ diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 5e37ec65d3bb..f72f976906cc 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1067,7 +1067,10 @@ static void wilc_pllupdate_isr_ext(u32 int_stats) g_wlan.hif_func.hif_clear_int_ext(PLL_INT_CLR); - mdelay(WILC_PLL_TO); + if (g_wlan.io_type == HIF_SDIO) + mdelay(WILC_PLL_TO_SDIO); + else + mdelay(WILC_PLL_TO_SPI); while (!(ISWILC1000(wilc_get_chipid(true)) && --trials)) { PRINT_D(TX_DBG, "PLL update retrying\n"); diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 44a590f80def..90ef650e722d 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -134,11 +134,8 @@ #define WILC_CFG_RSP_STATUS 2 #define WILC_CFG_RSP_SCAN 3 -#ifdef WILC_SDIO -#define WILC_PLL_TO 4 -#else -#define WILC_PLL_TO 2 -#endif +#define WILC_PLL_TO_SDIO 4 +#define WILC_PLL_TO_SPI 2 #define ABORT_INT BIT(31) /*******************************************/