Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp473445ybl; Fri, 30 Aug 2019 02:36:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxygstvkvT4ZYiEkokn0sWnlRbSzSzy0aSFmMHXz9ZMv+SWO02to3RjEaJzdBM29d1sWdZt X-Received: by 2002:a62:1685:: with SMTP id 127mr17268588pfw.122.1567157769777; Fri, 30 Aug 2019 02:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567157769; cv=none; d=google.com; s=arc-20160816; b=Gp/JGqlwCGGLb2shbsJPT9lIroqUOyFlxWyM1BKHAVmTe6boKS4huy9MJ6+u22XWi3 Aw5u/ZnoYRlXOfA8nMz6DLDnjm5cCxGDrZ6y1ZrXOgbNwaUXNWCsep6QbDpCCLTI5rAU 5LUEXwXdCcqWXTVYONh44aBFFIgylM2eQfJZY3W95xt3RJn/d0J3kAWtyfh+9CO2J2zR IW1GjSSCmAgqqqLx5ZoPtUwjCaJ7oln571OlGSq6HOlcJJHjDbL2a9VL/JRPYai2BC9U LQ9eVtkRmBZMxiWsoHYgVq5QmI7+GXhaI2xBwVPpjPAmEHiKQkl3rD3Xr8eCnogmtwku Eq6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:reply-to:cc :from:to:dkim-signature:date; bh=nz1yhbjeCbxbAmzZQWi05SYwfjQwsTGBfY7/Mxb28jo=; b=FxjbkK9YyId3dAun5fC88JzEPZHl17aGXkhHbBSGSXgtqXwNzI7tEOfsLco+YK6xeK 9Q5V8fIrruIqfFpj5dd69SfMyy1bwa4fJfq4LI0jBYgG7I1pE4WfYyDTuQijSVyrZwLn HzWQohkEQ844UeaLTBtF2Mc2ferf/Sp0YobjLQfBZAEzf3V5yfkMLtmDJ4xNRoYF1uJH WSZUGX/Ek5E0gkRKI4UjjpiKB/ahbl4WENzCkb0YF1OrtigaLBeQsVs02V32EA7xJFwZ MZzpsGMETVfR/nJ/er+9rSzl3EBs/9oHY1PHN3EdKRmrQcrEZ54rNsSJtHPuPdowd0Os JUqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.ch header.s=default header.b=d0pPR4ci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si5478584pfj.274.2019.08.30.02.35.53; Fri, 30 Aug 2019 02:36:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.ch header.s=default header.b=d0pPR4ci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727729AbfH3Jd2 (ORCPT + 99 others); Fri, 30 Aug 2019 05:33:28 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:46263 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727236AbfH3Jd1 (ORCPT ); Fri, 30 Aug 2019 05:33:27 -0400 Date: Fri, 30 Aug 2019 09:33:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1567157604; bh=nz1yhbjeCbxbAmzZQWi05SYwfjQwsTGBfY7/Mxb28jo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=d0pPR4cipoP4CS8PEBlKd7zCj/Px5jusbUnimhrjUrcqa5rCgVV75B/RmBeI62716 Cd/SWpZFGMGGX9G+n3emibLsGIRYBPqZZ/beAT7mPzdG3qyrVJXQyjAZf5BEFaR8kX b9b+EocIouDMBVnG4VJ8zK/IdFSjWdlkSraHdmyg= To: Geert Uytterhoeven From: =?UTF-8?Q?Tam=C3=A1s_Sz=C5=B1cs?= Cc: Wolfram Sang , Ulf Hansson , Linux MMC List , Linux Kernel Mailing List , Linux-Renesas Reply-To: =?UTF-8?Q?Tam=C3=A1s_Sz=C5=B1cs?= Subject: Re: [PATCH v2] mmc: sdhi: fill in actual_clock Message-ID: In-Reply-To: References: <20190829183634.3376-1-tszucs@protonmail.ch> Feedback-ID: nIMxuco3ul2LtVHhzi8PphYHQLjwNa0SMoiI49kuTHKENnPWKUsinAdWedFtAsi63naFGY15tCjh3_itnNk3og==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, You are correct, there is no way to distinguish between the old and new ker= nels just by mmc ios output when the bus is down. I don't think it's an iss= ue. I find it more helpful to have this information available. Yes, actual_clock should only display when non-zero and it should be zero w= hen the bus is down. I fixed this in v2. Kind regards, Tamas Tam=C3=A1s Sz=C5=B1cs tszucs@protonmail.ch =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, August 30, 2019 9:21 AM, Geert Uytterhoeven wrote: > Hi Tam=C3=A1s, > > On Thu, Aug 29, 2019 at 8:37 PM Tam=C3=A1s Sz=C5=B1cs tszucs@protonmail.c= h wrote: > > > Save set clock in mmc_host actual_clock enabling exporting it via debug= fs. > > This will indicate the precise SD clock in I/O settings rather than onl= y the > > sometimes misleading requested clock. > > Signed-off-by: Tam=C3=A1s Sz=C5=B1cs tszucs@protonmail.ch > > Thanks for the update! > > Reviewed-by: Geert Uytterhoeven geert+renesas@glider.be > > However, one question below. > > > --- a/drivers/mmc/host/renesas_sdhi_core.c > > +++ b/drivers/mmc/host/renesas_sdhi_core.c > > @@ -166,10 +166,13 @@ static void renesas_sdhi_set_clock(struct tmio_mm= c_host *host, > > sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~CLK_CTL_SCLKEN & > > sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); > > > > - if (new_clock =3D=3D 0) > > > > > > > > - if (new_clock =3D=3D 0) { > > > > > > - host->mmc->actual_clock =3D 0; > > > > > > The actual clock is present in the debugfs output only when non-zero. > Hence userspace cannot distinguish between an old kernel where the > Renesas SDHI driver didn't fill in actual_clock, and a new kernel when > the SDHI controller is powered down. > Could that be an issue? Should the old value be retained? > Probably it's OK, as this is debugfs, not an official ABI. > > Gr{oetje,eeting}s, > > Geert > > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------ > > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.org > > In personal conversations with technical people, I call myself a hacker. = But > when I'm talking to journalists I just say "programmer" or something like= that. > -- Linus Torvalds