Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5004481pxj; Wed, 9 Jun 2021 07:07:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9J7+mW47ECq6Wewb3KMxF2Lem5Jox+2xNeS/9FhFyj3ut4Ijv+Ns1ZgASit7pyWCPMnWp X-Received: by 2002:a17:906:5049:: with SMTP id e9mr78001ejk.30.1623247667871; Wed, 09 Jun 2021 07:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623247667; cv=none; d=google.com; s=arc-20160816; b=pZDKDoGjNNIsOgsdCeUk772v5rk2WLTQWVanIF7Bm0E8z7AKiLUnTu7I1RU84kV93s 7txYW9NVr1QGuHYCUuuQpbNLpkkHP/svQXMG521fVdi7VXixfxATHe9ktgjuKst+RH20 dVweayBUrXkRVYMUF4kqAGUXK81OJ9tHOOL5PCjWOHU40EgmoOVea+WlX0NKUSYkRN6P 5nBdfd58Eh2aGC2manfqTnQqyJK+DEzvNIj6iuZEV8S2GCl2p689OxfO1hQp5eXGwd5I ouWpJ57CQQX7goRxIjIyAMieu2OcPIttQbdsfe7VVXQjYHOswsA+UpKLL0eMthpnZLpC Vzew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=g0YZpXNbvNe/aSIMfW/fwl9JTlg+qPtxAYhHQZpkJJ4=; b=x5Z2Q6HUflwkMwUZ+au+JgfS6XMMOAraItUcubVT6oH3ijDM0iWaRB0IBqHVZghm1G P3VO8cybdK9wBFQ1+93Q4a9cf/xOLdEC525WTozu127zgxbUFP342qu9dirgTDLogfxW Nwr1feVrjoPrR9xNZv2K0GrH/lnBMOo2jXulxSb8IIlXRD3JipCKHjnRoPjKrbsV8vvC X6+Ec41Lf6aZQcq8z1ltw7X5Ke2zqvyRjVWl3EA7Jwf4V8t+oMCVFAfSn2aOtF6ZFG4e dIb66arHeGPN3y09yGgzVenk6T3Rcz/TPbKKNl9jtNYMIO6+l/3rj0M6aQENkEYKNz/d d+aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CyVtn6ZS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si2529958ejd.10.2021.06.09.07.07.23; Wed, 09 Jun 2021 07:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CyVtn6ZS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237978AbhFIJZB (ORCPT + 99 others); Wed, 9 Jun 2021 05:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbhFIJZA (ORCPT ); Wed, 9 Jun 2021 05:25:00 -0400 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E3F4C06175F for ; Wed, 9 Jun 2021 02:22:52 -0700 (PDT) Received: by mail-vs1-xe31.google.com with SMTP id f21so10763689vsl.4 for ; Wed, 09 Jun 2021 02:22:52 -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=g0YZpXNbvNe/aSIMfW/fwl9JTlg+qPtxAYhHQZpkJJ4=; b=CyVtn6ZSLRs1oFQym5BtCew3deGCkiBozlrFzkPIiKz5Rb7UCB26M8AyNnmSisKHTr F1/le1gMmi0RFt6NQF0eucGdqRZgkKDwvYbOOjVt8bCBLLIf3lTcakxEWcNDLAB89nKG 4IosI3wPfmZwZhHQSynroTq0O6TTShBe35D+FTlwBf+3t0N1a7XKJ8lXf9U7PYgbVrP7 Tb53lyrs2E+NfzJ/u1vOGHtJLC35qtzM1KkFafmPlmXLBKlKUVybXKgcVnniOCWnuMZX J7CXv8iAEtf6FD4DSZOqz4p97tUD7Kj0xj5QL8CMLT6Wb8/FNP0Y5e8EGjMm/b1enD4B GOuA== 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=g0YZpXNbvNe/aSIMfW/fwl9JTlg+qPtxAYhHQZpkJJ4=; b=FSuWnGA9aKAWPCIfi0VAHjx46Xg6oGIo1BpIgCCx8hW0I8hAvZROYFeLL9HOLX2syh n9/d9VpYTjtZabwYQmkxAnpnOqlffLW5X6e2rAnfUWFOZz9yfNbocK8uQba7EH0qYfEX xvoKRYuLjVgpMlwWP+u2f/zPiPfeOkZV0zLp/7ZBhrLJ89kPhQssp1KdtFUUxwWBB31t 1Vkc1N8JNBQsOZxRvwSrUroedMhNXTb0B/RbL6+gzLWkSxyH4aqWsi7rQibvgC4KpMQ8 aGLIfxBebY3pcJsR/Yg0F7+ikaekupEbJqsS9pmKDJIEfJBcX/a2HiVTIbXUFsLyTn2H U0ZA== X-Gm-Message-State: AOAM532t8jAKVcx4rVLSvEDD94m5/zCu2UD9KB3qLtMeRTf0ZSttOuxg UCOFKZ+KUwtWv/nz565n5T/TEqw7pjCbyZ59ITc8ng== X-Received: by 2002:a67:e359:: with SMTP id s25mr3243979vsm.55.1623230571541; Wed, 09 Jun 2021 02:22:51 -0700 (PDT) MIME-Version: 1.0 References: <20210602192758.38735-1-alcooperx@gmail.com> <20210602192758.38735-2-alcooperx@gmail.com> In-Reply-To: From: Ulf Hansson Date: Wed, 9 Jun 2021 11:22:15 +0200 Message-ID: Subject: Re: [PATCH 2/2] mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 To: 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Kind regards Uffe