Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp67804pxm; Tue, 22 Feb 2022 06:31:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxY2+1T1NnRxjGu/C1Nn9zzhCdcNsVUq6a07+u6AQx3RVEBJ/UzwvTqeZDMBDaZcve6xoXK X-Received: by 2002:a17:906:1995:b0:6ce:6b78:f9ec with SMTP id g21-20020a170906199500b006ce6b78f9ecmr19525148ejd.459.1645540300748; Tue, 22 Feb 2022 06:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645540300; cv=none; d=google.com; s=arc-20160816; b=LYlzscqu/Az14a8zoUgpsF/ldFr/umuT/cuw6j/2DUoX3zxKj9QrOrid6kE/1maznN kVbj94M41XGLCdN8mmBqvsdBBnwpr7ucsfwmmpGuYDJL1V/H48ljGMf9ut8HwKKyPDIo idNAFqVmYLMBWiBO5P1OOGN1bJ/Yf6yZbn5/NXbbLMTKRox8J9JQyonjleZCx8cAfSxE 44h40xaZj33HecO7YLJ0BQmrKL8USteLIBDxB3DwTrMFsjpbJB8uaNyqcRsIPUsFr304 1veKKsTHdLgU8TSe9Q8/o+H67H6M3rKpUbX2GnoS2HbDEr+utq+Ob2gBEcjxzow1LNk/ Y3TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JG31S5kXW4k92djYovthIPhq2MSTVQxzgtYK4fT/QN8=; b=LFDHlECm7ONX3v2s+vgYtrB/gQFFX9sJu03xyVtNzJtkeghJ6MIEvIdwiOR18Lji/l f6XfVU1H4hOiyT9mmr8nJFVHrHfiaoP5fhN4YWDmaMZv3k8ikiswgHRVae+p+9rupu53 /ifMnFzqG4f8nDsstYF39AUZSnk02p11/tlqlxpWC+qKHlKA/xq0ZMjjt29H9nQSP8xr NdVyYXS28Dy1yz2I55YWDer6eFuYda/ueHzysmVbCmmXLIEUcsqoSRfGldsSsxiuZ9KX e0drwhh65RoT2ySGtEWOZp2CT8UMhM1ZjeRQghMB12X6Cr9gT0bnFXlAK919Ol3D8cfE Keyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gh0M4Ghe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6si12621034edr.575.2022.02.22.06.31.15; Tue, 22 Feb 2022 06:31:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gh0M4Ghe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbiBVOSh (ORCPT + 99 others); Tue, 22 Feb 2022 09:18:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiBVOSe (ORCPT ); Tue, 22 Feb 2022 09:18:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB1F910854B; Tue, 22 Feb 2022 06:18:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5CA3EB81A2B; Tue, 22 Feb 2022 14:18:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84629C340E8; Tue, 22 Feb 2022 14:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645539486; bh=ArDLp9Yf09I1STzBMYLCq+XcO2PjHAI+AeehNM63oSs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gh0M4Ghe7NMX+TLc/5+z8wVPV4e/YmRLZAyJL5X0FeeUhwnqZFSK2rOLXUJ43NucH IOgDygEyj0i2vLHbu2HIiPu3xJ2lpRihS7rF3zllgRbs1w2mkhSYysQLDxLdWTWM+w wIWVzgVuIE6IvqIyJn6RQZUEr+6iNXQZpFF9wBSg= Date: Tue, 22 Feb 2022 15:18:03 +0100 From: "gregkh@linuxfoundation.org" To: Ricky WU Cc: "ulf.hansson@linaro.org" , "kai.heng.feng@canonical.com" , "tommyhebb@gmail.com" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow Message-ID: References: <90844cba1cb64571a8597a6e0afee01d@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 22, 2022 at 12:31:10PM +0000, Ricky WU wrote: > > -----Original Message----- > > From: gregkh@linuxfoundation.org > > Sent: Tuesday, February 22, 2022 4:59 PM > > To: Ricky WU > > Cc: ulf.hansson@linaro.org; kai.heng.feng@canonical.com; > > tommyhebb@gmail.com; linux-mmc@vger.kernel.org; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow > > > > On Tue, Feb 22, 2022 at 08:48:30AM +0000, Ricky WU wrote: > > > > -----Original Message----- > > > > From: gregkh@linuxfoundation.org > > > > Sent: Tuesday, February 22, 2022 3:42 PM > > > > To: Ricky WU > > > > Cc: ulf.hansson@linaro.org; kai.heng.feng@canonical.com; > > > > tommyhebb@gmail.com; linux-mmc@vger.kernel.org; > > > > linux-kernel@vger.kernel.org > > > > Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow > > > > > > > > On Tue, Feb 22, 2022 at 07:27:52AM +0000, Ricky WU wrote: > > > > > After 1ms stabilizing the voltage time add "Host provides at least > > > > > 74 Clocks before issuing first command" that is spec definition > > > > > > > > You do have 72 columns to use here, no need to wrap this so tightly. > > > > > > > > > > Ok... > > > so I need to have next patch to fix this format? > > > > Please do, because: > > > > > > > > > > > > > > > Signed-off-by: Ricky Wu > > > > > --- > > > > > drivers/mmc/host/rtsx_pci_sdmmc.c | 7 +++++++ > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c > > > > > b/drivers/mmc/host/rtsx_pci_sdmmc.c > > > > > index 2a3f14afe9f8..e016d720e453 100644 > > > > > --- a/drivers/mmc/host/rtsx_pci_sdmmc.c > > > > > +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c > > > > > @@ -940,10 +940,17 @@ static int sd_power_on(struct > > > > > realtek_pci_sdmmc > > > > *host) > > > > > if (err < 0) > > > > > return err; > > > > > > > > > > + mdelay(1); > > > > > > > > What is this delay for? > > > > > > > > > > Spec definition, need to wait 1ms for voltage stable and below > > > mdelay(5) is our device send 74 Clocks time > > > > Clock cycles and mdelay() are not going to always stay the same, right? > > > > I really have no idea what "74 clocks time" means, is this some specific timing > > value for this hardware? What is the units? This needs to be documented > > better in both the changelog and in the code. > > > > thanks, > > > > Please ref: https://www.sdcard.org/downloads/pls/ Version8 I can not download those specifications according to the license that they ask me to abide by. > And see the 6.4.1.2 Power Up Time of Host Figure 6-5: Power Up Diagram of Host > mdelay(1) corresponds to Stable supply voltage > mdelay(5) corresponds to Host provides at least 74 Clocks before issuing first command > our device need 5ms to issue 74 Clocks What is a "clock"? The kernel works with time units, how does "5" equal to 74? thanks, greg k-h