Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp351811ybl; Fri, 30 Aug 2019 00:24:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbDBJgfLJiXyDieB9eUYmQKMZbuIFSVcy/HtaphBqe4GgHmRWtAE0KnrpDGln/xfUXFZKv X-Received: by 2002:a63:60a:: with SMTP id 10mr11700022pgg.381.1567149858620; Fri, 30 Aug 2019 00:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567149858; cv=none; d=google.com; s=arc-20160816; b=I8EOw+2OpHNDHdHAqVP+7H7l9V/QpKJgEkyq9r1/+5Xn0DiIo8SkzhvIwtLfxkBcdr vHNVEWCcecx6JCSbgfUitng1HVmypXioF/6kTATh2a4kbWriJuz7P2z/jXCLHg1PIkOE OUk0h2Cx4nJ+bSjKsLjFy2c/Jmfa11cBIHZuUdWR6fXPAoORoLCfClz/THR+TUY7vbI0 CmPw42fH8S1ieMoJnZwTnziRSgZWx3kI6wJWF0I3F4JcftIECS1vwJdy3e3xZ9P7BFwb EAB2BiKzrJotLinN1sMMD0ORtW9HkaGDdWztogjCCpIEGCxv5tKIpLc94oDcYmmSH8W2 sQAw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=z/QX0gfKd6sypm8R6SHhRlBKzZFrY/VYFHatwRTAQpA=; b=bwhnRRAFNLh2QmLgB2YM2aTTVofimhDkfR1PuzmsFVuQhm6k1+ESWvXtoYD9qdmtNn Q/3ma3N/+MZ37ym/kz7nBzAvBSukaLGNeSBH/hx5ZR+spRvVO97/FL1U+Qj0TFnq+5mV mwH1IQyy+9264pZXU9K2SazsO/IUxxOiEAM7nTvBOXePldTJHhOGcvAyZkD2qy3zHSLh M+AYKxHk3LdKvloLyQhMsqw35strp3U+c7+AiLN/wcppH4JqaUiP28SUc1ePnyfxbIqf JCd9hL2EYJVs6El0UkbAYglIFk0+j2qPK2wYRkGDir6cHXXn5xNboe6qPOcoswvChsQ+ sW3g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si3944372pgn.337.2019.08.30.00.24.03; Fri, 30 Aug 2019 00:24:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728208AbfH3HV6 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 30 Aug 2019 03:21:58 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:40756 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfH3HV6 (ORCPT ); Fri, 30 Aug 2019 03:21:58 -0400 Received: by mail-ot1-f65.google.com with SMTP id c34so6019784otb.7; Fri, 30 Aug 2019 00:21:57 -0700 (PDT) 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:content-transfer-encoding; bh=F9kLJ3BZ5QkD9+EtZF2mlsKCvekaahe0KCRfMZNMwmo=; b=sG5dqECvwb9ukFVFEpwHSVoyrUwTT/rirQH5CPPSLv78MWa1CqB0pB05ow+S4Jruj9 Qrf3U1hiDBTYlA+yFLSPN+txRoN4rTvQ3tD3/tZNt0YilPrnjIhuTTHpA+xadBl++bmI LLpKz0v8+2F/K9izX2DqNTKGiHS/zSK3SvcCNtuhrR103YBn5/QYsOezS2r4q9BNDiti 06CmDvGLzOHLIyn14kY2Lukyp+1ZIdymXTXbc+lc5M3A3nDqalYC51OyMDBvfCqHQC8T /g/5vY2VJVH9iToaqK87E4wrLonzdwh4mVyEHhp7oALb20wEIU2zzbKySw8yJ9sVDFmZ onaw== X-Gm-Message-State: APjAAAXfR2nq4PLaVWn92W7yaCX0F2yzKUl6APcWVLpAVefAhSB0lQyL 2GkI0mZM+yeIQtOmJZ9QtVCvgnUp4iq5a5yBRFY= X-Received: by 2002:a9d:3e50:: with SMTP id h16mr10571919otg.107.1567149717383; Fri, 30 Aug 2019 00:21:57 -0700 (PDT) MIME-Version: 1.0 References: <20190829183634.3376-1-tszucs@protonmail.ch> In-Reply-To: <20190829183634.3376-1-tszucs@protonmail.ch> From: Geert Uytterhoeven Date: Fri, 30 Aug 2019 09:21:45 +0200 Message-ID: Subject: Re: [PATCH v2] mmc: sdhi: fill in actual_clock To: =?UTF-8?B?VGFtw6FzIFN6xbFjcw==?= Cc: Wolfram Sang , Ulf Hansson , Linux MMC List , Linux Kernel Mailing List , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tamás, On Thu, Aug 29, 2019 at 8:37 PM Tamás Szűcs wrote: > Save set clock in mmc_host actual_clock enabling exporting it via debugfs. > This will indicate the precise SD clock in I/O settings rather than only the > sometimes misleading requested clock. > > Signed-off-by: Tamás Szűcs Thanks for the update! Reviewed-by: Geert Uytterhoeven 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_mmc_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 == 0) > + if (new_clock == 0) { > + host->mmc->actual_clock = 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-m68k.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