From patchwork Wed Nov 21 06:57:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692029 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-2.web.codeaurora.org (Postfix) with ESMTP id 9864D15A7 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87BD32B97A for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B9052B984; Wed, 21 Nov 2018 06:57:32 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 10D4D2B980 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728014AbeKURae (ORCPT ); Wed, 21 Nov 2018 12:30:34 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727949AbeKURae (ORCPT ); Wed, 21 Nov 2018 12:30:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nOT1SZp1bYYEHLxo+tH5HO0Yy0OR2YwVVbYONHjrNEg=; b=GhFPgwoweSmom8AQKxTW+0pkWiTA7VvsE+kq2pqqq4WvhClD85BHpxau02dbW8ru74g71be7hbWvJzl2Ct7IaYg3YR0gFKR1nh4DJ6TslRpzEMwXTniLlLG8HqzDcb9bIL2XpQw94IGgNqxVKWYjDIL8L9w92T1T2nsY+l2QEyc= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:11 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:11 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Winnie Chang , Chi-Hsien Lin Subject: [PATCH 1/8] brcmfmac: add 4354 raw pcie device id Thread-Topic: [PATCH 1/8] brcmfmac: add 4354 raw pcie device id Thread-Index: AQHUgWdtBv/gHKSyW0WdHsc8l/QKzg== Date: Wed, 21 Nov 2018 06:57:11 +0000 Message-ID: <1542783402-112482-2-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:EoucfVGCelQyhKpZaIbH1fITzWJCrso3t0+m4lEM3ku8Z0831tM+VzBObuoET8jGyPdw8ZANUMkuYcoYx0kHyRPXbkcG6OAMbqCKqJXbMBumxzvib3q31qwd2OmMQMfJ+5Y+HhfjZHChGvNpRh5vrTDiqeNVzNtkqfBIdDHM1Y6WhvlkAkevKUaEEhsCf9+8Sxz3R3Wy8RfQpvzyWbo+p1TLM0R/OiS5EqlbLyKM6vLpxoGUpyTHWzlso+HK+TbYvGpHAY+oBZniSE+BgFA7fSKNpNCZFiYvEDjcr4ni3PhRftOn15Db7vQ7zunxydc9egLRQo07LVEdTtJjvIpxnEI7yqVp2M8bZ/llYNWhOY829bGT6yx7K/TlGgk/giY0JmfBh7t8mgbQ+PAyEZruyz8/t34tpXnb7ZdlkPf6+PavgLLRX8nQ0Qw6I0VDg1xuArACOTA9RJxJj6ThxtiFZQ==;5:Cdm8N+QUXLYxEHJWmRZfmm0u+NlIYSGgJE6oUUlWTiSAMlTKWwMKvbibok70ak2JUVlv1VCS428Gei6Aeccrkhdp2+tBpS3SgUDVaHYPbmfl+0CFW2/R1uAh4G21TptrpPMxcPqEIVarHKYNdqJLjtY+DCVU4b67kJ/o4EXL+RM=;7:NLmZtx2P2/ldSqvGYnhYKZGzOJBuo879Y+cVOeY4hErhVpJ5GmAmodPzz2FOYMcDKSIvDki6zyDDg3Y8HHM/bNdRyZ1q9+u5X0F9DCarB/tzMror5f9wxDsPhPz0/70gDoohPMFS1m4HZKU5GSiStg== x-ms-office365-filtering-correlation-id: a3885a8d-8fb8-4515-f6ab-08d64f7e8f33 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(396003)(39860400002)(376002)(346002)(136003)(199004)(189003)(26005)(36756003)(107886003)(6506007)(8676002)(386003)(2501003)(4326008)(186003)(8936002)(76176011)(2900100001)(68736007)(6916009)(71190400001)(71200400001)(99286004)(53936002)(52116002)(81156014)(81166006)(14454004)(102836004)(6512007)(6436002)(5660300001)(486006)(5640700003)(446003)(316002)(478600001)(6486002)(2351001)(54906003)(97736004)(86362001)(2616005)(106356001)(66066001)(25786009)(7736002)(305945005)(575784001)(105586002)(2906002)(11346002)(3846002)(72206003)(256004)(476003)(6116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: DGk1UzY5aec/vyIAogixhUjvjRKeXTvgQifB6F0BccDKhbpez7jv0YujW0wt7jExOnLKSB3Y4I+fkJLaiiNv94cotRcMSjecExBWfBdBQ4rf13j42EE5BrKG59ccEdFQHBMN+cIr8rlqah+pxDgA3EwwPJLDGQbpOh191MucwLWYTlg0wu+VVUnqZ8q1l+8n2TRwEzIQahC7d4e4Xy5V5Uk5uB9/KufaBRUsLbbxn5ZKVrFr0PQnSkAB/T54T2IkXb3CnIvBVVW47g1v+cezrgbiZLcWkl3lcVjZJo61yFLYPGAyKXzVgWzQ3hd4khjc/ljAuwmMXBCrSlWIiDn6m0Cb3+RjdhhOdl9cqKlRnlA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3885a8d-8fb8-4515-f6ab-08d64f7e8f33 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:11.2306 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 From: Winnie Chang Add the raw 4354 PCIe device ID for unprogrammed Cypress boards. Reviewed-by: Arend Van Spriel Signed-off-by: Winnie Chang Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 + drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 956a8b236836..16d7dda965d8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -2019,6 +2019,7 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = { static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index 686f7a85a045..acb87238922f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -74,6 +74,7 @@ /* PCIE Device IDs */ #define BRCM_PCIE_4350_DEVICE_ID 0x43a3 #define BRCM_PCIE_4354_DEVICE_ID 0x43df +#define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 #define BRCM_PCIE_4356_DEVICE_ID 0x43ec #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 From patchwork Wed Nov 21 06:57:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692033 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-2.web.codeaurora.org (Postfix) with ESMTP id B59231709 for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A40D82B98D for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96B242B98E; Wed, 21 Nov 2018 06:57:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 31FBE2B981 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728045AbeKURag (ORCPT ); Wed, 21 Nov 2018 12:30:36 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726039AbeKURaf (ORCPT ); Wed, 21 Nov 2018 12:30:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qay0aFW/E2FYhElg8U8JOaHkpaO+VZRJJs5m0wcZq7Y=; b=SrqBkkATrhZrWuj4BM4dtMfbUTzJ3y3WRu5wV9oeTlPhgi3ABRpI6VbNo87YX5Iouj4eXFkVpJeX2pChYBubJLKWHw3F1B9d3Y8RjgGfqwp9PYEQt1NMabxQtCnGLcPBlar0Yg1XWiPUZNtu1hq2o42t75t7Hr2F5C27N7wGwRE= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:12 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:12 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 2/8] brcmfmac: set F2 watermark to 256 for 4373 Thread-Topic: [PATCH 2/8] brcmfmac: set F2 watermark to 256 for 4373 Thread-Index: AQHUgWdtX+mmoAMk2ECKmfTuPtgzMg== Date: Wed, 21 Nov 2018 06:57:12 +0000 Message-ID: <1542783402-112482-3-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:+AOvCjvYNqO2T+ECjaCa0wB/K44sefbC/9z8fPX5WMtfgHuFeolWkGkl+BkzBX2XvIyldwWkj81fOmaH9JbxdNI7klczUVX13k71k6lGrD2oQAdRSSI7zgF4OzvkchFHGBx9gQ7MClRbpyo77eX5yaAi6CeiLEFbzGYpkTwIHVcMVE80NKoIYUdvO2uYdtug5A98Ss/qWEuWx+7lMy1fVYnvJfi68e/OguwheZdcMpby0ymQF59yWYE46T5ONg+KD8+EuEnPt1dz//GfkxJINxXtAaGBBORf1ftE96P4HCAVVLT+BdRmaLZ5FlVchWA7xrp+BoYUEC4ybczqF+RhnOf5WuAXFa2T5v5koS8Pd9cEc+cLxCHC9UFEE19CsNWX0AqhCHn3w8dK9n5+cEdVHQ5KEjAlG++R7Kue5F58v5scQ+I3edwK9BiCsb4DhfudDnM/Dd5mdxyjY7WFfuREsQ==;5:O8v9haddgyrlaRx3x0dcsUZ850yxC/whGm4NZuRFIwy6ArmIWF1vHDsaXaBg9c4LmRImlCPVHnNw5LDYPbpOD6ZSB8QjldoynFW31yx8h8WvPy/mi/NwGrSTLFLb9NrMrAsVQdspKwlaNXtzGcBzc/xMfhbyUHaQaJ1fs5prvEI=;7:rbxOrdXklpZ/yUXeG6v7x9aFqHwIFntb7RE6JK16xO++RYDkSqah6IQVPNl0ufN0miLymW+4fpZ9eSQxGUtYEm2FcznFZGm0wVTnwwXRmmsb8WV4TU4aYP8G3tMO2SzlHulcHpCovJ8XvZeww3qRcw== x-ms-office365-filtering-correlation-id: 5511a944-e308-49f8-efdb-08d64f7e8fed x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /LTT7Ionr95HCif0HpVEtO1ipkUTvkufiRBPNN3869xhhM3ZMOVehtt5DgghcL0fXDOuY3qK7XrSbin8Dxvgo19tgm9n5tVlZIDQSFKMDYdyZ7J06oANU/PtIhKZjD6H4MLsZlKzh1q8gqY+/jLNgRxkzikIOer4dJK09f8YqlaXTQAUtDIqnScQVeXRtQgZj1yQFFQA5qyaRDmzlCkn2UtBV8oFHJ9+reeqt8PvjsIBgB0ReO1fELWm7UzUgfmolmgsZWnTd8Na8EtavuJ8AVmo4KHp7/4FPw9Cw5D0f+EJhEK6luCnAawbPga4yGgRqp7z0ByTuiNXKk6eyWvbGNPr4JKgUywcb4V3uAERZQs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5511a944-e308-49f8-efdb-08d64f7e8fed X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:12.5275 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 From: Wright Feng We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional throughput test. Enable watermark to 256 to guarantee the operation stability. Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 22646a3b911e..c833e24c751c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -49,6 +49,10 @@ #define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500) #define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) +/* watermark expressed in number of words */ +#define DEFAULT_F2_WATERMARK 0x8 +#define CY_4373_F2_WATERMARK 0x40 + #ifdef DEBUG #define BRCMF_TRAP_INFO_SIZE 80 @@ -138,6 +142,8 @@ struct rte_console { /* 1: isolate internal sdio signals, put external pads in tri-state; requires * sdio bus power cycle to clear (rev 9) */ #define SBSDIO_DEVCTL_PADS_ISO 0x08 +/* 1: enable F2 Watermark */ +#define SBSDIO_DEVCTL_F2WM_ENAB 0x10 /* Force SD->SB reset mapping (rev 11) */ #define SBSDIO_DEVCTL_SB_RST_CTL 0x30 /* Determined by CoreControl bit */ @@ -4046,6 +4052,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, void *nvram; u32 nvram_len; u8 saveclk; + u8 devctl; brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); @@ -4101,8 +4108,23 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writel(sdiod, core->base + SD_REG(hostintmask), bus->hostintmask, NULL); - - brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, 8, &err); + switch (sdiod->func1->device) { + case SDIO_DEVICE_ID_CYPRESS_4373: + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", + CY_4373_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_4373_F2_WATERMARK, &err); + devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, + &err); + devctl |= SBSDIO_DEVCTL_F2WM_ENAB; + brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, + &err); + break; + default: + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + DEFAULT_F2_WATERMARK, &err); + break; + } } else { /* Disable F2 again */ sdio_disable_func(sdiod->func2); From patchwork Wed Nov 21 06:57:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692039 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-2.web.codeaurora.org (Postfix) with ESMTP id 179091926 for ; Wed, 21 Nov 2018 06:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06E4A2B97A for ; Wed, 21 Nov 2018 06:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF89B2B980; Wed, 21 Nov 2018 06:57:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 5291A2B985 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728061AbeKURai (ORCPT ); Wed, 21 Nov 2018 12:30:38 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728028AbeKURai (ORCPT ); Wed, 21 Nov 2018 12:30:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/z5VZ8Xr4BUy+e9vpXvu91P7emkl/xhcAUXTpfAK/nc=; b=IC8KJfaLwaDjF/OVRx4d/2Jj22uQO5zpPHZFeEBuyLN6Bj8AX9DNqTbZ9RrfLdRY/0s2iPkNqj8Ola8PFsKicHWYxjAn0J/AE2tWPXWrhmYg7ndOjlgqHRuRbYO8j2urDcHgvaCRDmeHOW4rPKXVTwSwrKYo6uesE6Sld1tCLIs= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:13 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:13 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Madhan Mohan R , Madhan Mohan R , Chi-Hsien Lin Subject: [PATCH 3/8] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Thread-Topic: [PATCH 3/8] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Thread-Index: AQHUgWduAzegxe+BdUadd8FNenrb2w== Date: Wed, 21 Nov 2018 06:57:13 +0000 Message-ID: <1542783402-112482-4-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:Xl3nyYLP/T1CREcWDuN6ZP7F//lmHQNOKiwa3+olE9u+JwNMWIsMz+ZmnoXLAbTFh8wNpf+4oBJDLCim2wFWn/UACEmVT83HTbAsi9JjPugFAEKw20twvYhDWERGzZCI7wVxAwosUO6VzMiF4bL8xgcJIoqSSP4NA3waKIbGq13Y86mebG615uFuV76aOZuoJ/xKSX5T2TnT279eM/UidtTwwEH3SrcbHYpwJXjNHcK2x9tXCUshEgX12UPhMX/gFngyVH/XXe+giCSYpH7M6WmMOVpdVw68HBMUf9yZAldOh+SId+7YCaPSiKvNwfn3BuyaMUZ3gY5loEa9nE/+qwNBcVoBaIPT4zEti3ZaAKByAsuRyuVSO8nJlMi6HFgg2HM1qVzmqGRtiGUWjbVj6kwRJylJMsPmLHXg+HpzJFHthbq7xnS74spqYbm8KUJwYWfkKtVkwr/wNX46Yfuctw==;5:ZcetIMJucQ6RlLZCvrzcKjWjRT9KefzJzLHxZJ0ViTfs0aDXDCmW9J/OGDn8tf7BDx7rLyqtlA38YHXx/Qt31vpvAA+FmkkQkb2JOzeQnPLIorVyzS4+l6zNr/Xq/wgwpSEaVgf8rBFslQMFZWORwBKUUcKP2wSnT8Rt29OQySg=;7:4vnlKxqjNz8pnOKbpgSFD9lz4bqp2HI+FmQy709YZziOnk0FE1F/TiBUlCUW0N+U790WXlMyR6yJpICPpFRPYcePLb7skV77W/ntnoLKdzOzFjWiIcZGR7tLjjZ2GRva016M0bUcyCa1vJidi4qG4g== x-ms-office365-filtering-correlation-id: d222c38f-7b14-4745-c0d2-08d64f7e90bf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(14444005)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: E5g2zevdC0QVA/rozPNS8N/Vb4g0o8dUGTSapQjjCCy0VjAe/J270glvNp1wUbRRilIIoLLySUitkAldPyfKyQXgLtQHbq5zhCW8/Refm7exEU0NoODw54a1YhzspnMS6Ez9rdFF3ctC6Bc70/zQJ0SF0w5oEEnyolbk2P/1QL48ZfSVm2/Gm4uQqIG4Uk/o0p5zGU+K47diW7CoMTKk6kdbSG6WDocqsu+HTzR334SkjPqtjs4Ho/Sr64DA34zKUqiUH1KpjUkBE2x64EFVybl9dCZ3zGqH0ns514SS6bjGdlRjzxY08npvYX7+pitPpf5SXpPKaCi3snFdqqzHGzgcXVpk1q8+PYPjf5AAPsM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: d222c38f-7b14-4745-c0d2-08d64f7e90bf X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:13.8244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 From: Madhan Mohan R Along with F2 watermark (existing) configuration, F1 MesBusyCtrl should be enabled & sdio device RX FIFO watermark should be configured to avoid overflow errors. Reviewed-by: Arend van Spriel Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index c833e24c751c..7a0601543dff 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4119,6 +4119,9 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, devctl |= SBSDIO_DEVCTL_F2WM_ENAB; brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, &err); + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, + CY_4373_F2_WATERMARK | + SBSDIO_MESBUSYCTRL_ENAB, &err); break; default: brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h index 7faed831f07d..34b031154da9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h @@ -77,7 +77,7 @@ #define SBSDIO_GPIO_OUT 0x10006 /* gpio enable */ #define SBSDIO_GPIO_EN 0x10007 -/* rev < 7, watermark for sdio device */ +/* rev < 7, watermark for sdio device TX path */ #define SBSDIO_WATERMARK 0x10008 /* control busy signal generation */ #define SBSDIO_DEVICE_CTL 0x10009 @@ -104,6 +104,13 @@ #define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C /* MesBusyCtl (rev 11) */ #define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D +/* Watermark for sdio device RX path */ +#define SBSDIO_MESBUSY_RXFIFO_WM_MASK 0x7F +#define SBSDIO_MESBUSY_RXFIFO_WM_SHIFT 0 +/* Enable busy capability for MES access */ +#define SBSDIO_MESBUSYCTRL_ENAB 0x80 +#define SBSDIO_MESBUSYCTRL_ENAB_SHIFT 7 + /* Sdio Core Rev 12 */ #define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E #define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 From patchwork Wed Nov 21 06:57:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692031 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-2.web.codeaurora.org (Postfix) with ESMTP id 6119115A7 for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 504012B98B for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4468D2B98E; Wed, 21 Nov 2018 06:57:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 7391D2B98B for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbeKURak (ORCPT ); Wed, 21 Nov 2018 12:30:40 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726039AbeKURak (ORCPT ); Wed, 21 Nov 2018 12:30:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ivpPpbNOb2P0MMAFr8OlxU0Po2WiLPJw7PY4QNmDAs=; b=WY+c6HNxPdrgjX456bZv+T7bbUnsDexe76qmiyTSTA0ptSovhBgJtgkjh8s/Pr2+rNuULT8rOO/0lVwr42Zh0crCY0G/G6bMAKrA+8o6y47uqtoXdFNJ6+OgFOgsZ8JQ5T8g6HUHX8nvHhx0uVUBkLnKAHwUyUrB69XtJR81sPQ= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:15 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:15 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin , Praveen Babu Chandran Subject: [PATCH 4/8] brcmfmac: add support for CYW43012 SDIO chipset Thread-Topic: [PATCH 4/8] brcmfmac: add support for CYW43012 SDIO chipset Thread-Index: AQHUgWdvi/b3mnZMV02rV+zcg9qe3Q== Date: Wed, 21 Nov 2018 06:57:14 +0000 Message-ID: <1542783402-112482-5-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:HBORNVVsms1iZT2rbF43dywjqrt/6ErDMQo/Ln6zQoC5knfAlIdBKUKl74K9O2v7mxU/6izk6coANw5iAbONdht2iRuRWwI5pobzOxAwooSuei8GcPHNDl23xNy+2YjghfZB1vShRVlFia4O0OxwC8pw3qM6++YKGBtmtbh90f3EEfWNHw6yZqba4voRfZ1Wd8sptYkJJMt3sdyEQjmB/qLsx9vCzE8eAz3+1Jcug1AEzXIxpVEHeowK//TxXAN0WVL5UOFDITQ3IkJTLwpnP9EQlJt3fvyr7a8H8ro6HGUNQI7wAZCtfMLUrjkcn4vk4TnR7XkCdcDelFqS+1KAdllnAsgnxlz5LX68DE1A2snkBXEHakzbb6JUIo9XxbUMGbtzeEf9eNyWiPI/1CffnVVWSkjDfKqB14AhrkGDu+3i2kZ1DL6xD2lrkXhNAX6YvNiyGA48YNhaxa3vaDR2fA==;5:8QblHC9kGnP55qZysGf6xXwo7jqMhBXFsAYzoPQw59FOtR0LCZRoCcKx+5dlodi4HZ6HOLb4xQL+gQTz/QlTU477G+gwzGK3AdAFiVSP64FORZcsZjqeWrdFGkLLSPxE2DG3i9v4NHQiPXOvkrNnfLwt+PfPjk4376qmVsiLQdM=;7:S3FnGljxtExdG3T5vJuadWfwA5j1O++g4jqh9eZ3ajOndiEjsFbjDqO34KkxT2DaCjcI181TgOgtLW6e1/1fC5Xdg7McZ5+cHZSV8zewHFEzxSSNt53rIts1MnAE2gvh1P7fiizkJVAPRY2NAv69ag== x-ms-office365-filtering-correlation-id: 314386cb-2dfd-4e8f-437d-08d64f7e9183 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IdlrSsEyHxf32hoS3WDEr1igGLAjFsYsYtCgFyjBH/QLdxRFp3jB3VLa86MfBDXzGEC62WvGWOIhKhyyWdxbrXtAm5hxHNElSXThfA8+hEzDfrxwtECbYvy41oBtEAQ+VYzEacn+aQ0oZ8ZCKJsqqEnaw3pAKSEyMORevZLozmk7qBBrTw3FfNsMmfp3ZoaXrTykLgkPkisVzMAg5Wbbv1bl6VPSQ86eyEWVgjMuj25HctENPF+zzw8pDkuY8VD8iuHKxbV0IPta7PV/hcGlqWrFGo8B92g2y58MTzVDTNHO18I29NeHC5pTDyfZq0XrWmf8/YV/7IH90CHSdwWB+AgT2qozvbO3x/1CERsTLGM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 314386cb-2dfd-4e8f-437d-08d64f7e9183 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:14.9963 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 CYW43012 is a 1x1 802.11a/b/g/n Dual-Band HT20, 256-QAM/Turbo QAM. It is an Ultra Low Power WLAN+BT combo chip. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin Signed-off-by: Praveen Babu C --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 +++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 74 ++++++++++++++++++---- .../broadcom/brcm80211/include/brcm_hw_ids.h | 1 + include/linux/mmc/sdio_ids.h | 1 + 5 files changed, 78 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index b2ad2122c8c4..d64bf233b12c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -983,6 +983,7 @@ 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_CYPRESS_4373), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012), { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 927d62b3d41b..a3c857721446 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -165,6 +165,7 @@ struct sbconfig { #define SRCI_LSS_MASK 0x00f00000 #define SRCI_LSS_SHIFT 20 #define SRCI_SRNB_MASK 0xf0 +#define SRCI_SRNB_MASK_EXT 0x100 #define SRCI_SRNB_SHIFT 4 #define SRCI_SRBSZ_MASK 0xf #define SRCI_SRBSZ_SHIFT 0 @@ -592,7 +593,13 @@ static void brcmf_chip_socram_ramsize(struct brcmf_core_priv *sr, u32 *ramsize, if (lss != 0) *ramsize += (1 << ((lss - 1) + SR_BSZ_BASE)); } else { - nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; + /* length of SRAM Banks increased for corerev greater than 23 */ + if (sr->pub.rev >= 23) { + nb = (coreinfo & (SRCI_SRNB_MASK | SRCI_SRNB_MASK_EXT)) + >> SRCI_SRNB_SHIFT; + } else { + nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; + } for (i = 0; i < nb; i++) { retent = brcmf_chip_socram_banksize(sr, i, &banksize); *ramsize += banksize; @@ -1356,6 +1363,11 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) addr = CORE_CC_REG(base, sr_control1); reg = chip->ops->read32(chip->ctx, addr); return reg != 0; + case CY_CC_43012_CHIP_ID: + addr = CORE_CC_REG(pmu->base, retention_ctl); + reg = chip->ops->read32(chip->ctx, addr); + return (reg & (PMU_RCTL_MACPHY_DISABLE_MASK | + PMU_RCTL_LOGIC_DISABLE_MASK)) == 0; default: addr = CORE_CC_REG(pmu->base, pmucapabilities_ext); reg = chip->ops->read32(chip->ctx, addr); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 7a0601543dff..73a034172c4c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -624,6 +624,7 @@ BRCMF_FW_DEF(43455, "brcmfmac43455-sdio"); BRCMF_FW_DEF(4354, "brcmfmac4354-sdio"); BRCMF_FW_DEF(4356, "brcmfmac4356-sdio"); BRCMF_FW_DEF(4373, "brcmfmac4373-sdio"); +BRCMF_FW_DEF(43012, "brcmfmac43012-sdio"); static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), @@ -643,7 +644,8 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455), BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354), BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), - BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373) + BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373), + BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012) }; static void pkt_align(struct sk_buff *p, int len, int align) @@ -677,6 +679,14 @@ brcmf_sdio_kso_control(struct brcmf_sdio *bus, bool on) /* 1st KSO write goes to AOS wake up core if device is asleep */ brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_SLEEPCSR, wr_val, &err); + /* In case of 43012 chip, the chip could go down immediately after + * KSO bit is cleared. So the further reads of KSO register could + * fail. Thereby just bailing out immediately after clearing KSO + * bit, to avoid polling of KSO bit. + */ + if (!on && bus->ci->chip == CY_CC_43012_CHIP_ID) + return err; + if (on) { /* device WAKEUP through KSO: * write bit 0 & read back until @@ -2402,6 +2412,14 @@ static int brcmf_sdio_tx_ctrlframe(struct brcmf_sdio *bus, u8 *frame, u16 len) return ret; } +static bool brcmf_chip_is_ulp(struct brcmf_chip *ci) +{ + if (ci->chip == CY_CC_43012_CHIP_ID) + return true; + else + return false; +} + static void brcmf_sdio_bus_stop(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); @@ -2409,7 +2427,7 @@ static void brcmf_sdio_bus_stop(struct device *dev) struct brcmf_sdio *bus = sdiodev->bus; struct brcmf_core *core = bus->sdio_core; u32 local_hostintmask; - u8 saveclk; + u8 saveclk, bpreq; int err; brcmf_dbg(TRACE, "Enter\n"); @@ -2436,9 +2454,14 @@ static void brcmf_sdio_bus_stop(struct device *dev) /* Force backplane clocks to assure F2 interrupt propagates */ saveclk = brcmf_sdiod_readb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, &err); - if (!err) - brcmf_sdiod_writeb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, - (saveclk | SBSDIO_FORCE_HT), &err); + if (!err) { + bpreq = saveclk; + bpreq |= brcmf_chip_is_ulp(bus->ci) ? + SBSDIO_HT_AVAIL_REQ : SBSDIO_FORCE_HT; + brcmf_sdiod_writeb(sdiodev, + SBSDIO_FUNC1_CHIPCLKCSR, + bpreq, &err); + } if (err) brcmf_err("Failed to force clock for F2: err %d\n", err); @@ -3328,20 +3351,45 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus, return bcmerror; } +static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus) +{ + if (bus->ci->chip == CY_CC_43012_CHIP_ID) + return true; + else + return false; +} + static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) { int err = 0; u8 val; + u8 wakeupctrl; + u8 cardcap; + u8 chipclkcsr; brcmf_dbg(TRACE, "Enter\n"); + if (brcmf_chip_is_ulp(bus->ci)) { + wakeupctrl = SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT; + chipclkcsr = SBSDIO_HT_AVAIL_REQ; + } else { + wakeupctrl = SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; + chipclkcsr = SBSDIO_FORCE_HT; + } + + if (brcmf_sdio_aos_no_decode(bus)) { + cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; + } else { + cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | + SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT); + } + val = brcmf_sdiod_readb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, &err); if (err) { brcmf_err("error reading SBSDIO_FUNC1_WAKEUPCTRL\n"); return; } - - val |= 1 << SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; + val |= 1 << wakeupctrl; brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, val, &err); if (err) { brcmf_err("error writing SBSDIO_FUNC1_WAKEUPCTRL\n"); @@ -3350,8 +3398,7 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) /* Add CMD14 Support */ brcmf_sdiod_func0_wb(bus->sdiodev, SDIO_CCCR_BRCM_CARDCAP, - (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | - SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT), + cardcap, &err); if (err) { brcmf_err("error writing SDIO_CCCR_BRCM_CARDCAP\n"); @@ -3359,7 +3406,7 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) } brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, - SBSDIO_FORCE_HT, &err); + chipclkcsr, &err); if (err) { brcmf_err("error writing SBSDIO_FUNC1_CHIPCLKCSR\n"); return; @@ -4051,7 +4098,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, const struct firmware *code; void *nvram; u32 nvram_len; - u8 saveclk; + u8 saveclk, bpreq; u8 devctl; brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); @@ -4085,8 +4132,11 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, /* Force clocks on backplane to be sure F2 interrupt propagates */ saveclk = brcmf_sdiod_readb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, &err); if (!err) { + bpreq = saveclk; + bpreq |= brcmf_chip_is_ulp(bus->ci) ? + SBSDIO_HT_AVAIL_REQ : SBSDIO_FORCE_HT; brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, - (saveclk | SBSDIO_FORCE_HT), &err); + bpreq, &err); } if (err) { brcmf_err("Failed to force clock for F2: err %d\n", err); diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index acb87238922f..839980da9643 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -60,6 +60,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 #define BRCM_CC_4371_CHIP_ID 0x4371 #define CY_CC_4373_CHIP_ID 0x4373 +#define CY_CC_43012_CHIP_ID 43012 /* USB Device IDs */ #define BRCM_USB_43143_DEVICE_ID 0xbd1e diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 4224902a8e22..4332199c71c2 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -42,6 +42,7 @@ #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 #define SDIO_DEVICE_ID_CYPRESS_4373 0x4373 +#define SDIO_DEVICE_ID_CYPRESS_43012 43012 #define SDIO_VENDOR_ID_INTEL 0x0089 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 From patchwork Wed Nov 21 06:57:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692041 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-2.web.codeaurora.org (Postfix) with ESMTP id 91C2015A7 for ; Wed, 21 Nov 2018 06:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80F4F2B97A for ; Wed, 21 Nov 2018 06:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 758042B980; Wed, 21 Nov 2018 06:57:34 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 946592B988 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728136AbeKURan (ORCPT ); Wed, 21 Nov 2018 12:30:43 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728028AbeKURam (ORCPT ); Wed, 21 Nov 2018 12:30:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yszK0sgGuc7rC0dOUh9okPjq2IPBgKxkWQICDZb1kG4=; b=IFzd/y00eBBAOXOL7lJqx++l+WUMaqZ//j2XqiObUIfnMcm3RZjKdELgJHQwueE4qka68n50dKdZkhT/kqvrzERVkymr1ob5eIAKfXXoUWISzNTbDXQr7COFwWiXA0S3Qt5t4MZJ+ao8qB/Y8+ZC5MEnywZLUYhXCqqw0w5cm+M= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:16 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:16 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 5/8] brcmfmac: allow GCI core enumuration Thread-Topic: [PATCH 5/8] brcmfmac: allow GCI core enumuration Thread-Index: AQHUgWdw+wcKRPXid0aREvgv3qBPlQ== Date: Wed, 21 Nov 2018 06:57:16 +0000 Message-ID: <1542783402-112482-6-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:nJ8YVh5XtEk3EH1dY4SsKHMYn8J6IIhMMAXrm4zvCdk8G6n8tHlwzhdAUMkgi/JGuWJHeBc0gAHSz+SRqq1A1ocKvYOiwd1tQymBDOWn/+skfGeafqHByxznd/L4JkIuL37cS0iVXXVXp0a8lo5hFQM1H9TWDRSBEEce0J+GQzLE3aF8w6xkaxkDoj4sblgvae1XCwQn08YIqQzRhJacXCoIZhKozpW5a/ZvJviV9N90yS6shF6EtCIo6K7+YdRmhg4tfze12lmNFWRJ8FBg+tSb7m3+1bjDJ/eBf8qGy628eZge6HXuFKEwHBBrPdwsJbTOT+k44lLN3XXi+V7Hxfjox0DPp0/VdXsGC+RF/XB2grBvgyjuyu0o6X+Rgd7QnS2Dp9MN1ambhLxv8UTOu1HcAe9CFwQAuLn9rDyCUnaNHE35TEG7IK7wa7M7zcC0MhjnKwG7Xr4k7FcylxdUNg==;5:RPyJ1vk2viFcd3sAHLpD3AD3vxYf8mlvzWRWS1r3VgWck/O0YTQogPrItZowGxZ8pReTM2/NiXRh2x4ku0agwZDE3oEEROJCA9MR7xnM531Wrr/XDKURD7Octmy5sjWAD+heEyR7CLZKAJcxg4h12YRJvbAdU4ulJDszCpYN/pI=;7:Imbe/x1pN8en5H7M5uaVkdPzJlffvDnYjI1zzf8HySd0+XEx2S7PSJF/AnlP4Hb1d40NbaBbha5YFuWnwZUbqhEAIDO1Sa9G+U7sXo8L2KR9BKWEMm+/E3NCc73UED9AUO6YFTeqZWUbmiHZhj83Vw== x-ms-office365-filtering-correlation-id: 57cb6549-b3d9-4b12-ee5f-08d64f7e922e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(6116002)(256004)(476003)(105586002)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /TwxIy4aAaopR2JH7YmAJsD4pVonodl8sAjjy9pX9jHi1+4J8NTijka8IZvFv3CIsjs2qMMZQFTE61cIjVks52MaiqdPdfoC/AoyC/dgbMh4u5+gPYGJ/OWfhKagcqQ9yJZ941CDcN5B5MuNK3Gc8HdSPrUQ9OoNen1Jmtv23QJmSNfM7IN2gaWsGthkc+2oU30jIPRCzQ/KNz/9GPyL/ZvJpG6RI4ugg5X+1kYtfeAfgRNWM6GMs26SZV+ut/wPW2T+TzbwGietztNhGnBEWshYtMV1aGv58nHLv497ySVQYO5bWPCHKkltashIEDa53hAfnZg51q1VESQxnfiZfOY67nCeADXiNbsveJwKpMs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57cb6549-b3d9-4b12-ee5f-08d64f7e922e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:16.5589 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 GCI core is needed for ULP operation. Allow GCI core enumuration with below changes: - Allow GCI to be added to core list even when it doesn't have a wrapper. - Allow 8K address space size. - Don't overwrite the address value when an additional size descriptor is in place. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index a3c857721446..a8d3b96b727f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -786,7 +786,7 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, u32 *regbase, u32 *wrapbase) { u8 desc; - u32 val; + u32 val, szdesc; u8 mpnum = 0; u8 stype, sztype, wraptype; @@ -832,14 +832,15 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, /* next size descriptor can be skipped */ if (sztype == DMP_SLAVE_SIZE_DESC) { - val = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); + szdesc = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); /* skip upper size descriptor if present */ - if (val & DMP_DESC_ADDRSIZE_GT32) + if (szdesc & DMP_DESC_ADDRSIZE_GT32) brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); } - /* only look for 4K register regions */ - if (sztype != DMP_SLAVE_SIZE_4K) + /* look for 4K or 8K register regions */ + if (sztype != DMP_SLAVE_SIZE_4K && + sztype != DMP_SLAVE_SIZE_8K) continue; stype = (val & DMP_SLAVE_TYPE) >> DMP_SLAVE_TYPE_S; @@ -896,7 +897,8 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci) /* need core with ports */ if (nmw + nsw == 0 && - id != BCMA_CORE_PMU) + id != BCMA_CORE_PMU && + id != BCMA_CORE_GCI) continue; /* try to obtain register address info */ From patchwork Wed Nov 21 06:57:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692035 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-2.web.codeaurora.org (Postfix) with ESMTP id C1B3B13AD for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B019E2B980 for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A44C82B990; Wed, 21 Nov 2018 06:57:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 B515C2B986 for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeKURao (ORCPT ); Wed, 21 Nov 2018 12:30:44 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726039AbeKURao (ORCPT ); Wed, 21 Nov 2018 12:30:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Be11iNvYxsStvcW9ocCJyVZPVwaCjiR0/zdsd2Gd0E4=; b=eQ7fub3cML26ILButkBE7QVSUQ5q52EN5tjCE3tOU0QsVEpZz85tE6mhEY1HSNq5dvExUlooGdTaUMsgDljUwCeXyyB9a4snMtftPAXpr4NrgS5Y+YL+SYJaFkwLkZdCNejs/J8vCvbaUU+I6e7ePJrN61/HXWFJ6M4ougR7K5c= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:17 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:17 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Naveen Gupta , Chi-Hsien Lin Subject: [PATCH 6/8] brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic Thread-Topic: [PATCH 6/8] brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic Thread-Index: AQHUgWdwe2yhsmset0ib9RfGNrn9wQ== Date: Wed, 21 Nov 2018 06:57:17 +0000 Message-ID: <1542783402-112482-7-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:YQkIvWGx9Gj9eMSLydDhtXhEWyjFMQSJ8mGttEh1htaV26FNacA6GgobzjiC5ggh5uZBfVbS7OO3zCc+Cqld3fDhNUVNWeTFkdoRCTPMRTI534ANg/qzcbA0/j3JJ/9MrpfTD0+/VOTw8xCZuBFVowyGzGlQqiKn1+RWPck7/gyV/ami0lWuqtDwvTv9sh1vUjShdVxHkNyjcDgrHuamJ1k/1MvUQmuVPMm4Ma14Tjeq+q3OGaonO66rBgihKs/fl0waiA3OGeDCg4r/vLzIYbCRvN1GhfaN1SJCOCa9iYt2SyWvaPeCByHIZgjWwQlgEhSkotCgkfziWvxpFWsCBBXX2LGxHyMeY7KT91WrxGuflRA8rn/XyvLhEeXKGzU26wE1/U/Kdieyi8tSKI0tqp53DN/YTzm5H0RjzukCVPwXBQo4HdxR8TpPzQHIIxBANghWh0vScChnvpjy9phMYw==;5:apcwMIDug2CKofgErwg3A9JeJ8ViABUdFv03ADQISAfBSxc9+4yxkmPd/nC9igv5HPCYgDIo7GsbJIefjBAuYmnk1yPZNMqSKc+0rwmQC5P4+cvfOb+QIRDUv/Y6I0meJGytr+viJM7D0jsv43rUPszGDxGfkddzCqQ0aQzFGTw=;7:2juCJh7qwd+uENcbySbcXtxFOipXt9lTz/4WOJ5MMU0zxltHnd2hkZVyyQVK2/bLnouExqBUQEKVsBpnGqNpIM5T3bG75qnyTVwPNJMXr1Xrq8jGRBVOviADdsh76DA1+HFefjVmGT5KLpkk6qcnEQ== x-ms-office365-filtering-correlation-id: 36619185-f51a-4658-0c7b-08d64f7e932e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: adc/2qLU0NhdctK8Q8/UIkthvxj6lsIL8G6yCjx0nkH6PBoJMg3c9OaE0VffL50AD9LG6JpmOfwHmjb+z8DX00PVi9LvMXuGUgMtPzLlpLvIpKEBdg4Bo2iDFfjleLNi7P0txsizIauDkAgmoHxfQzKouAK8Vn5Q17WMb7RfRI++DNnVUviKSKzP6CynFQCRWq2PwuGEYPaKYBiHobiddje6a6xtjEBGOzYdrw8XfZ6d2GX3Xsuk3XFp6BRQArnotfoBwggRuPBtMtslmcnsBwX+cBtxkPN6NQqdBZGBtsrvowFNgLmcLseTPaENv/3iDv8n9k3HVD5z9fmEZqx54+/eAAIgUpWKE4uupZCA3wc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36619185-f51a-4658-0c7b-08d64f7e932e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:17.8246 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 From: Naveen Gupta The number of words that the read FIFO has to contain except the end of frame before sends data back to the host. Max watermark = (512B - 2* (BurstLength))/4 = (512 - 128)/4 = 384/4 = 0x60 so if burst length (i.e. BurstLength = 64) is increased, watermark has to be reduced. This is the optimal setting for this chip. Reviewed-by: Arend van Spriel Signed-off-by: Naveen Gupta Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 73a034172c4c..fe0cb398ab44 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -52,6 +52,7 @@ /* watermark expressed in number of words */ #define DEFAULT_F2_WATERMARK 0x8 #define CY_4373_F2_WATERMARK 0x40 +#define CY_43012_F2_WATERMARK 0x60 #ifdef DEBUG @@ -4173,6 +4174,17 @@ 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: + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", + CY_43012_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_43012_F2_WATERMARK, &err); + devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, + &err); + devctl |= SBSDIO_DEVCTL_F2WM_ENAB; + brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, + &err); + break; default: brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, DEFAULT_F2_WATERMARK, &err); From patchwork Wed Nov 21 06:57:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692037 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-2.web.codeaurora.org (Postfix) with ESMTP id D63991932 for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C45362B980 for ; Wed, 21 Nov 2018 06:57:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B81C92B98D; Wed, 21 Nov 2018 06:57:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 D57122B98C for ; Wed, 21 Nov 2018 06:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbeKURaq (ORCPT ); Wed, 21 Nov 2018 12:30:46 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728028AbeKURap (ORCPT ); Wed, 21 Nov 2018 12:30:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0xYa+rLADLiuDpBLow1a1pM9JOcXqYj3lsA0JNSZ0Yg=; b=y9RRYqbolWWkE1Yvctau3BjfC6gHmoL1rKxK8reRem5BiE+SlxM9H15qhuAVrf+CDPc+ruVIMQNMtgESQZyWe/2sl1D7GxEdtZ5Kkb95EwYznhlGxK7vMErIENdfjv7tjPHo+BmDxkH/6wZwLF8K3QbvNs2ie4PVHPPjpp9Wtyw= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:19 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:19 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 7/8] brcmfmac: 4373 save-restore support Thread-Topic: [PATCH 7/8] brcmfmac: 4373 save-restore support Thread-Index: AQHUgWdxWI/iMdOMSU+hf0zmB52JcQ== Date: Wed, 21 Nov 2018 06:57:19 +0000 Message-ID: <1542783402-112482-8-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:q9hKPDBYk5a/CJJ3mhG96iDkMRUuS077jUSgC/cxVO5mPte4jCVM7XMJpAkhAWmPWPjY87T8C3B9Dmk9tY74EzIiBRK5/XtnCeYjjyZv1zLkP4QK+Yctk7pjcaGQ9XpgCnEm5S66sOQ+SUzyWZkw7HXt8NhstAnZNzMc2YbfRfRgzx9+EMcg4JZ2mvebbYunQPkvfXA/JRYZSTRlEYcWnMRg6XCJdKt+wth9xPGcJSmMvcyy6HYJFevVIwlO8XvDqi1MTz5LCPLdYZ/qPBBzowJIYKNJfEJfOP9VA0XWTHjpKEWsHSvgJRzpUOGOSS/DVAGmc4qsOptEAwfQGVzADbuhcFWOnf3xBf4MALJguRkZBoAPfXZtZYNSpSRddzyn9Zd5au7Yct9edrPrvPiJssMHVx2xq0TDKHqY4R/f9o3fHw4s2hRa6wZfOzUy+7H5t9zGdL/rwrJhbWcOBjoy5w==;5:yMc3TKMs9zfnMndf85c38hQDhJxLCv11WcjGMtdi6t1qf2QV9sAEznNvWzQTLOY1Fb7NbuSV+CSLhtcTkFCR7h7zeCI1KKj3HUllGp0PYELeO7ZUeJAYDYhHCOS4su54V5wFChR/SfJeRc+5ZMtrka7oDEAx9HHOxdGFlH11QBk=;7:s1jqiwl4CDF0pPoP6STT5e8U9632gFPvQpwZkrQu/0dpfsnX3JGjP9pQhPjKdOOxGHWqIgEHLbhhmuS8o17QRsomUqxClPDFqGLbR8tCgRGHTVb5Sh9+FnEL+PFTFDEH1jX6HisUzbnPVleUUgJpLw== x-ms-office365-filtering-correlation-id: 9145d7dc-4987-4da7-b765-08d64f7e93d9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ypiN+LV+9GOs36Bz3ghsbnrNctyvh8TEZtunppV9klEHN8xfAtdUPrzhxuuvYTvwugX2DrZdW5LxlWtojpov8uaBvI1qlArGA4TTufsdS4+15r83tBAxgI4A0+eqlIjvWpjjQ72fZZWqFZZCEJ8Bo8UYbWE1JlwnLOvyjS4vCaNOO/Tnmcj1rD0oBU4i8UG1K4nhCYavVQaBNwGIzMs4Zkv5cIdhXzyXy3TfEVR8E07SC0xmY/qd4th+h/Rc7HQxgTXMLUFnw0orS0K8HRXuR2F25fnLX6fKQ3pg4snWnFvAf3u1GD/sF7gTA0fF+nUZ7wojT+D7+g0tJVN+rm1xBHMXIQKtIuIXNTheHXv8vMM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9145d7dc-4987-4da7-b765-08d64f7e93d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:19.0277 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 Use chipcommon sr_control0 register to check 4373 sr support. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 5 +++++ .../broadcom/brcm80211/include/chipcommon.h | 25 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index a8d3b96b727f..22534bf2a90c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -1365,6 +1365,11 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) addr = CORE_CC_REG(base, sr_control1); reg = chip->ops->read32(chip->ctx, addr); return reg != 0; + case CY_CC_4373_CHIP_ID: + /* explicitly check SR engine enable bit */ + addr = CORE_CC_REG(base, sr_control0); + reg = chip->ops->read32(chip->ctx, addr); + return (reg & CC_SR_CTL0_ENABLE_MASK) != 0; case CY_CC_43012_CHIP_ID: addr = CORE_CC_REG(pmu->base, retention_ctl); reg = chip->ops->read32(chip->ctx, addr); diff --git a/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h b/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h index e1fd499930a0..5b9195d4f073 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h @@ -269,6 +269,28 @@ struct chipcregs { /* GSIO (spi/i2c) present, rev >= 37 */ #define CC_CAP2_GSIO 0x00000002 +/* sr_control0, rev >= 48 */ +#define CC_SR_CTL0_ENABLE_MASK BIT(0) +#define CC_SR_CTL0_ENABLE_SHIFT 0 +#define CC_SR_CTL0_EN_SR_ENG_CLK_SHIFT 1 /* sr_clk to sr_memory enable */ +#define CC_SR_CTL0_RSRC_TRIGGER_SHIFT 2 /* Rising edge resource trigger 0 to + * sr_engine + */ +#define CC_SR_CTL0_MIN_DIV_SHIFT 6 /* Min division value for fast clk + * in sr_engine + */ +#define CC_SR_CTL0_EN_SBC_STBY_SHIFT 16 +#define CC_SR_CTL0_EN_SR_ALP_CLK_MASK_SHIFT 18 +#define CC_SR_CTL0_EN_SR_HT_CLK_SHIFT 19 +#define CC_SR_CTL0_ALLOW_PIC_SHIFT 20 /* Allow pic to separate power + * domains + */ +#define CC_SR_CTL0_MAX_SR_LQ_CLK_CNT_SHIFT 25 +#define CC_SR_CTL0_EN_MEM_DISABLE_FOR_SLEEP 30 + +#define CC_SR_CTL1_SR_INIT_MASK 0x3FF +#define CC_SR_CTL1_SR_INIT_SHIFT 0 + /* pmucapabilities */ #define PCAP_REV_MASK 0x000000ff #define PCAP_RC_MASK 0x00001f00 @@ -293,6 +315,9 @@ struct chipcregs { #define PMU_RCTL_MACPHY_DISABLE_MASK (1 << 26) #define PMU_RCTL_LOGIC_DISABLE_MASK (1 << 27) +#define ECI_INLO_PKTDUR_MASK 0x000000f0 /* [7:4] - 4 bits */ +#define ECI_INLO_PKTDUR_SHIFT 4 + /* * Maximum delay for the PMU state transition in us. From patchwork Wed Nov 21 06:57:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10692043 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-2.web.codeaurora.org (Postfix) with ESMTP id 4CCBE13AD for ; Wed, 21 Nov 2018 06:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ABA92B97A for ; Wed, 21 Nov 2018 06:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EE792B981; Wed, 21 Nov 2018 06:57:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 BFAA52B97A for ; Wed, 21 Nov 2018 06:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728177AbeKURas (ORCPT ); Wed, 21 Nov 2018 12:30:48 -0500 Received: from mail-eopbgr680102.outbound.protection.outlook.com ([40.107.68.102]:59472 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726039AbeKURas (ORCPT ); Wed, 21 Nov 2018 12:30:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n4wbt8nBICgbIJl+8dzvXaFtziMJUVtADxNgY2mnx/0=; b=yI7OJ8suHqI6PfNG2QtrImA9vyHtVrrjkOtOP0GQfkESwe2F0H/Th1Ek3VOouFdgTXJvgfiSyzPzNyc2dPS8MuZMilXrqfkr3Iz6Q65q1J6Tgfhj9r/o3ds36wXadVr9OECz3A5FO/7QTI5j6Gxbalkmg/TzdbrX9X51aVIchGc= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1349.namprd06.prod.outlook.com (10.161.206.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Wed, 21 Nov 2018 06:57:20 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::809a:6ca8:db12:f5ae%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 06:57:20 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Double Lo , Madhan Mohan R , Chi-Hsien Lin Subject: [PATCH 8/8] brcmfmac: disable command decode in sdio_aos Thread-Topic: [PATCH 8/8] brcmfmac: disable command decode in sdio_aos Thread-Index: AQHUgWdyJ4Ei3/WUTEGUmo+sob9JZg== Date: Wed, 21 Nov 2018 06:57:20 +0000 Message-ID: <1542783402-112482-9-git-send-email-chi-hsien.lin@cypress.com> References: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1542783402-112482-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: BYAPR02CA0069.namprd02.prod.outlook.com (2603:10b6:a03:54::46) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1349;6:ZFZECARA8mQuCFs9KhpztO6UnpC8S1yuqBm55asZyQuhiXK744p48yQWIV3I9HbJoIGVMGf1OOpzWFWpCLrsIl77uf85XHG+7LpxJSLhA0bFhOJmiwMo2xxdZteLSbZUkGEjWDF8XghdIuiKYcXAmQOjFIt4DsEPC6sFvDvv7Xjz1ESI8vl59PKL+XeKCnzAibUXWeuxpUoRH5VI+zd8W1q8KZWDX2PF4BP7559ZQXtGjwziIuoGv32D0YFmrlONvgLQp0DL9r14tIeetKFfbUsKE4LOm33eP52CD2lYjPkWQ8/kXimyGWGmv9ItHERHeV/gbGu18Sl/Vk+YX5zh74TtNpfXVwtXFsGF8KjY+X2aFuCDqeEMuLC/R19vHtYR33mw8MweyRGmDTlT8cdMNVt5ufMm/OE5n2NygMkwHOTJFbeMunHoJY/wmNqJVdMSog1zyyc1cAbV9bmdIhqZhg==;5:AQ9r14jt2aPS5QbOVm3h2vQd2LYXbOVyj0mf/ms5ztLBzrzRTglzU0bgTxiYp6bXTZepVlRk+UerZtarlqt2EwFqiTJsaHRPFr5f7wcwm8H8yF8g3SGFlsphO8u5YNxgjSFoWs4qHcYxMImhlTPLhCR867A/AcWsUKl6b0mC/z8=;7:hYWFNwg2nHyrog2DwxIBKdaOnNhnzhZ2sMhPE7gfnCK5DxWG1MNM7JUETCRwk6DWXF2G1BGBHgut43E3sNNqPH4IwW/L/hUm3LNjQ5YXloV2Z0Vd+wtV22kg/scf+APObDeWNExPDNN5q5pT4BMj5g== x-ms-office365-filtering-correlation-id: 958d6b5e-d6b0-4c50-fed8-08d64f7e94a1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1349; x-ms-traffictypediagnostic: BY1PR0601MB1349: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1349;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1349; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(5640700003)(446003)(478600001)(316002)(54906003)(97736004)(6486002)(2351001)(6436002)(6512007)(486006)(5660300001)(86362001)(575784001)(6116002)(256004)(476003)(105586002)(14444005)(3846002)(72206003)(2906002)(11346002)(106356001)(2616005)(25786009)(305945005)(7736002)(66066001)(2900100001)(76176011)(6916009)(68736007)(107886003)(26005)(36756003)(6506007)(8676002)(186003)(8936002)(2501003)(386003)(4326008)(14454004)(102836004)(81166006)(81156014)(71190400001)(71200400001)(99286004)(551934003)(53936002)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1349;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: jRG8CXws0ZvJa9y+uu6oSUDBOs/hm1HUSs/acb4u/EeUYPMudeuDP1DpjVHDOrvdiZXTkIWtUJ01bjnBZlkce7E70XzHUIT6Hg8QJjqWhS83p5CIuSAk8Z2LyymTb4d1RjxRNmJf7h63Ym0BKlZ5Z1Vch248os4VgMZIYkwgjF5NlCOQnvcSYnj1VabQ0/ilTdSriIOkSczXp4jo0I/Ka8/3QlPwuJK0fXpI6zZBWX5EPMNV6qiwBD4bDzBu2mhPKys6FRwoGyZR+LXXOEfrfnYxYNJ7SGfA93GBjXmyobtNQC2JY2hMZ2TEjSiXeO1gc/y8dS42FKDOCU4kwSmWUqA9hdAIbJ6z8rFhW9/z/zk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 958d6b5e-d6b0-4c50-fed8-08d64f7e94a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 06:57:20.2778 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1349 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 From: Wright Feng AOS is a part of the SDIOD core that becomes active when the rest of SDIOD is sleeping to keep SDIO bus alive responding to reduced set of commands. Transaction between AOS and SDIOD is not protected, and if cmd 52 is received in AOS and in the middle of response state changed from AOS to SDIOD, response is corrupted and it causes to SDIO Host controller to hang. Command decode for below chips are disabled in this commit: - 4339 - 4345 - 4354 - 4373 Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Double Lo Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index fe0cb398ab44..0cd5b8d970d7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3354,7 +3354,11 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus, static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus) { - if (bus->ci->chip == CY_CC_43012_CHIP_ID) + if (bus->ci->chip == CY_CC_43012_CHIP_ID || + bus->ci->chip == CY_CC_4373_CHIP_ID || + bus->ci->chip == BRCM_CC_4339_CHIP_ID || + bus->ci->chip == BRCM_CC_4345_CHIP_ID || + bus->ci->chip == BRCM_CC_4354_CHIP_ID) return true; else return false;