From patchwork Tue Apr 6 10:48:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 12184825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 080E1C433ED for ; Tue, 6 Apr 2021 10:51:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D680610C8 for ; Tue, 6 Apr 2021 10:51:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D680610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uemB8yTxoKwf3c0CCEh9d+3gX6HEolqlhKPxjZWnJBg=; b=KDVGd1Pyi/N1KYKcGdJh9q8XU cpZH1rjGKQAQ5dOZJqROSB+z1g+RCJ+5mpYWryzxYU8GgtbrofzTb376IKrPuRkXO7BfgiEkAMmCR sm+MPqQPw26G1zu+YoxDmvNLd4Do7lHEEhEQaNlHNNMlkxGRzBi2zAV+x1cIXF4RQK4EHWeHNcWLe TqZGWBgvSYX8Ybm4gJxNGz6xMom65we75zg58833gAMlrHwKJvmPXi7qMd1H3RXJpGzsGXzE1yeEO wYgiVSUL46707Iz5AJB/G1R0d9D+bXFy2X9XvYcYAtLnYsxjqPLcbpiRAi+hQF6PF0m2+Nw8r5vnp C8y3W3WQg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGI-002DNX-S8; Tue, 06 Apr 2021 10:48:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGE-002DMd-Hd; Tue, 06 Apr 2021 10:48:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C016610C8; Tue, 6 Apr 2021 10:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617706121; bh=L4xi4dGURAattxUGGVtS9EHjtxImRX8+XaMDYzyZAsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=STKb3zn+IQ46VC9iF2YCpecy7xukt4SjljXqLQLtYyX6Vcv5qS1WGPpG/cT4o99k4 QqtZ/9qMPHKdOLrHc5QSP/mqWZ9scWunigDuU8lBUCE9uY28a2FDJlQjvNnSiCLTk5 tEW8SiyeFCbtpcOOTznX+g/cRTLZn2gFEODesabhON5FdxMHQnkcLpPA50NzgOoGm+ 8jh6g0gaD+IPLNMPliQuBRd0q9yo5rSOz2GxRyS14fGQW8yi3T9vdZ362AsRRRsvWu qEz/MAXdauRm6Tucx8w65lWu9BuvDaED3exillYJ+xwmj3b8Cmzw4TbgMr7L57Nis5 DfA67YqhFYM6Q== From: Nicolas Saenz Julienne To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Ray Jui , Scott Branden , Saenz Julienne , Ulf Hansson , Stefan Wahren , Matthias Brugger , Ray Jui , Scott Branden Cc: f.fainelli@gmail.com, phil@raspberrypi.com, tim.gover@raspberrypi.com, adrian.hunter@intel.com, alcooperx@gmail.com, nsaenzjulienne@suse.de, linux-kernel@vger.kernel.org, robh@kernel.org, stefan.wahren@i2se.com, Rob Herring Subject: [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Date: Tue, 6 Apr 2021 12:48:01 +0200 Message-Id: <20210406104802.20898-2-nsaenz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210406104802.20898-1-nsaenz@kernel.org> References: <20210406104802.20898-1-nsaenz@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_114842_972494_A3E6D610 X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the brcm,iproc-sdhci binding to DT schema format using json-schema Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring --- .../bindings/mmc/brcm,iproc-sdhci.yaml | 63 +++++++++++++++++++ .../bindings/mmc/brcm,sdhci-iproc.txt | 37 ----------- 2 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml new file mode 100644 index 000000000000..6f569fbfa134 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom IPROC SDHCI controller + +maintainers: + - Ray Jui + - Scott Branden + - Nicolas Saenz Julienne + +allOf: + - $ref: mmc-controller.yaml# + +properties: + compatible: + enum: + - brcm,bcm2835-sdhci + - brcm,bcm2711-emmc2 + - brcm,sdhci-iproc-cygnus + - brcm,sdhci-iproc + + reg: + minItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + description: + Handle to core clock for the sdhci controller. + + sdhci,auto-cmd12: + type: boolean + description: Specifies that controller should use auto CMD12 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + mmc@18041000 { + compatible = "brcm,sdhci-iproc-cygnus"; + reg = <0x18041000 0x100>; + interrupts = ; + clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>; + bus-width = <4>; + sdhci,auto-cmd12; + no-1-8-v; + }; +... diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt deleted file mode 100644 index 09d87cc1182a..000000000000 --- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt +++ /dev/null @@ -1,37 +0,0 @@ -Broadcom IPROC SDHCI controller - -This file documents differences between the core properties described -by mmc.txt and the properties that represent the IPROC SDHCI controller. - -Required properties: -- compatible : Should be one of the following - "brcm,bcm2835-sdhci" - "brcm,bcm2711-emmc2" - "brcm,sdhci-iproc-cygnus" - "brcm,sdhci-iproc" - -Use brcm2835-sdhci for the eMMC controller on the BCM2835 (Raspberry Pi) and -bcm2711-emmc2 for the additional eMMC2 controller on BCM2711. - -Use sdhci-iproc-cygnus for Broadcom SDHCI Controllers -restricted to 32bit host accesses to SDHCI registers. - -Use sdhci-iproc for Broadcom SDHCI Controllers that allow standard -8, 16, 32-bit host access to SDHCI register. - -- clocks : The clock feeding the SDHCI controller. - -Optional properties: - - sdhci,auto-cmd12: specifies that controller should use auto CMD12. - -Example: - -sdhci0: sdhci@18041000 { - compatible = "brcm,sdhci-iproc-cygnus"; - reg = <0x18041000 0x100>; - interrupts = ; - clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>; - bus-width = <4>; - sdhci,auto-cmd12; - no-1-8-v; -}; From patchwork Tue Apr 6 10:48:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 12184827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F40C433ED for ; Tue, 6 Apr 2021 10:51:09 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C476E610C8 for ; Tue, 6 Apr 2021 10:51:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C476E610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r7EkwWInT+Nqaw5Lk5U6eY7kEWq9EaPVMjvu6lUduTU=; b=XsfYsWpNcyX2EMmRWPNhYlheG ydVQrriXxyNjdwNwZtZ993zNL3tnK2Rj8Ivg/JbFln9WeSNYouQwfp+mplq0NcGioCFCR5mZMN1YL I7PEJ8xnHyp2IfT17oONCutZ86OSUGF7p0gV1Ta776bNJjczHuYF4YHSpJVkzW+QyDVI96GCSi5we +y5vzS0jDnBxNxniG7M+Ym1JK3+a1RErJRnc3+LNZGlSgm4LRDXhmfLZX1o2nmTKDup2BGugJEnrZ nwgD+36AX5T4LJs/LiIcxlWLFjkOR6prNIRJdhXkGeHRHEVqkKHJX6JXUedq+fLURdpSe5eQDT06K PgGD6S0FQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGa-002DR9-7w; Tue, 06 Apr 2021 10:49:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGW-002DQ7-5R; Tue, 06 Apr 2021 10:49:02 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E0FD610C8; Tue, 6 Apr 2021 10:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617706138; bh=qH4KlpaZXLeo2J5NteL1furYr39Wn2/e7YBQvZKZESc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dVRyE1WbaMTjFkrR5clNrNDxUIaRmixlwQprgIidabaDwFG8bmijxKxpCWWSzKyXK sFASHJ2X+6gHsyXkWF7Nivu28WqPx+iz3LE2Siq5X8L8E79nIJS4sF58tODTN6gC8g HXWF+aKsNeWQgnAAyHcftnfh6P0MYB4gKK1XagQdEt6tHrcSKUgtEZI7+jPt7Tkt0a HC4J2d5H30sANrWPPSpPywcaj6cGA6kGLBNp9y3CkPJhuxL5br26kUDWJqKYpU94Kg GHa4b+XeUmnExuSB/xkzqbeiugGhnrlRRYCi/0vbXo9T5H6TnutHwhvGuMTEdGbk7F Zskuuao/RoAoQ== From: Nicolas Saenz Julienne To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Ray Jui , Scott Branden , Saenz Julienne , Ulf Hansson , Stefan Wahren , Matthias Brugger , Adrian Hunter , Ray Jui , Scott Branden Cc: f.fainelli@gmail.com, phil@raspberrypi.com, tim.gover@raspberrypi.com, alcooperx@gmail.com, nsaenzjulienne@suse.de, linux-kernel@vger.kernel.org, robh@kernel.org, stefan.wahren@i2se.com Subject: [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Date: Tue, 6 Apr 2021 12:48:03 +0200 Message-Id: <20210406104802.20898-3-nsaenz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210406104802.20898-1-nsaenz@kernel.org> References: <20210406104802.20898-1-nsaenz@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_114900_532923_04825252 X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is a known bug on BCM2711's SDHCI core integration where the controller will hang when the difference between the core clock and the bus clock is too great. Specifically this can be reproduced under the following conditions: - No SD card plugged in, polling thread is running, probing cards at 100KHz. - BCM2711's core clock configured at 500MHz or more. So set 200MHz as the minimum clock frequency available for that board. For more information on the issue see this: https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne --- drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index ddeaf8e1f72f..1ef888e91f73 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host) return pltfm_host->clock; } +/* + * There is a known bug on BCM2711's SDHCI core integration where the + * controller will hang when the difference between the core clock and the bus + * clock is too great. Specifically this can be reproduced under the following + * conditions: + * + * - No SD card plugged in, polling thread is running, probing cards at + * 100KHz. + * - BCM2711's core clock configured at 500MHz or more + * + * So we set 200MHz as the minimum clock frequency available for that SoC. + */ +static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host) +{ + return 200000; +} + static const struct sdhci_ops sdhci_iproc_ops = { .set_clock = sdhci_set_clock, .get_max_clock = sdhci_iproc_get_max_clock, @@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { .set_clock = sdhci_set_clock, .set_power = sdhci_set_power_and_bus_voltage, .get_max_clock = sdhci_iproc_get_max_clock, + .get_min_clock = sdhci_iproc_bcm2711_get_min_clock, .set_bus_width = sdhci_set_bus_width, .reset = sdhci_reset, .set_uhs_signaling = sdhci_set_uhs_signaling, From patchwork Tue Apr 6 10:48:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 12184829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8733C433ED for ; Tue, 6 Apr 2021 10:51:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42DB3613C6 for ; Tue, 6 Apr 2021 10:51:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42DB3613C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wz/hjHF45uiJJzLoOmcDyjzhQGUi7FvXA3W7pwxo+LM=; b=O3Jp2ypSJsXYZVnXUxNQ7RhnR NdXaSe5NnGl24Zmr3LPd/X1u+mytZCJytksW9byKZ9UPthDLl3hS4HHFBwzGlBHHkL3HgZZTrZxeW o4dGSChXed8/1s3JFkkcAan5nAHoZefYjSCITrVXU5H9ov5HprKPBsSIhG84M3Ybr+ZCJU8fmi8MV 0cD2PES+lJoOJPpoo9i/wIOLYe2It7pBxVZ7mEhT7pWfMohKlpkNGvFaLqAsvvqzhp6gMIA8rMmB+ scYYDi8BYgFBdP1Yq/GMXGnnCBKKg+gNlmj2Pl0D3n+T8Zk6dJl4BK3kL7FKejS6HiaWEO5vsg7di bpuKjkISQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGk-002DTW-Jf; Tue, 06 Apr 2021 10:49:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTjGf-002DRu-T6; Tue, 06 Apr 2021 10:49:11 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CC99610C8; Tue, 6 Apr 2021 10:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617706148; bh=DFk3dXLYmsPJjfudy+xMdqagxU7hU8tqH5bkWHWtwnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tFilJV3I5rZ6iIRvPY7OMr8e24p4PCHsJ9fqFmMwmXsdvnBPTAkgmmAIPf/axYU/N SufOyO6rPvvJZOQaHEXlI3bdj/1iiYFIGiUOhM4BP6eOx1SbL6qBmVPNyBwtMrb2jM TIxPbXUJ+7PrWAh2ApmOK7eNyBNRtKS+lnIZlo6KYt/oDT3hwlq1J+o4H/3SAbUJ/y 7LmZEbdSNm6hom2XkRJOl8t64xBHAGGxmoqC4l6dQZzDiN9gOYOVdXsvn/DD1UCfSD QfiIBdJkKHppOI51tcu2aTQbDteQZifT+RS7ckx/FbFklYYMFveIoGVRL6kT0WOZf4 /q93FGDWKYBUg== From: Nicolas Saenz Julienne To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Ray Jui , Scott Branden , Saenz Julienne , Ulf Hansson , Stefan Wahren , Matthias Brugger , Adrian Hunter , Ray Jui , Scott Branden Cc: f.fainelli@gmail.com, phil@raspberrypi.com, tim.gover@raspberrypi.com, alcooperx@gmail.com, nsaenzjulienne@suse.de, linux-kernel@vger.kernel.org, robh@kernel.org, stefan.wahren@i2se.com Subject: [PATCH 3/3] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711 Date: Tue, 6 Apr 2021 12:48:05 +0200 Message-Id: <20210406104802.20898-4-nsaenz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210406104802.20898-1-nsaenz@kernel.org> References: <20210406104802.20898-1-nsaenz@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_114910_116118_9852F44C X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The controller doesn't seem to pick-up on clock changes, so set the SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency directly from the clock. Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne --- drivers/mmc/host/sdhci-iproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 1ef888e91f73..31f61ea474f0 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { }; static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = { - .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, + .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 | + SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, .ops = &sdhci_iproc_bcm2711_ops, };