From patchwork Wed Feb 16 09:31:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 543577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C116BC43219 for ; Wed, 16 Feb 2022 09:31:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232255AbiBPJcF (ORCPT ); Wed, 16 Feb 2022 04:32:05 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:49070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232243AbiBPJcE (ORCPT ); Wed, 16 Feb 2022 04:32:04 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::61b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A41D99AE46; Wed, 16 Feb 2022 01:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VrRNAx1263jSra6Xo20WmHHSrCsUEoryc9gftVmKgjFyVT2gVIknyUovoIUB2nzuMoRCABv65ReIkfDQMUfWdpbvsZNEb251tP/U1LVmtgQIRqXtDvwIUYqBagFsI6TW1lEYnKcwdjaWNrs/Pal66Uqs5HCZ4vuvDXp61belFICYqOkrXgOyxWG3y5bOU0T/4vaAPYb5R0ZFlxGYvzBzcgm5VgBuNJyhMXN2s4iRa78p9UNFOlPiPTppWkj7qMO6j63kB9OQpd+1LDz+DpXkeNi/LOu7fDfI4TnxgJvpMGP7IOxg175ELJbPFr2/5WVrRZiM/IUPmTiwhr8Ko54eig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PWOwn1GnKjwSy8Gf5ME1ihXMyTNHn/MamwdclytDq4M=; b=ZkGKgfPdBbATXiBctFv5ntWWpAcNMN5DNhoRavym9DV+MRFfQ25WCWksifnYBK2WImhu/9b8dnPdEY9+Q0GTe1bpYfH78V1m5aAlnOiQWnparDL3QXN6lTI9bt7Ffcux8LEpx5gkAsVdZFgsELzRixgftU++b9aBSiwj1lAs3GLbqH3edKUM1063RG4iPGTX+9huDc272GASnZRdr5sV/JXHQlROuqe4jAwyMxjrdyt09HF/vV3Al3sJwwIe/rYC04OP2vOwlyTTi7rlsZJmIwSAJImjgkm4F0k88xJdrjDEYFek1Nta7MPBMiy3/8djUnv2MqH1rvJ8dQJnYs28Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PWOwn1GnKjwSy8Gf5ME1ihXMyTNHn/MamwdclytDq4M=; b=Vw+KvlP/i4capshFhResBwK0nxHT3il20XwPn3xBe7/YIFVCdiGVzJVK5ymxIcbZbxP7fgxFjcn4H4lKeJULolYZ/OjZilyH6OZWL40wRvYYklW/0NgfUYzwRGWmBpmZV7haTeaE4YvCOEGJGJCmVJQ2PaMnkGv6vwnvn3W3k3w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5029.namprd11.prod.outlook.com (2603:10b6:510:30::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 16 Feb 2022 09:31:48 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::1b3:e483:7396:1f98]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::1b3:e483:7396:1f98%3]) with mapi id 15.20.4975.019; Wed, 16 Feb 2022 09:31:48 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , linux-mmc@vger.kernel.org, =?utf-8?q?Pali_Roh=C3=A1r?= , Ulf Hansson , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 2/2] staging: wfx: apply the necessary SDIO quirks for the Silabs WF200 Date: Wed, 16 Feb 2022 10:31:12 +0100 Message-Id: <20220216093112.92469-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216093112.92469-1-Jerome.Pouiller@silabs.com> References: <20220216093112.92469-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0050.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:53::25) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb6d7b26-aebd-46ed-029e-08d9f12f27a5 X-MS-TrafficTypeDiagnostic: PH0PR11MB5029:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Egn3s5uaN5TFiu7vC78cV6ExM2yhApNnmnaxW1kiVtcoZXJAI7xhyY4FRmqZ1QD7n/U0QxsQgEdwXfnhEE9AM7TJdZH6xnktw6n//+CvQrW//KS88HJItOwSX655CxjG986K+tCHPBV+2he9MpDMRsPd4cZ8oCzFGkSQeviLcCLtGglKGigugTaegF8TovEjjSzt7o0VCp85KP0ppAEhWDGM+SQI76pzMQcJtApuQE9gsdYvEcU+HMl+WZFi6oYmdM4hTs+RBvpd8MFsgdxQFdq5ypMRG7KeeIgZkb+Ta0PE0jE2X57FvdUAM1n29E91JwIjGLi5nngSzquyqkUqjTsPAH9uSw/aJqp7m8DaXzv4/zZVn63+31jYPTFyA5ceMww3aQRAOBZfZG1One2DoiT5yBIK1bYVNGjk8ajlH2TVp58TL2OTzuUl/oj1fliIuku21mICotHLx53DX+oKoOoAm7f+4d2VTyQazM05PEvf+uiQiiNE45fbn8x42UiZsmqNJN3gPAFBd9SQo16kKP5kE3xmI5uOkJMBGzEtoCNjLLaEgiUnjPMfpun2HtrlNIVYITToitRBlgw2KZeULPaJfqrOOPJaA1GdbckYGujA2feh0FK0wDlZMJkNbYX9hwZwSG8IraHEXaLjK/eSgLggIa+enRi2KAPBpC1Tb3H3D9r4UtMxhF0Urkp/UJ3Pr1ouBEwfBsmNeMzJ1L6Ryg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(186003)(66946007)(508600001)(6506007)(6666004)(6512007)(8936002)(54906003)(66556008)(8676002)(4326008)(2616005)(1076003)(66476007)(316002)(6916009)(26005)(83380400001)(107886003)(6486002)(38100700002)(86362001)(2906002)(7416002)(5660300002)(52116002)(36756003)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?f5RGETv8xBuc8RxifBOMYVfzHCmg?= =?utf-8?q?3O1y7lTVKyHH6yrfQfNcmsEjJeewx9PKd8P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JIUUDA9d2VvLFQa8lQlGJB+Gp?= =?utf-8?q?fKLXus7e65kUBFH2mMlb+D8Q3uyMLdg382liSt6OA/7EcsJvbjvGt7uUcZJDUXG53?= =?utf-8?q?iWbxsYeYHB3WvEUbEZthW6gUVKaP/F8lD1HXrmYXi6wy5RMpDKosQCbpSbS+zBsc6?= =?utf-8?q?IEyTt2/4zXMLw8ENIPo5FYbwphzHKv85tjzCx1tGqKE9kAOOnVC1ztsanFJLjThBo?= =?utf-8?q?4t3X2OwmSTvd6HMAruMfIwMhr/34CAQfsnVIviSP3UGRtpOtykqthv41Xj+8cbRHr?= =?utf-8?q?AUp3YVHGHScK+zItd84DTRJKMfDNGAdExLG+DNOpTxlgBLIdzW+RurVmIpuQd4Pw1?= =?utf-8?q?50udNdmlJjI2XdjIU/jTy0gwIUrcLYV4pM5mo8zl2OhV5CGDm1TtBc4Vagt0S0IUO?= =?utf-8?q?4KHFB+WdQhW+iF6GFPfMP5H5dQ1FJt1k5xQlBozbsCv4aA7Akm/e01U7o7jHjWclj?= =?utf-8?q?Fs0LKPDiXgwkLfvvRudrBFxeeVwOAEXJjQniXH9a1bCSzNneWuqkMq3Nbo0irzl3s?= =?utf-8?q?oEZWyLR4VTsrLg1TABtJnlbrYLPpLEjdNrWmnHc7mQHaswgv53btyPV0a1kjvxn2G?= =?utf-8?q?h3rDnnuEG5N9F6TMGPuWFuhYi//EEPX03Utl0p6OlmlW7W8WMmW/SZ8=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb6d7b26-aebd-46ed-029e-08d9f12f27a5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2022 09:31:48.1768 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2uYsdyuzISTCjJ1I4tV1lOcMNFoK+7NCZt9Y38uzP9VEqQdeVvyUEHn0ZNQ1PrErZwtxQnrH7SmiU+/Z+qOpQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5029 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Jérôme Pouiller Until now, the SDIO quirks are applied directly from the driver. However, it is better to apply the quirks before driver probing. So, this patch relocate the quirks in the MMC framework. Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT rather than on the SDIO VID/PID. Signed-off-by: Jérôme Pouiller --- drivers/mmc/core/quirks.h | 5 +++++ drivers/staging/wfx/bus_sdio.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h index 20f568727277..f879dc63d936 100644 --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h @@ -149,6 +149,11 @@ static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = { static const struct mmc_fixup __maybe_unused sdio_card_init_methods[] = { SDIO_FIXUP_COMPATIBLE("ti,wl1251", wl1251_quirk, 0), + SDIO_FIXUP_COMPATIBLE("silabs,wf200", add_quirk, + MMC_QUIRK_BROKEN_BYTE_MODE_512 | + MMC_QUIRK_LENIENT_FN0 | + MMC_QUIRK_BLKSZ_FOR_BYTE_MODE), + END_FIXUP }; diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 312d2d391a24..51a0d58a9070 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -216,9 +216,6 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i bus->func = func; bus->of_irq = irq_of_parse_and_map(np, 0); sdio_set_drvdata(func, bus); - func->card->quirks |= MMC_QUIRK_LENIENT_FN0 | - MMC_QUIRK_BLKSZ_FOR_BYTE_MODE | - MMC_QUIRK_BROKEN_BYTE_MODE_512; sdio_claim_host(func); ret = sdio_enable_func(func);