Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1330399pxy; Thu, 6 May 2021 05:58:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTm+B91MFSXdM84rRZ0VwLSEyjI2Jek2wc6s9jzFodeumHv3BQoQtJpQ0IKlKDTY4w0E/n X-Received: by 2002:a17:907:10d4:: with SMTP id rv20mr4170563ejb.301.1620305883553; Thu, 06 May 2021 05:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620305883; cv=none; d=google.com; s=arc-20160816; b=XQuwbJIHvvf8oVZionsBokHiUQuukr20rNUolU5h0D2fGIxkXNv9Vxt2FSCB7DBCrL oPn8nwxL9Q8owqMd36NGL8HZ1ioQuHDuytTCZleyZCI/j77o3OqhqDSnddUbHHDHBQHi ZyMnRD8sjGE49grbodPSauSORuk6eX/Y+GIvOrq/L1BPiZI14+wpcES8eDIcgEgSE76Q s9ZLCM9bro7DlXr4zqXfKqKpY3Ztr4xBmJx/9vJB7tsa2RLneuEk8sI/a59lJRwhARcm 0UKejAvgxSkdYBTpgJThP4QKiNHqQgqILtKkc5J+S7YxVSsApmBaGIFlGpBSq+NnuME+ Chsg== 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=wqkbdKsOdWjTK7WgnVxR1G7Gje4G1wMYFsQzSKPfbAo=; b=XfyCofXdMfAIXmMaJih7bIs21d14fSD/1Nyv/jhd0ntPJJ+KiF0J9UqkK3zcqEmjV0 zu8cOB7nnUeg6q4sLdeEWy55HZxbEwQj1mrdCu7/hm8GlSOUmGWiGifi6gwPER9BLYrK Czsg+dd0aknnTLnbTKUkPAYOor96oWmiHUkyXGpSbd8tpk0CShlIN/mFgIaTSIjbxjue u5luIXSBimME4DMRbhLX8g+8oHrd1fkjpWUzRijAKPhJEF7tj4TBgHe1FF/RYn5dFNWe aLrTKhpeWbmmfTSGrtgMJ8nvvPO6yMnlm4GdiOBOG0XpysDlYVoIoN458deHJQwLdLUH SMUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZ7v02+K; 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 m7si256868edq.472.2021.05.06.05.57.39; Thu, 06 May 2021 05:58:03 -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=WZ7v02+K; 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 S233160AbhEFM4Q (ORCPT + 99 others); Thu, 6 May 2021 08:56:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbhEFM4O (ORCPT ); Thu, 6 May 2021 08:56:14 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B65DFC061761 for ; Thu, 6 May 2021 05:55:14 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id c3so7622387lfs.7 for ; Thu, 06 May 2021 05:55:14 -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=wqkbdKsOdWjTK7WgnVxR1G7Gje4G1wMYFsQzSKPfbAo=; b=WZ7v02+KE4wO7unCZvbfDLWFG1BRsiNeeiqwWtqYzNOqQASTg2Nx2XeJHesK7+D3i8 2JQfF4stnA2fdQBg2FnNMBkVC/kF+kk/n7Ux2nNLiHXhJI8qVoCcSAjc8GHrDgI8yghv xGJDjI1jaRfOPqkXEJft2jPTJukttHcTAS6A0PvGYzKYNMLvUCUpMOIEwjn5ZbM7hktj Hs8saBV8RonqMxpUkZMPrdRzH+Ly0qzK/W6sz5FanvYdM38165f8sGdp+TsJtCtIFRcT pQc3QrChiZoCSOug9HHoE0ZWPCh2msWrev/R2BMiqXMy9GjDFcKTN+aUSnWaTYQI8CtR oseg== 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=wqkbdKsOdWjTK7WgnVxR1G7Gje4G1wMYFsQzSKPfbAo=; b=AdNK8kij2sKGgfbD7ElcddXbhWaEEbpDJFABHxDrWu82cTsvKwGaQ0ZKOUysbnFITo 15ecOBKpJg21t4SOQfkDyXSFZ1mY99G8oiiLdCfinBSl24IqNJOWCpymw5sJPrc3qdd5 SAghFnj8Bs+PXehRR/E9+eetVonBbkGxfLd7AIgu01nG5ItdmxgE0ug3aFERivdBRkeZ 4I/fA7BGLDk6v4XZzMCmDWefO7UdAtgtY7XytM5IXknJ9DWdi1SMONaxwHyCgea/p6g4 47j06WGi9POtobVjWtbuVEWo4e4qhZltShJbEdbpLJ3yjEBOMTiGw9meB8EFOa+J/R0J M48Q== X-Gm-Message-State: AOAM533GS+db95Mj16WUJ5sWvZAGOilHJmujG+q6RLtmBou4aBtEeFvZ W51UwPEhQiWSlkmVAY7pUzuUsP/hysLzxVWjNexvxw== X-Received: by 2002:a05:6512:149:: with SMTP id m9mr2640542lfo.157.1620305713264; Thu, 06 May 2021 05:55:13 -0700 (PDT) MIME-Version: 1.0 References: <20210504161222.101536-1-ulf.hansson@linaro.org> <20210504161222.101536-6-ulf.hansson@linaro.org> In-Reply-To: <20210504161222.101536-6-ulf.hansson@linaro.org> From: Linus Walleij Date: Thu, 6 May 2021 14:55:01 +0200 Message-ID: Subject: Re: [PATCH 05/11] mmc: core: Enable eMMC sleep commands to use HW busy polling To: Ulf Hansson Cc: linux-mmc , Adrian Hunter , Wolfram Sang , Shawn Lin , Avri Altman , Masami Hiramatsu , linux-block , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 6:12 PM Ulf Hansson wrote: > After the eMMC sleep command (CMD5) has been sent, the card start signals > busy on the DAT0 line, which can be monitored to understand when it's > allowed to proceed to power off the VCC regulator. > > When MMC_CAP_WAIT_WHILE_BUSY isn't supported by the host the DAT0 line > isn't being monitored for busy completion, but instead we are waiting a > fixed period of time. The time corresponds to the sleep timeout that is > specified in the EXT_CSD register of the eMMC card. This is many cases > suboptimal, as the timeout corresponds to the worst case scenario. > > To improve the situation add support for HW busy polling through the > ->card_busy() host ops, when the host supports this. > > Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Yours, Linus Walleij