From patchwork Fri May 22 14:44:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565757 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AF8C1391 for ; Fri, 22 May 2020 14:45:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0143320897 for ; Fri, 22 May 2020 14:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158744; bh=hRb2VDYaeeagfmMwuXWOO5MTiJ36qdN4nrC0CGCu3qE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hr+5zvdFDBls7DpGFqbUwOEg3lf2A5ljlDMndfxwu5s/2KIk3XaUthMcdMJ9xN3xY lxSKr7Kabg4xm73OFOT6LWNRQ8RYe4HaHVJs27Qyuc7iRIl6YVcfxCslVYBkMqBU+X gcgmyqDbGRu6rENcMpnFNeup22qhNZStqEJhOSfY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730012AbgEVOpn (ORCPT ); Fri, 22 May 2020 10:45:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:48042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730036AbgEVOpn (ORCPT ); Fri, 22 May 2020 10:45:43 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FCF9204EF; Fri, 22 May 2020 14:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158742; bh=hRb2VDYaeeagfmMwuXWOO5MTiJ36qdN4nrC0CGCu3qE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LrqjOWo/J/e9nqoi7yNeP3vN8U5uj740diXbXu7bs4TXKUlq/Wfi+mfz8xQW2v7va UE5FWy17VeukuVoiZIHjzYXyVZvElDUFhPCwCXBb0Lnaf1D+85JNr0lkHuTgn2olws Zz2NEZtpFTLaUVIZ0OyqdWrQPDa5G9Esdeu3kbD0= Received: by pali.im (Postfix) id CB79251E; Fri, 22 May 2020 16:45:40 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 01/11] mmc: sdio: Fix macro name for Marvell device with ID 0x9134 Date: Fri, 22 May 2020 16:44:02 +0200 Message-Id: <20200522144412.19712-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Marvell SDIO device ID 0x9134 is used in SDIO Common CIS (Card Information Structure) and not in SDIO wlan function (with ID 1). SDIO Common CIS is accessed by function ID 0. So change this misleading macro name to SDIO_DEVICE_ID_MARVELL_8887_F0 as it does not refer to wlan function. It refers to function 0. Wlan module on this SDIO card is available at function ID 1 and is identified by different SDIO device ID 0x9135. Kernel quirks for SDIO devices are matched against device ID from SDIO Common CIS. Therefore device ID used in quirk is correct, just has misleading name. Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat --- drivers/mmc/core/quirks.h | 2 +- include/linux/mmc/sdio_ids.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h index 3dba15bccce2..472fa2fdcf13 100644 --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h @@ -139,7 +139,7 @@ static const struct mmc_fixup sdio_fixup_methods[] = { SDIO_FIXUP(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797_F0, add_quirk, MMC_QUIRK_BROKEN_IRQ_POLLING), - SDIO_FIXUP(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8887WLAN, + SDIO_FIXUP(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8887_F0, add_limit_rate_quirk, 150000000), END_FIXUP diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 2e9a6e4634eb..96f43e0dc78f 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -59,7 +59,7 @@ #define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104 #define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105 #define SDIO_DEVICE_ID_MARVELL_8797_F0 0x9128 -#define SDIO_DEVICE_ID_MARVELL_8887WLAN 0x9134 +#define SDIO_DEVICE_ID_MARVELL_8887_F0 0x9134 #define SDIO_VENDOR_ID_MEDIATEK 0x037a From patchwork Fri May 22 14:44:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6A121391 for ; Fri, 22 May 2020 14:45:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4EDB20727 for ; Fri, 22 May 2020 14:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158747; bh=WFuyUyhfF0r2NIDkbY75yLpDco7NYc0wVtuTNDsXGf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z/731M2c7sIVpVxFMeByEM33sjVWOsynj4B5gqqVppXPzguf7bdbITEawv+dmbPPj bL4BF6Q06M2FHvZY7bdWedf26Dd+OLjlBHOaqLCfa5SIKj3AXIxjZILcV6UiSRgaUj Q4/htp+X1Jp18j77PdAbfWsr316zW578YNmv/bAs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730082AbgEVOpr (ORCPT ); Fri, 22 May 2020 10:45:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730061AbgEVOpq (ORCPT ); Fri, 22 May 2020 10:45:46 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D1A22053B; Fri, 22 May 2020 14:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158745; bh=WFuyUyhfF0r2NIDkbY75yLpDco7NYc0wVtuTNDsXGf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o68/I4gQ9Zskbrv0XZqEAgSE4dXJ/pzXRdBWhxP0lKxz0F9wWU1del/rJ1fwqApo0 o8N5NzfTnU0o/kJa1Gp+9rZYobdlZJDosuejulBUbMGbGpV6Bh4kg196AQR/Qor0zK 6SX/7I03OBlaLyopYy/byBmYF+iAFb0nV89ZBT+Q= Received: by pali.im (Postfix) id D74BD51E; Fri, 22 May 2020 16:45:43 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 02/11] mmc: sdio: Change macro names for Marvell 8688 modules Date: Fri, 22 May 2020 16:44:03 +0200 Message-Id: <20200522144412.19712-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add underscore as separator in Marvell 8688 macro names for better readability and consistency. Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat --- drivers/net/wireless/marvell/libertas/if_sdio.c | 2 +- include/linux/mmc/sdio_ids.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c index acf61b93b782..44fbd0acb87a 100644 --- a/drivers/net/wireless/marvell/libertas/if_sdio.c +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c @@ -65,7 +65,7 @@ static const struct sdio_device_id if_sdio_ids[] = { { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) }, { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, - SDIO_DEVICE_ID_MARVELL_8688WLAN) }, + SDIO_DEVICE_ID_MARVELL_8688_WLAN) }, { /* end: all zeroes */ }, }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 96f43e0dc78f..7e992a0e6cc0 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -56,8 +56,8 @@ #define SDIO_VENDOR_ID_MARVELL 0x02df #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 -#define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104 -#define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105 +#define SDIO_DEVICE_ID_MARVELL_8688_WLAN 0x9104 +#define SDIO_DEVICE_ID_MARVELL_8688_BT 0x9105 #define SDIO_DEVICE_ID_MARVELL_8797_F0 0x9128 #define SDIO_DEVICE_ID_MARVELL_8887_F0 0x9134 From patchwork Fri May 22 14:44:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565767 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E782A1391 for ; Fri, 22 May 2020 14:45:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9628204EF for ; Fri, 22 May 2020 14:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158754; bh=oq5ZCJlTZiGHXZ4dJp1898bt1twZklmXaQYyrfl6DbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Bb6JqDyA4qxjdNAHnqFVoTci0ePnY9LNow3Zi2onNWKS+TnJBn8mf+HEFRNeIn9WL 1Ag5AwMP8+y8SG/EPol1vjL5FODpTh7At/zE38kLqM1OylGbKmx9qeLhYXmB1qDPSO 53IIrAG4CCtnDdTgwI6sYATEJ3iizNFpFPULTbHs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730261AbgEVOpx (ORCPT ); Fri, 22 May 2020 10:45:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:48228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730061AbgEVOpt (ORCPT ); Fri, 22 May 2020 10:45:49 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D03B2054F; Fri, 22 May 2020 14:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158748; bh=oq5ZCJlTZiGHXZ4dJp1898bt1twZklmXaQYyrfl6DbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vmqgPZnAGbdGZkJnNBSQtvm5P4tXIor1R1Pr7WCRLRgBOTPbUAUjAK2he5uiCxego drlx24+IBOOCbkZ0FQZXlUX7+1xhSyWF7QVA/EDbp8DY1BW6O8OQqdkK71TbvkC8Ko kzc3sqKQHGdA/xvwycnU4auvcNvKyXeXMq7du2Io= Received: by pali.im (Postfix) id A1CBE51E; Fri, 22 May 2020 16:45:46 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 03/11] mmc: sdio: Move SDIO IDs from mwifiex driver to common include file Date: Fri, 22 May 2020 16:44:04 +0200 Message-Id: <20200522144412.19712-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add _WLAN suffix to macro names for consistency with other Marvell macros. These IDs represents wlan function of combo bt/wlan cards. Other functions of these cards have different IDs. Signed-off-by: Pali Rohár Acked-by: Kalle Valo Acked-by: Ganapathi Bhat --- drivers/net/wireless/marvell/mwifiex/sdio.c | 38 +++++---------------- include/linux/mmc/sdio_ids.h | 10 ++++++ 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 6a2dcb01caf4..a042965962a2 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -480,45 +480,25 @@ static void mwifiex_sdio_coredump(struct device *dev) schedule_work(&card->work); } -/* Device ID for SD8786 */ -#define SDIO_DEVICE_ID_MARVELL_8786 (0x9116) -/* Device ID for SD8787 */ -#define SDIO_DEVICE_ID_MARVELL_8787 (0x9119) -/* Device ID for SD8797 */ -#define SDIO_DEVICE_ID_MARVELL_8797 (0x9129) -/* Device ID for SD8897 */ -#define SDIO_DEVICE_ID_MARVELL_8897 (0x912d) -/* Device ID for SD8887 */ -#define SDIO_DEVICE_ID_MARVELL_8887 (0x9135) -/* Device ID for SD8801 */ -#define SDIO_DEVICE_ID_MARVELL_8801 (0x9139) -/* Device ID for SD8977 */ -#define SDIO_DEVICE_ID_MARVELL_8977 (0x9145) -/* Device ID for SD8987 */ -#define SDIO_DEVICE_ID_MARVELL_8987 (0x9149) -/* Device ID for SD8997 */ -#define SDIO_DEVICE_ID_MARVELL_8997 (0x9141) - - /* WLAN IDs */ static const struct sdio_device_id mwifiex_ids[] = { - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8786), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8786_WLAN), .driver_data = (unsigned long) &mwifiex_sdio_sd8786}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787_WLAN), .driver_data = (unsigned long) &mwifiex_sdio_sd8787}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797_WLAN), .driver_data = (unsigned long) &mwifiex_sdio_sd8797}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8897), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8897_WLAN), .driver_data = (unsigned long) &mwifiex_sdio_sd8897}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8887), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8887_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8887}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8801), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8801_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8801}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8977}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8987}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997), + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8997}, {}, }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 7e992a0e6cc0..90361ea7f5ed 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -58,8 +58,18 @@ #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 #define SDIO_DEVICE_ID_MARVELL_8688_WLAN 0x9104 #define SDIO_DEVICE_ID_MARVELL_8688_BT 0x9105 +#define SDIO_DEVICE_ID_MARVELL_8786_WLAN 0x9116 +#define SDIO_DEVICE_ID_MARVELL_8787_WLAN 0x9119 #define SDIO_DEVICE_ID_MARVELL_8797_F0 0x9128 +#define SDIO_DEVICE_ID_MARVELL_8797_WLAN 0x9129 +#define SDIO_DEVICE_ID_MARVELL_8897_WLAN 0x912d #define SDIO_DEVICE_ID_MARVELL_8887_F0 0x9134 +#define SDIO_DEVICE_ID_MARVELL_8887_WLAN 0x9135 +#define SDIO_DEVICE_ID_MARVELL_8801_WLAN 0x9139 +#define SDIO_DEVICE_ID_MARVELL_8997_F0 0x9140 +#define SDIO_DEVICE_ID_MARVELL_8997_WLAN 0x9141 +#define SDIO_DEVICE_ID_MARVELL_8977_WLAN 0x9145 +#define SDIO_DEVICE_ID_MARVELL_8987_WLAN 0x9149 #define SDIO_VENDOR_ID_MEDIATEK 0x037a From patchwork Fri May 22 14:44:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3967B159A for ; Fri, 22 May 2020 14:46:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2286A21744 for ; Fri, 22 May 2020 14:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158799; bh=JuVtsoJtqiGRmlRjn0aQhleeQaWm700qqmuKFp/zUsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EPAwkZzlYqLE20UWSBiJxdebwax92ZcF/ZJbM4EeickISIFbtwGQciAPRb7f4ZxH0 u+BTCrOXgjHC+4Pirp5gUoNRC16WCduzTLpqaumgPUHL6xQfJEzPwODTRywJLWOXeG OefALq7GXG6iJ24s7hLR9ICa33O3I/VVjSSSliqs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730357AbgEVOqe (ORCPT ); Fri, 22 May 2020 10:46:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:48314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730089AbgEVOpx (ORCPT ); Fri, 22 May 2020 10:45:53 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 05EF420727; Fri, 22 May 2020 14:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158752; bh=JuVtsoJtqiGRmlRjn0aQhleeQaWm700qqmuKFp/zUsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KA9a1lxgJE9kGo8WzKl//DiDJ0mIhN5vTC2JDL6dMQ5+Zm9/Q5w7ftISDJaERGnsw WU7zCHsKRoAdfuF/WFi0DnRc7O+PXFrI8NmSYE5774cBV0eCl8oz+xEw8kDjsPAbmz iHLXemt9FudqdZVrtqvwWCywY1qzI8i/HFMoFqWo= Received: by pali.im (Postfix) id 3FEBD51E; Fri, 22 May 2020 16:45:50 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 04/11] mmc: sdio: Move SDIO IDs from btmrvl driver to common include file Date: Fri, 22 May 2020 16:44:05 +0200 Message-Id: <20200522144412.19712-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Define appropriate macro names for consistency with other Marvell macros. Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat --- drivers/bluetooth/btmrvl_sdio.c | 18 +++++++++--------- include/linux/mmc/sdio_ids.h | 8 ++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 0f3a020703ab..a296f8526433 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -355,31 +355,31 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8997 = { static const struct sdio_device_id btmrvl_sdio_ids[] = { /* Marvell SD8688 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9105), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8688_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8688 }, /* Marvell SD8787 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8787 }, /* Marvell SD8787 Bluetooth AMP device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911B), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787_BT_AMP), .driver_data = (unsigned long)&btmrvl_sdio_sd8787 }, /* Marvell SD8797 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8797 }, /* Marvell SD8887 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9136), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8887_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8887 }, /* Marvell SD8897 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912E), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8897_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8897 }, /* Marvell SD8977 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9146), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8977 }, /* Marvell SD8987 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x914A), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8987 }, /* Marvell SD8997 Bluetooth device */ - { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9142), + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997_BT), .driver_data = (unsigned long)&btmrvl_sdio_sd8997 }, { } /* Terminating entry */ diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 90361ea7f5ed..1237e1048d06 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -60,16 +60,24 @@ #define SDIO_DEVICE_ID_MARVELL_8688_BT 0x9105 #define SDIO_DEVICE_ID_MARVELL_8786_WLAN 0x9116 #define SDIO_DEVICE_ID_MARVELL_8787_WLAN 0x9119 +#define SDIO_DEVICE_ID_MARVELL_8787_BT 0x911a +#define SDIO_DEVICE_ID_MARVELL_8787_BT_AMP 0x911b #define SDIO_DEVICE_ID_MARVELL_8797_F0 0x9128 #define SDIO_DEVICE_ID_MARVELL_8797_WLAN 0x9129 +#define SDIO_DEVICE_ID_MARVELL_8797_BT 0x912a #define SDIO_DEVICE_ID_MARVELL_8897_WLAN 0x912d +#define SDIO_DEVICE_ID_MARVELL_8897_BT 0x912e #define SDIO_DEVICE_ID_MARVELL_8887_F0 0x9134 #define SDIO_DEVICE_ID_MARVELL_8887_WLAN 0x9135 +#define SDIO_DEVICE_ID_MARVELL_8887_BT 0x9136 #define SDIO_DEVICE_ID_MARVELL_8801_WLAN 0x9139 #define SDIO_DEVICE_ID_MARVELL_8997_F0 0x9140 #define SDIO_DEVICE_ID_MARVELL_8997_WLAN 0x9141 +#define SDIO_DEVICE_ID_MARVELL_8997_BT 0x9142 #define SDIO_DEVICE_ID_MARVELL_8977_WLAN 0x9145 +#define SDIO_DEVICE_ID_MARVELL_8977_BT 0x9146 #define SDIO_DEVICE_ID_MARVELL_8987_WLAN 0x9149 +#define SDIO_DEVICE_ID_MARVELL_8987_BT 0x914a #define SDIO_VENDOR_ID_MEDIATEK 0x037a From patchwork Fri May 22 14:44:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 08C2414B7 for ; Fri, 22 May 2020 14:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75DD8221F3 for ; Fri, 22 May 2020 14:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158793; bh=fmZWyu8S8zz/WmoFW+uWpo4sd9DDFs+iV3itMZTeMR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Oxgw2wAak7KA4yClGAhqRe1Ho6aZo05NFdA2XlM2hTxsJJs9F44uPdydFEu9+0mqB HTf3AgQGpseFgb+/Az/MWAENKbKQLoLemvTvarJtSZk7L1H8nfoFp7gIRS5JppMp4Y IvD+X29h3oN4dqtMpKpnxxkMuzHwcCB/bcmHgdBg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730301AbgEVOp5 (ORCPT ); Fri, 22 May 2020 10:45:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:48352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730061AbgEVOp4 (ORCPT ); Fri, 22 May 2020 10:45:56 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D853204EF; Fri, 22 May 2020 14:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158755; bh=fmZWyu8S8zz/WmoFW+uWpo4sd9DDFs+iV3itMZTeMR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMliYZS+G4ZRp+xBCR+xbnXAAMh7UGnCuzkwQYS8ohlmf0AGqMfMh9j9ot4+ycbiY BpMyLY2icnsETEivqZGwzx8hDkx4nycPgULF3ulzlTbwmq7TlKa+/mc+4p6bGNAJ34 ElE/GMzYjlMwFIJE448OlJo78KRdeVt+IEEreRpE= Received: by pali.im (Postfix) id 93A9A51E; Fri, 22 May 2020 16:45:53 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 05/11] mmc: sdio: Move SDIO IDs from btmtksdio driver to common include file Date: Fri, 22 May 2020 16:44:06 +0200 Message-Id: <20200522144412.19712-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Define appropriate macro names for consistency with other macros. Signed-off-by: Pali Rohár Reviewed-by: Matthias Brugger --- drivers/bluetooth/btmtksdio.c | 4 ++-- include/linux/mmc/sdio_ids.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 519788c442ca..bff095be2f97 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -51,9 +51,9 @@ static const struct btmtksdio_data mt7668_data = { }; static const struct sdio_device_id btmtksdio_table[] = { - {SDIO_DEVICE(SDIO_VENDOR_ID_MEDIATEK, 0x7663), + {SDIO_DEVICE(SDIO_VENDOR_ID_MEDIATEK, SDIO_DEVICE_ID_MEDIATEK_MT7663), .driver_data = (kernel_ulong_t)&mt7663_data }, - {SDIO_DEVICE(SDIO_VENDOR_ID_MEDIATEK, 0x7668), + {SDIO_DEVICE(SDIO_VENDOR_ID_MEDIATEK, SDIO_DEVICE_ID_MEDIATEK_MT7668), .driver_data = (kernel_ulong_t)&mt7668_data }, { } /* Terminating entry */ }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 1237e1048d06..c9aca57d4dea 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -80,6 +80,8 @@ #define SDIO_DEVICE_ID_MARVELL_8987_BT 0x914a #define SDIO_VENDOR_ID_MEDIATEK 0x037a +#define SDIO_DEVICE_ID_MEDIATEK_MT7663 0x7663 +#define SDIO_DEVICE_ID_MEDIATEK_MT7668 0x7668 #define SDIO_VENDOR_ID_SIANO 0x039a #define SDIO_DEVICE_ID_SIANO_NOVA_B0 0x0201 From patchwork Fri May 22 14:44:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565775 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E92C14B7 for ; Fri, 22 May 2020 14:46:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6393920DD4 for ; Fri, 22 May 2020 14:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158760; bh=FK2cjUuXlz/7vUmgD5dr+Rxd2hc1F0f/Urz70jIMZa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AsNh4S8WUofAiMFlx63V9sgWRTrc8NCZ0XSIHDgwZpi0sSCbW2VTqmY6gp34KxoAO nA73yhvXINAHiAbDbdTLaUwDKDWIpulYJOZFlASH64GRY+HugQtP4VNnvA1tpkAYJi bMlrBLn0I7T09MsfRmuIXRXERYlSHXJg/LhtO4lk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730325AbgEVOp7 (ORCPT ); Fri, 22 May 2020 10:45:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:48438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730311AbgEVOp6 (ORCPT ); Fri, 22 May 2020 10:45:58 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFD8320727; Fri, 22 May 2020 14:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158757; bh=FK2cjUuXlz/7vUmgD5dr+Rxd2hc1F0f/Urz70jIMZa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R4RGsK78MnWMvmiJBT2se89kpkaB0qz25O7LIel5g4KT4tf6cSu6RGEEHAp9j9sjs sK/teQ9m8Di3KhBmn5dUiez6gg8GmzdC6PGfJXWc+BAeE8sq4+l4tHgwd1oVnYsNrC NNgAol6PCO16S/2N/bcbwUCFXI+seymMU3u2HK+Y= Received: by pali.im (Postfix) id 049BC51E; Fri, 22 May 2020 16:45:56 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 06/11] mmc: sdio: Move SDIO IDs from smssdio driver to common include file Date: Fri, 22 May 2020 16:44:07 +0200 Message-Id: <20200522144412.19712-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Define appropriate macro names for consistency with other Siano macros. Signed-off-by: Pali Rohár --- drivers/media/mmc/siano/smssdio.c | 10 +++++----- include/linux/mmc/sdio_ids.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/media/mmc/siano/smssdio.c b/drivers/media/mmc/siano/smssdio.c index def5e93849d2..065b572e0272 100644 --- a/drivers/media/mmc/siano/smssdio.c +++ b/drivers/media/mmc/siano/smssdio.c @@ -58,15 +58,15 @@ static const struct sdio_device_id smssdio_ids[] = { .driver_data = SMS1XXX_BOARD_SIANO_VEGA}, {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VENICE), .driver_data = SMS1XXX_BOARD_SIANO_VEGA}, - {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x302), + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_MING), .driver_data = SMS1XXX_BOARD_SIANO_MING}, - {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x500), + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_PELE), .driver_data = SMS1XXX_BOARD_SIANO_PELE}, - {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x600), + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_RIO), .driver_data = SMS1XXX_BOARD_SIANO_RIO}, - {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x700), + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_DENVER_2160), .driver_data = SMS1XXX_BOARD_SIANO_DENVER_2160}, - {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x800), + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_DENVER_1530), .driver_data = SMS1XXX_BOARD_SIANO_DENVER_1530}, { /* end: all zeroes */ }, }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index c9aca57d4dea..9ec675a7ac37 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -88,6 +88,11 @@ #define SDIO_DEVICE_ID_SIANO_NICE 0x0202 #define SDIO_DEVICE_ID_SIANO_VEGA_A0 0x0300 #define SDIO_DEVICE_ID_SIANO_VENICE 0x0301 +#define SDIO_DEVICE_ID_SIANO_MING 0x0302 +#define SDIO_DEVICE_ID_SIANO_PELE 0x0500 +#define SDIO_DEVICE_ID_SIANO_RIO 0x0600 +#define SDIO_DEVICE_ID_SIANO_DENVER_2160 0x0700 +#define SDIO_DEVICE_ID_SIANO_DENVER_1530 0x0800 #define SDIO_DEVICE_ID_SIANO_NOVA_A0 0x1100 #define SDIO_DEVICE_ID_SIANO_STELLAR 0x5347 From patchwork Fri May 22 14:44:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C203814B7 for ; Fri, 22 May 2020 14:46:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A84592054F for ; Fri, 22 May 2020 14:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158787; bh=8NLVpRbZ9BVGCWTSzZ0LcYnOFxjviPD4hKwEfLQKjkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=LJuUQ4uTHlP13WjkeJ024UChuhBrYdAjAYnyClJ6PsNZ2kcP2CFyY2L0qEPgihi7N aK7AoNEqy8noGYuhVXJ4F6baBzKnt0v6WOuwXqRIV5P+MZBRkUtElYKOlGvENNT6aV ZTj9Dj6OPZZB6l+RfJzOLUhS/lVRt+RmB2ququcQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730362AbgEVOqC (ORCPT ); Fri, 22 May 2020 10:46:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730357AbgEVOqB (ORCPT ); Fri, 22 May 2020 10:46:01 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 60DF52053B; Fri, 22 May 2020 14:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158760; bh=8NLVpRbZ9BVGCWTSzZ0LcYnOFxjviPD4hKwEfLQKjkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJlmtjMJMGRFGvCBTfXLTroUx4zFYQR1M8BRpOEOKuS/9mTVqF+U2NaRvKIIHitu6 Qp7FLN7G6reB0jwhmKQNqDJrwTvoN2/ethiYKSKd/XfyyyY6MBImIgktC9mmooYrqa NKBQ1W+FcGCCVTQWWH3mSt79AXrAoUquVdBRYR/I= Received: by pali.im (Postfix) id 97FDF51E; Fri, 22 May 2020 16:45:58 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 07/11] mmc: sdio: Move SDIO IDs from ath6kl driver to common include file Date: Fri, 22 May 2020 16:44:08 +0200 Message-Id: <20200522144412.19712-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Also replace generic MANUFACTURER macros by proper SDIO IDs macros. Check for "AR6003 or later" is slightly modified to use SDIO device IDs. This allows removal of all custom MANUFACTURER macros from ath6kl. Signed-off-by: Pali Rohár Acked-by: Kalle Valo --- drivers/net/wireless/ath/ath6kl/hif.h | 6 ------ drivers/net/wireless/ath/ath6kl/sdio.c | 17 ++++++++--------- include/linux/mmc/sdio_ids.h | 10 ++++++++++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h index dc6bd8cd9b83..c6dafc38936a 100644 --- a/drivers/net/wireless/ath/ath6kl/hif.h +++ b/drivers/net/wireless/ath/ath6kl/hif.h @@ -35,12 +35,6 @@ #define MAX_SCATTER_ENTRIES_PER_REQ 16 #define MAX_SCATTER_REQ_TRANSFER_SIZE (32 * 1024) -#define MANUFACTURER_ID_AR6003_BASE 0x300 -#define MANUFACTURER_ID_AR6004_BASE 0x400 - /* SDIO manufacturer ID and Codes */ -#define MANUFACTURER_ID_ATH6KL_BASE_MASK 0xFF00 -#define MANUFACTURER_CODE 0x271 /* Atheros */ - /* Mailbox address in SDIO address space */ #define HIF_MBOX_BASE_ADDR 0x800 #define HIF_MBOX_WIDTH 0x800 diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index bb50680580f3..6b51a2dceadc 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -799,8 +799,7 @@ static int ath6kl_sdio_config(struct ath6kl *ar) sdio_claim_host(func); - if ((ar_sdio->id->device & MANUFACTURER_ID_ATH6KL_BASE_MASK) >= - MANUFACTURER_ID_AR6003_BASE) { + if (ar_sdio->id->device >= SDIO_DEVICE_ID_ATHEROS_AR6003_00) { /* enable 4-bit ASYNC interrupt on AR6003 or later */ ret = ath6kl_sdio_func0_cmd52_wr_byte(func->card, CCCR_SDIO_IRQ_MODE_REG, @@ -1409,13 +1408,13 @@ static void ath6kl_sdio_remove(struct sdio_func *func) } static const struct sdio_device_id ath6kl_sdio_devices[] = { - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x0))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x1))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x0))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x1))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x2))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x18))}, - {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x19))}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6003_00)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6003_01)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6004_00)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6004_01)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6004_02)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6004_18)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6004_19)}, {}, }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 9ec675a7ac37..95b67ab7d06a 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -24,6 +24,16 @@ /* * Vendors and devices. Sort key: vendor first, device next. */ + +#define SDIO_VENDOR_ID_ATHEROS 0x0271 +#define SDIO_DEVICE_ID_ATHEROS_AR6003_00 0x0300 +#define SDIO_DEVICE_ID_ATHEROS_AR6003_01 0x0301 +#define SDIO_DEVICE_ID_ATHEROS_AR6004_00 0x0400 +#define SDIO_DEVICE_ID_ATHEROS_AR6004_01 0x0401 +#define SDIO_DEVICE_ID_ATHEROS_AR6004_02 0x0402 +#define SDIO_DEVICE_ID_ATHEROS_AR6004_18 0x0418 +#define SDIO_DEVICE_ID_ATHEROS_AR6004_19 0x0419 + #define SDIO_VENDOR_ID_BROADCOM 0x02d0 #define SDIO_DEVICE_ID_BROADCOM_43143 0xa887 #define SDIO_DEVICE_ID_BROADCOM_43241 0x4324 From patchwork Fri May 22 14:44:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98441159A for ; Fri, 22 May 2020 14:46:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D5E321897 for ; Fri, 22 May 2020 14:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158784; bh=ye3nclsR7uSWC4P9+t5adbuuNtCeDZmeeSpzKSyy8xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZUUj3BxfQdGO2NjCyEt5DDrKmI0Byen3MtEjF8BAUysXtwpgGz5eQJ5BZMcrGbts+ jrZ0Mn4qrToch2/3HQIg+EAhLJpFs/NaDeHYeaks9DmSPVIbVgIAuIsOKL/y2tDjRA p7XZa/6yKZC6T1xue38y9TpoHyeAALNQv3SVxUPs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730393AbgEVOqG (ORCPT ); Fri, 22 May 2020 10:46:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730381AbgEVOqD (ORCPT ); Fri, 22 May 2020 10:46:03 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F7DB204EF; Fri, 22 May 2020 14:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158762; bh=ye3nclsR7uSWC4P9+t5adbuuNtCeDZmeeSpzKSyy8xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wkChRlczdOdI08bn6JmrTqB0hHPKi6knDknVJA0wcJzRcFQpPYgwccJ/S6aUPypGY qZtidpRlBISxgtHh1AbOHYLfLI0hpayMbnRrGZKGb1OVTdzzwLOdG/XFkttxm3qrEy gcMhq8pIIdy7nwnjs5ARl7RK9WFIERyQhkTKXOgc= Received: by pali.im (Postfix) id D613951E; Fri, 22 May 2020 16:46:00 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 08/11] mmc: sdio: Move SDIO IDs from ath10k driver to common include file Date: Fri, 22 May 2020 16:44:09 +0200 Message-Id: <20200522144412.19712-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Also replace generic MANUFACTURER macros by proper SDIO IDs macros. Checks for device IDs are slightly modified to use SDIO device IDs. This allows removal of all custom MANUFACTURER macros from ath10k. Signed-off-by: Pali Rohár --- drivers/net/wireless/ath/ath10k/sdio.c | 25 ++++++++++--------------- drivers/net/wireless/ath/ath10k/sdio.h | 8 -------- include/linux/mmc/sdio_ids.h | 2 ++ 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 1f709b65c29b..59e725515041 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -1083,10 +1083,10 @@ static void ath10k_sdio_set_mbox_info(struct ath10k *ar) mbox_info->ext_info[0].htc_ext_addr = ATH10K_HIF_MBOX0_EXT_BASE_ADDR; - dev_id_base = FIELD_GET(QCA_MANUFACTURER_ID_BASE, device); - dev_id_chiprev = FIELD_GET(QCA_MANUFACTURER_ID_REV_MASK, device); + dev_id_base = (device & 0x0F00); + dev_id_chiprev = (device & 0x00FF); switch (dev_id_base) { - case QCA_MANUFACTURER_ID_AR6005_BASE: + case (SDIO_DEVICE_ID_ATHEROS_AR6005 & 0x0F00): if (dev_id_chiprev < 4) mbox_info->ext_info[0].htc_ext_sz = ATH10K_HIF_MBOX0_EXT_WIDTH; @@ -1097,7 +1097,7 @@ static void ath10k_sdio_set_mbox_info(struct ath10k *ar) mbox_info->ext_info[0].htc_ext_sz = ATH10K_HIF_MBOX0_EXT_WIDTH_ROME_2_0; break; - case QCA_MANUFACTURER_ID_QCA9377_BASE: + case (SDIO_DEVICE_ID_ATHEROS_QCA9377 & 0x0F00): mbox_info->ext_info[0].htc_ext_sz = ATH10K_HIF_MBOX0_EXT_WIDTH_ROME_2_0; break; @@ -2185,19 +2185,16 @@ static int ath10k_sdio_probe(struct sdio_func *func, skb_queue_head_init(&ar_sdio->rx_head); INIT_WORK(&ar_sdio->async_work_rx, ath10k_rx_indication_async_work); - dev_id_base = FIELD_GET(QCA_MANUFACTURER_ID_BASE, id->device); - switch (dev_id_base) { - case QCA_MANUFACTURER_ID_AR6005_BASE: - case QCA_MANUFACTURER_ID_QCA9377_BASE: - ar->dev_id = QCA9377_1_0_DEVICE_ID; - break; - default: + dev_id_base = (id->device & 0x0F00); + if (dev_id_base != (SDIO_DEVICE_ID_ATHEROS_AR6005 & 0x0F00) && + dev_id_base != (SDIO_DEVICE_ID_ATHEROS_QCA9377 & 0x0F00)) { ret = -ENODEV; ath10k_err(ar, "unsupported device id %u (0x%x)\n", dev_id_base, id->device); goto err_free_wq; } + ar->dev_id = QCA9377_1_0_DEVICE_ID; ar->id.vendor = id->vendor; ar->id.device = id->device; @@ -2246,10 +2243,8 @@ static void ath10k_sdio_remove(struct sdio_func *func) } static const struct sdio_device_id ath10k_sdio_devices[] = { - {SDIO_DEVICE(QCA_MANUFACTURER_CODE, - (QCA_SDIO_ID_AR6005_BASE | 0xA))}, - {SDIO_DEVICE(QCA_MANUFACTURER_CODE, - (QCA_SDIO_ID_QCA9377_BASE | 0x1))}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_AR6005)}, + {SDIO_DEVICE(SDIO_VENDOR_ID_ATHEROS, SDIO_DEVICE_ID_ATHEROS_QCA9377)}, {}, }; diff --git a/drivers/net/wireless/ath/ath10k/sdio.h b/drivers/net/wireless/ath/ath10k/sdio.h index 33195f49acab..e8951f9cdb5f 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.h +++ b/drivers/net/wireless/ath/ath10k/sdio.h @@ -10,14 +10,6 @@ #define ATH10K_HIF_MBOX_BLOCK_SIZE 256 -#define QCA_MANUFACTURER_ID_BASE GENMASK(11, 8) -#define QCA_MANUFACTURER_ID_AR6005_BASE 0x5 -#define QCA_MANUFACTURER_ID_QCA9377_BASE 0x7 -#define QCA_SDIO_ID_AR6005_BASE 0x500 -#define QCA_SDIO_ID_QCA9377_BASE 0x700 -#define QCA_MANUFACTURER_ID_REV_MASK 0x00FF -#define QCA_MANUFACTURER_CODE 0x271 /* Qualcomm/Atheros */ - #define ATH10K_SDIO_MAX_BUFFER_SIZE 4096 /*Unsure of this constant*/ /* Mailbox address in SDIO address space */ diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 95b67ab7d06a..2894f7739acc 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -33,6 +33,8 @@ #define SDIO_DEVICE_ID_ATHEROS_AR6004_02 0x0402 #define SDIO_DEVICE_ID_ATHEROS_AR6004_18 0x0418 #define SDIO_DEVICE_ID_ATHEROS_AR6004_19 0x0419 +#define SDIO_DEVICE_ID_ATHEROS_AR6005 0x050A +#define SDIO_DEVICE_ID_ATHEROS_QCA9377 0x0701 #define SDIO_VENDOR_ID_BROADCOM 0x02d0 #define SDIO_DEVICE_ID_BROADCOM_43143 0xa887 From patchwork Fri May 22 14:44:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9493A14B7 for ; Fri, 22 May 2020 14:46:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76DE121741 for ; Fri, 22 May 2020 14:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158767; bh=9vrfLJZTL8WRQ1zupaCKPmQrLZnRZD1ZGr/IqCu0zrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=G95KDbBj+EX9KoXF9peSYZIS6Ep+JLQp3iNjgAZUuVfaSsxwvXVJqxuOX08bSawmV fxBH7Vksh+2al7JSBNG7ZKTA3+F3GvFVbi+/wfulLbsxqVTP0yBVmesAibYpWiBR7P ZJZYUaNdEs09g+NI8aUBQgAjOgxOj1g1KjceKiiY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730409AbgEVOqG (ORCPT ); Fri, 22 May 2020 10:46:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730357AbgEVOqF (ORCPT ); Fri, 22 May 2020 10:46:05 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E68F12053B; Fri, 22 May 2020 14:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158765; bh=9vrfLJZTL8WRQ1zupaCKPmQrLZnRZD1ZGr/IqCu0zrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jK2flk8kqtjnzRkud16YaMP5KNZWB2D/e0eVyzKP27T567icbolifPhI0j0G+ve+Y H6h8Xme+lxQmSFqw8laWH/FDENfb0FnxwRdGJDoqspL0SBjr8THw6h8twJq4I/UXhy XiLnCTKBOSl/T1MRltWqSS2+25W73HEc0UC85IPc= Received: by pali.im (Postfix) id 2D0B651E; Fri, 22 May 2020 16:46:03 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 09/11] mmc: sdio: Move SDIO IDs from b43-sdio driver to common include file Date: Fri, 22 May 2020 16:44:10 +0200 Message-Id: <20200522144412.19712-10-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Define appropriate macro names for consistency with other macros. Signed-off-by: Pali Rohár --- drivers/net/wireless/broadcom/b43/sdio.c | 4 ++-- include/linux/mmc/sdio_ids.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/sdio.c b/drivers/net/wireless/broadcom/b43/sdio.c index 881a7938c494..02b0cfd535ab 100644 --- a/drivers/net/wireless/broadcom/b43/sdio.c +++ b/drivers/net/wireless/broadcom/b43/sdio.c @@ -180,8 +180,8 @@ static void b43_sdio_remove(struct sdio_func *func) } static const struct sdio_device_id b43_sdio_ids[] = { - { SDIO_DEVICE(0x02d0, 0x044b) }, /* Nintendo Wii WLAN daughter card */ - { SDIO_DEVICE(0x0092, 0x0004) }, /* C-guys, Inc. EW-CG1102GC */ + { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_NINTENDO_WII) }, + { SDIO_DEVICE(SDIO_VENDOR_ID_CGUYS, SDIO_DEVICE_ID_CGUYS_EW_CG1102GC) }, { }, }; diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 2894f7739acc..8e7a0683b927 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -25,6 +25,9 @@ * Vendors and devices. Sort key: vendor first, device next. */ +#define SDIO_VENDOR_ID_CGUYS 0x0092 +#define SDIO_DEVICE_ID_CGUYS_EW_CG1102GC 0x0004 + #define SDIO_VENDOR_ID_ATHEROS 0x0271 #define SDIO_DEVICE_ID_ATHEROS_AR6003_00 0x0300 #define SDIO_DEVICE_ID_ATHEROS_AR6003_01 0x0301 @@ -37,6 +40,7 @@ #define SDIO_DEVICE_ID_ATHEROS_QCA9377 0x0701 #define SDIO_VENDOR_ID_BROADCOM 0x02d0 +#define SDIO_DEVICE_ID_BROADCOM_NINTENDO_WII 0x044b #define SDIO_DEVICE_ID_BROADCOM_43143 0xa887 #define SDIO_DEVICE_ID_BROADCOM_43241 0x4324 #define SDIO_DEVICE_ID_BROADCOM_4329 0x4329 From patchwork Fri May 22 14:44:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8DA9159A for ; Fri, 22 May 2020 14:46:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E191204EF for ; Fri, 22 May 2020 14:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158777; bh=TJohxP7W9jg/tdaIFO6IgAHGCrICOTbIc/uilKm/8Sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IdHulUzysJMosIN2kPKwCTIa7fDkGFzg1peoaJ1Sdbrxxxq0CvFdfADpt/Z3/I/DV FUR3ApMFrK7rkruJop+JIvqk1jvkjl858pgTg9zw0WYBI7Tit8jTvQ1kvkVVFSQu89 SDrtaYIU6U69wMPEt/oltmK8HnqeYzkljCyZibtE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730449AbgEVOqL (ORCPT ); Fri, 22 May 2020 10:46:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:48700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730427AbgEVOqI (ORCPT ); Fri, 22 May 2020 10:46:08 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 600162054F; Fri, 22 May 2020 14:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158767; bh=TJohxP7W9jg/tdaIFO6IgAHGCrICOTbIc/uilKm/8Sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0tmb1v0XU35+tUH6DDmz3g8ydeL47t0zXZM93MTVX34VGrqnEHSD3SE4WgZUUui0R kwXHdMPvtB16hmvqI0wplZanV9HIRyrBokqMVm1qcACmcMEB5o6NPmIFpP6ucuef3u gcSDdyYJtjWyI+jvGmpKI5HpNSfQZ4W9GmgxnEkA= Received: by pali.im (Postfix) id 99D2751E; Fri, 22 May 2020 16:46:05 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 10/11] mmc: sdio: Fix Cypress SDIO IDs macros in common include file Date: Fri, 22 May 2020 16:44:11 +0200 Message-Id: <20200522144412.19712-11-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org All macro names for SDIO device IDs are prefixed by vendor name to which device ID belongs. So for consistency add Broadcom string vendor prefix to all Cypress macro names as they belong to SDIO Broadcom vendor ID. Change also Cypress 43012 value from decimal do hexadecimal notation to be consistent with all other values. Signed-off-by: Pali Rohár --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++-- include/linux/mmc/sdio_ids.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index b684a5b6d904..a1fdb618cf14 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -970,9 +970,9 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_89359), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359), { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 3a08252f1a53..1c9561665a67 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4187,7 +4187,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, bus->hostintmask, NULL); switch (sdiod->func1->device) { - case SDIO_DEVICE_ID_CYPRESS_4373: + case SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_4373_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, @@ -4201,7 +4201,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB, &err); break; - case SDIO_DEVICE_ID_CYPRESS_43012: + case SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_43012_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 8e7a0683b927..b19200aea56a 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -58,9 +58,9 @@ #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 #define SDIO_DEVICE_ID_BROADCOM_4359 0x4359 -#define SDIO_DEVICE_ID_CYPRESS_4373 0x4373 -#define SDIO_DEVICE_ID_CYPRESS_43012 43012 -#define SDIO_DEVICE_ID_CYPRESS_89359 0x4355 +#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373 0x4373 +#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012 0xa804 +#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359 0x4355 #define SDIO_VENDOR_ID_INTEL 0x0089 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 From patchwork Fri May 22 14:44:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11565791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB450159A for ; Fri, 22 May 2020 14:46:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 996D42054F for ; Fri, 22 May 2020 14:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158782; bh=xL0iNQA61zcd+Iy+CRhN4KujKqVvoopu6rrafJslSYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JuYilk2PDwpym8yQ93zHMo727PGC9JJ0ueb19nTCCJsWTKt9OYVZ5IG9PlZLjYejj BFhJNq4ZJcZ7gn7Tv1gS2JlLITW2bXc++3kgDy5IAVMgNtjnoFjW6Y7kOkorvcJb8r Bq5m+zonkbiklQLD+Y0K6rXGo8dcoyB59c4LoHyY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730480AbgEVOqR (ORCPT ); Fri, 22 May 2020 10:46:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:48762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730357AbgEVOqK (ORCPT ); Fri, 22 May 2020 10:46:10 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10128204EF; Fri, 22 May 2020 14:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590158770; bh=xL0iNQA61zcd+Iy+CRhN4KujKqVvoopu6rrafJslSYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=07CBE6yL8mB6BaiAGeIP8E7u9ppDj+LFMIN/lwK1oOqis9HVXDBWiw0o7lfNXmqHr Mx2GhHNv2HSkmgoMWqwlC1uQjSC3ZDKZYHc3LoXCGV1sI14emQwsPiwa1cwjAM/rGf j5NOZPFFqtZBYD1I2MUSa3Of1aRp/BZXdQ9CdSzE= Received: by pali.im (Postfix) id 3863B51E; Fri, 22 May 2020 16:46:08 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Matthias Brugger , Mauro Carvalho Chehab , Kalle Valo , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 11/11] mmc: sdio: Sort all SDIO IDs in common include file Date: Fri, 22 May 2020 16:44:12 +0200 Message-Id: <20200522144412.19712-12-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522144412.19712-1-pali@kernel.org> References: <20200522144412.19712-1-pali@kernel.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Fix ordering of SDIO IDs to conform to the comment above, which says vendor first, device next. Signed-off-by: Pali Rohár --- include/linux/mmc/sdio_ids.h | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index b19200aea56a..15ed8ce9d394 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -25,9 +25,23 @@ * Vendors and devices. Sort key: vendor first, device next. */ +#define SDIO_VENDOR_ID_STE 0x0020 +#define SDIO_DEVICE_ID_STE_CW1200 0x2280 + +#define SDIO_VENDOR_ID_INTEL 0x0089 +#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 +#define SDIO_DEVICE_ID_INTEL_IWMC3200WIFI 0x1403 +#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 +#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 +#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 +#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 0x1407 + #define SDIO_VENDOR_ID_CGUYS 0x0092 #define SDIO_DEVICE_ID_CGUYS_EW_CG1102GC 0x0004 +#define SDIO_VENDOR_ID_TI 0x0097 +#define SDIO_DEVICE_ID_TI_WL1271 0x4076 + #define SDIO_VENDOR_ID_ATHEROS 0x0271 #define SDIO_DEVICE_ID_ATHEROS_AR6003_00 0x0300 #define SDIO_DEVICE_ID_ATHEROS_AR6003_01 0x0301 @@ -41,34 +55,26 @@ #define SDIO_VENDOR_ID_BROADCOM 0x02d0 #define SDIO_DEVICE_ID_BROADCOM_NINTENDO_WII 0x044b -#define SDIO_DEVICE_ID_BROADCOM_43143 0xa887 #define SDIO_DEVICE_ID_BROADCOM_43241 0x4324 #define SDIO_DEVICE_ID_BROADCOM_4329 0x4329 #define SDIO_DEVICE_ID_BROADCOM_4330 0x4330 #define SDIO_DEVICE_ID_BROADCOM_4334 0x4334 -#define SDIO_DEVICE_ID_BROADCOM_43340 0xa94c -#define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d #define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335 #define SDIO_DEVICE_ID_BROADCOM_4339 0x4339 -#define SDIO_DEVICE_ID_BROADCOM_43362 0xa962 -#define SDIO_DEVICE_ID_BROADCOM_43364 0xa9a4 -#define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6 #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345 -#define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 +#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359 0x4355 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 #define SDIO_DEVICE_ID_BROADCOM_4359 0x4359 #define SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373 0x4373 #define SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012 0xa804 -#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359 0x4355 - -#define SDIO_VENDOR_ID_INTEL 0x0089 -#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 -#define SDIO_DEVICE_ID_INTEL_IWMC3200WIFI 0x1403 -#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 -#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 -#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 -#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 0x1407 +#define SDIO_DEVICE_ID_BROADCOM_43143 0xa887 +#define SDIO_DEVICE_ID_BROADCOM_43340 0xa94c +#define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d +#define SDIO_DEVICE_ID_BROADCOM_43362 0xa962 +#define SDIO_DEVICE_ID_BROADCOM_43364 0xa9a4 +#define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6 +#define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf #define SDIO_VENDOR_ID_MARVELL 0x02df #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 @@ -112,12 +118,7 @@ #define SDIO_DEVICE_ID_SIANO_NOVA_A0 0x1100 #define SDIO_DEVICE_ID_SIANO_STELLAR 0x5347 -#define SDIO_VENDOR_ID_TI 0x0097 -#define SDIO_DEVICE_ID_TI_WL1271 0x4076 #define SDIO_VENDOR_ID_TI_WL1251 0x104c #define SDIO_DEVICE_ID_TI_WL1251 0x9066 -#define SDIO_VENDOR_ID_STE 0x0020 -#define SDIO_DEVICE_ID_STE_CW1200 0x2280 - #endif /* LINUX_MMC_SDIO_IDS_H */