From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 0F87FC4338F for ; Mon, 16 Aug 2021 14:02:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D789460EFF for ; Mon, 16 Aug 2021 14:02:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D789460EFF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yHo991Epfnl9PMHHoH61oBX58BTLUSU3lLiw48PwIG8=; b=GRc9CF+eYMM0Xx LPkxpTLoDI3pCZNR+LRJVZ5uVMi5o06S4A8V8yAmoc/nFi8ydkJP4jjWEz5aNXnqYS05JdZ+IxMap v7WUz+o7Yyfj09wF+c1G1vE6cDjlfpUm+jY1olVenFNPHC8wVrvmbsC+p1QDaRQnmRu70gYNHS1o1 /zU8K6hNg9niVbu7vabJDdAza2U/rrovbrBi9QVhJpAD0SUSWiS51iafnH/dPjnczlHExCLOuF2c8 6tbVAv/VTQMsHNRKwGGxVo2+nkuCXOVvEm6/bqdMy+UHXEt6TbVPPBAYImfzZ0kgWWT5pDSjyYPZy J76LEo6vMn61t6HKrzdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFd9c-00HCl2-Ol; Mon, 16 Aug 2021 13:59:52 +0000 Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFd9T-00HCi8-DY for linux-arm-kernel@lists.infradead.org; Mon, 16 Aug 2021 13:59:49 +0000 Received: by mail-vk1-xa33.google.com with SMTP id j196so2572267vkj.2 for ; Mon, 16 Aug 2021 06:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FdgGtEcfAftNEDhyiW7J0wv4uiUYCUUhbtGTkeqqBj0=; b=lXKpKdwU/nxzKYQu0JVky+cOTbWt+XOYcwQewi4hNmjyGw32W8JHdNNw5R06zrZX8f kqNJOtrzz+qdGHVlmuofDwd6Cg4iYaEDYF3/SCa2bCbZCdE1lF3fLJ3JBp3hACPglTJT A93yJ6+i4J53clV+LyQqSs0HxAHMSlOjhfXtSHbSiJqq+n1F5onPinGmdkSPMFD8JKVz Fo9/1bsOeqLTzS2/r3eTliVo3Nq/B+ZEbbNfeXBc459bnWFw6IikOjymXWlGVSFJ7nNy 4CZLQ2UNZUIspK7G6UzZNB4hA66/S4sbFaHvlo3FMh6zLXGpAj1xuwPQEk5mEJXIu+l4 tAQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FdgGtEcfAftNEDhyiW7J0wv4uiUYCUUhbtGTkeqqBj0=; b=Bn20eoakDf2eUzb0cN0clJv4pAtVGKzKPY2A9DwRFDKpB/eCn6gk4FDUttfb+OnqBg 6aNETE4oGrcx0RwM+TnC/+eVAxZqrH1PE7//v5rvXShVMWQPa6aBL2Hmz7+4RAQwY1YR W6NQSp9mjSYU/wHYDt4zEDbuXPIMFZOgOidk/ErOO0cW+5iStBBg1zBEq9TPlyLw9brQ H9z9Uhr+yv0ACaPI1XItCM5tPX3JRNloVHenTvYRCUlKm5uxbBCY8Q7vu7LKD+52JWhm 9bg+7FGfehZpsPGmYtBpmmbRfLwfeAMJ7xOX075GLLecsIgrlvBFQYsEvFkG49EXa0FD 3VjA== X-Gm-Message-State: AOAM532uqI4r9WBQVBl3DAxYsByHeGH/XNCrSqo/SUaJY34yW7vLoXXL 42zGeXhTo/e9Sfc4eIaoQWS9JdaHtvNA6xBwQWBDAQ== X-Google-Smtp-Source: ABdhPJzBDfAgbW3pX7xmLsi5xJsPnYsejXMV3ITpbiRQm364lNRmYgHbWPp2xsFr8ZkGvwB2htEA73RIlio9ZyQA8vI= X-Received: by 2002:a1f:a301:: with SMTP id m1mr8844692vke.6.1629122382002; Mon, 16 Aug 2021 06:59:42 -0700 (PDT) MIME-Version: 1.0 References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> <1628334401-6577-5-git-send-email-stefan.wahren@i2se.com> In-Reply-To: <1628334401-6577-5-git-send-email-stefan.wahren@i2se.com> From: Ulf Hansson Date: Mon, 16 Aug 2021 15:59:05 +0200 Message-ID: Subject: Re: [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 To: Stefan Wahren Cc: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ray Jui , Scott Branden , BCM Kernel Feedback , Maxime Ripard , iivanov@suse.de, DTML , "moderated list:BROADCOM BCM2835..." , linux-mmc , Linux ARM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210816_065943_465420_EE5000EA X-CRM114-Status: GOOD ( 24.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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 7 Aug 2021 at 13:07, Stefan Wahren wrote: > > From: Nicolas Saenz Julienne > > 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 > 100 kHz. > - BCM2711's core clock configured at 500MHz or more. > > So set 200 kHz 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 > Signed-off-by: Stefan Wahren Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > 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 cce390f..032bf85 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 > + * 100 kHz. > + * - BCM2711's core clock configured at 500MHz or more > + * > + * So we set 200kHz 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, > -- > 2.7.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel