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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 7A8DFC48BCF for ; Thu, 10 Jun 2021 00:03:55 +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 3ACE661001 for ; Thu, 10 Jun 2021 00:03:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ACE661001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GMzYEKc1DItaZ9frxATte7OsiMmMKCIzSREu7j5fMmk=; b=BBvo7TT3WGtdJMpPyRvztjfoTa kIB/2o/gPEcWA9+sX+e5dXh1bMnfM4ziiOBhaBR2z+mfzA9Xk4ow32Bk5WBLNguKt9bOc4cHOZv7v 4l5ViYVpyvAxLAX+sTNk/rU3dKxzYxUF4VnL0A7lZbK8URvsTn+kl9uHm6v16UZBs66GP0IHWRAXd g4YdILMvk4Em0WUP8FqKlwoyevslGmtr8HC+VVgjQgONNBnfx/9lrx974LFxzzTnYZ8ZExQC74CXh vyf/rrRbyK4u9yJNvb5m8wMqM6jBiV+p3THKoiern0mQ6w1NXkCSQQwB4+RC/w6TIHwBboCENHH19 i94+AYAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr87G-00G8AJ-5R; Thu, 10 Jun 2021 00:00:10 +0000 Received: from mail-pg1-f171.google.com ([209.85.215.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr87C-00G89o-1w for linux-arm-kernel@lists.infradead.org; Thu, 10 Jun 2021 00:00:07 +0000 Received: by mail-pg1-f171.google.com with SMTP id q15so21062853pgg.12 for ; Wed, 09 Jun 2021 17:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sZzSiPNuS6HzP3W3kJeux2YhF8hkdCu7Hs+HpWnk32I=; b=g+mnOJ9CPb2aZZkhrxZSjQEA3l0xsT28NQFB8tWfdHx+kD1J02obbOj4obmpXt1Ru0 dssAnA5M4elwWQW7f0NTx2UP273vVpzNCCRZj80dHfdkUumjBuKwmAhFyPMk9M1y++N3 e/cDpxK7XCgTerPLo3tVhrsZR0biCzSYfQZjz/Tg9GurHsOdhkUhpkXG4dv09Q478gJk FxAcCXTP3Y0ZNqnxYoaAHmChIciPilU753kDk0dvklM8xp0FydoO/Z2SvUGulTK3ZMZz BtcHPLj5FlienrXMZmOJJtoANDOjxuu1FN5VGKv1myOQNTfl8VA/5A224xY02mbXc2N+ Fx0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sZzSiPNuS6HzP3W3kJeux2YhF8hkdCu7Hs+HpWnk32I=; b=E03pj7PybmcA6Om+XEllnIu1M3wgl5VL9J8mVn5/bU8t0bDogbKzJjwihVCHo8pRvX 5khppjbIjR+TZ6xsOnL288t31tfjplngv7g3BvvGTRTa2Jp+cHDeX08gluFb66Csu53/ +XcU7BbzcEbpQUHfWNZdDLecxweq+vvLAa5axmmejS/FDWyUudikHNiHYh+y9tFnWrix sFV4MX6x7WfYCfQrJxt4sHDKUiOyYEWvspauzyQyo78SukcYIrZYsA+imlU+A4nQAGqL uaXqQWamGtHStekk04kA+0/xCqp2NiuNQCYBiwqc3upyqhnzBKh83Wq7ZQNOGAMT9/5H OP9w== X-Gm-Message-State: AOAM532gbVGJV0UhkhuNlKEQQW70FhqZv9gX/AQE6dxea1Zu8H0RPvFX CL17PujIFIySTvm70YjNWPHdixb7erQI9w== X-Google-Smtp-Source: ABdhPJwgXo7n2Yno/auZncv+or4D/adXE63ZaZroShaZjM5hYoDhPmOuGVGxmf0W81DyS+VuzrBqAQ== X-Received: by 2002:a65:6118:: with SMTP id z24mr2130369pgu.325.1623283144265; Wed, 09 Jun 2021 16:59:04 -0700 (PDT) Received: from [192.168.1.67] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id r11sm742619pgl.34.2021.06.09.16.59.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 16:59:03 -0700 (PDT) Subject: Re: [PATCH 2/2] mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 To: Ulf Hansson , Florian Fainelli Cc: Al Cooper , Linux Kernel Mailing List , Adrian Hunter , BCM Kernel Feedback , DTML , Linux ARM , linux-mmc , Nicolas Saenz Julienne , Ray Jui , Rob Herring , Scott Branden References: <20210602192758.38735-1-alcooperx@gmail.com> <20210602192758.38735-2-alcooperx@gmail.com> From: Florian Fainelli Message-ID: <6acd480a-8928-89bb-0f40-d278294973a1@gmail.com> Date: Wed, 9 Jun 2021 16:59:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_170006_137576_F8F0F573 X-CRM114-Status: GOOD ( 21.69 ) 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 6/9/2021 2:22 AM, Ulf Hansson wrote: > On Wed, 9 Jun 2021 at 05:07, Florian Fainelli wrote: >> >> >> >> On 6/8/2021 5:40 AM, Ulf Hansson wrote: >>> On Wed, 2 Jun 2021 at 21:28, Al Cooper wrote: >>>> >>>> Add support for the legacy Arasan sdhci controller on the BCM7211 and >>>> related SoC's. This includes adding a .shutdown callback to increase >>>> the power savings during S5. >>> >>> Please split this into two separate changes. >>> >>> May I also ask about the ->shutdown() callback and in relation to S5. >>> What makes the ->shutdown callback only being invoked for S5? >> >> It is not only called for S5 (entered via poweroff on a prompt) but also >> during kexec or reboot. The poweroff path is via: >> >> kernel_power_off() -> kernel_shutdown_prepare() -> device_shutdown() -> >> .shutdown() >> >> For kexec or reboot we do not really care about power savings since we >> are about to load a new image anyway, however for S5/poweroff we do care >> about quiescing the eMMC controller in a way that its clocks and the >> eMMC device can be put into low power mode since we will stay in that >> mode for seconds/hours/days until someone presses a button on their >> remote (or other wake-up sources). > > Hmm, I am not sure I understand correctly. At shutdown we don't care > about wake-up sources from the kernel point of view, instead we treat > everything as if it will be powered off. The same .shutdown() path is used whether you kexec, reboot or poweroff, but for poweroff we do care about allowing specific wake-up sources configured as such to wake-up the system at a later time, like GPIOs, RTC, etc. > > We put devices into low power state at system suspend and potentially > also during some of the hibernation phases. > > Graceful shutdown of the eMMC is also managed by the mmc core. AFAICT that calls mmc_blk_shutdown() but that is pretty much it, the SDHCI platform_driver still needs to do something in order to conserve power including disabling host->clk, otherwise we would not have done that for sdhci-brcmstb.c. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel