Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1972803rwe; Fri, 2 Sep 2022 06:49:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR5PM/KCKRHWCVRIdhEtfbymV0+1XpvoV26juV7QG9vrj8I+sGgR2KGXdlk89lzklcXlLSWq X-Received: by 2002:a17:90b:3a8d:b0:1fb:1487:1cca with SMTP id om13-20020a17090b3a8d00b001fb14871ccamr4908396pjb.196.1662126574580; Fri, 02 Sep 2022 06:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662126574; cv=none; d=google.com; s=arc-20160816; b=j6dpjIF1gcJIUWQouH/4084myrL2PUi4KmPKcnYvbE/B9Yf0+TRohTH3RdJVJPRQR6 7xtgtLKvlQZFI7A357FQbKmrtqxQg3/6a2b5hsFzQckirM6D1IjvOw6uyQqk6gy/k5Mv T16cf6bxPT4Vy8gNeZuM2YMnJ5eeIIm0+mkqRkwP9YzHcG1KPNvyXkl1ULJU1f0BRujs cgNksaxB90b+vJzB4S3o8hAnbhLZ8uySd2s8X/JTqJ9/zLKpLbQVVBQkDYfYEvahu685 OKtrPDEOOhbNjOIcX3NbJI+kfXS86ORJa4naiAGn5VwNuNAQfE/1F23w+lfYXNGXMzwC vC4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wU0I09XZiTMY9mlCAlqPIZ+FhMqy9/F1LiQMsIkjapg=; b=sARsZsynRAz0nezQZr50ZQ/9QhzgS/Sf72ZyrrYbDtqde3pnFEbGr0CJV+Vpkrh9sO tVauYQN4QDEsDrIYsokZHSS0pZLxZuefQhK3JNz9XE6zcdKP/wdssfS7cbiKRkIRMdQD ig39mLC4r43P6gBKsm/Xu1pmSB6pGpORpM9nHBFbzPaRj1FPlQtDzBEDc5Ym7+/e7dBu ppfDqbBtRp9gqACCFKLLoMTBRV8sD4U9rOJEou2mTM2UXcXNBmql2kTqVgqfgWHPsVID 0c0oPohHRazyeOwyN/hFXqls6zIV1DBRsx7zwYOIjTfAk89UECntl+tjQ8akHWNjhorA YCKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D969sbdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a056a00238400b0052d586f19d5si2280157pfc.183.2022.09.02.06.49.14; Fri, 02 Sep 2022 06:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D969sbdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238290AbiIBMzv (ORCPT + 99 others); Fri, 2 Sep 2022 08:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238116AbiIBMxv (ORCPT ); Fri, 2 Sep 2022 08:53:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB4C5FAC75; Fri, 2 Sep 2022 05:38:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 865B9B82AD7; Fri, 2 Sep 2022 12:37:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2DF8C433D6; Fri, 2 Sep 2022 12:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662122255; bh=offp41GCZkSMjK/menYUEckaRbWIdkOoLjZE3dJk2QQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D969sbdjz2kYDxvB78BoiiwBGhe4q4ksIE9136v9PIqb6XAA6kXSVT8CHXA7KcrXq parCqHpHi9ft8VqA4ScCHAnMOx+CHM1Oih6PsrLwZvMjd7KAB6OXxCH3qWlO7PqSu8 MX6rgB9EC3hoD1Ws9hBsWaSCWujpyUbtA9RT/MUQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Woods , Liming Sun , Adrian Hunter , Ulf Hansson , Sasha Levin Subject: [PATCH 5.19 31/72] mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC Date: Fri, 2 Sep 2022 14:19:07 +0200 Message-Id: <20220902121405.816702291@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121404.772492078@linuxfoundation.org> References: <20220902121404.772492078@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liming Sun [ Upstream commit a0753ef66c34c1739580219dca664eda648164b7 ] The commit 08f3dff799d4 (mmc: sdhci-of-dwcmshc: add rockchip platform support") introduces the use of_device_get_match_data() to check for some chips. Unfortunately, it also breaks the BlueField-3 FW, which uses ACPI. To fix the problem, let's add the ACPI match data and the corresponding quirks to re-enable the support for the BlueField-3 SoC. Reviewed-by: David Woods Signed-off-by: Liming Sun Acked-by: Adrian Hunter Fixes: 08f3dff799d4 ("mmc: sdhci-of-dwcmshc: add rockchip platform support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220809173742.178440-1-limings@nvidia.com [Ulf: Clarified the commit message a bit] Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-of-dwcmshc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index f5fd88c7adef1..335c88fd849c4 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -296,6 +296,15 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = { .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, }; +#ifdef CONFIG_ACPI +static const struct sdhci_pltfm_data sdhci_dwcmshc_bf3_pdata = { + .ops = &sdhci_dwcmshc_ops, + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_ACMD23_BROKEN, +}; +#endif + static const struct sdhci_pltfm_data sdhci_dwcmshc_rk35xx_pdata = { .ops = &sdhci_dwcmshc_rk35xx_ops, .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | @@ -360,7 +369,10 @@ MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids); #ifdef CONFIG_ACPI static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = { - { .id = "MLNXBF30" }, + { + .id = "MLNXBF30", + .driver_data = (kernel_ulong_t)&sdhci_dwcmshc_bf3_pdata, + }, {} }; #endif @@ -376,7 +388,7 @@ static int dwcmshc_probe(struct platform_device *pdev) int err; u32 extra; - pltfm_data = of_device_get_match_data(&pdev->dev); + pltfm_data = device_get_match_data(&pdev->dev); if (!pltfm_data) { dev_err(&pdev->dev, "Error: No device match data found\n"); return -ENODEV; -- 2.35.1