Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2712050imm; Mon, 16 Jul 2018 12:47:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfTgi+PrOYgsOiz24brjGO+sJmRDLvbT1ZS2O91jxdT2gzE8VUPCovKxFZ3gNrdqz5rVv5L X-Received: by 2002:a17:902:22e:: with SMTP id 43-v6mr18223445plc.82.1531770477878; Mon, 16 Jul 2018 12:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531770477; cv=none; d=google.com; s=arc-20160816; b=WgbsTLzCW/6YvpD5pESMeXXpcoiw/Wux6pXmSxmZ+gucPAYFXP7zNIeNB27vvtT5gB eC1G4OYH8WB4Ghu9J1pIg2brkbir9nodH4Gl2P3pA1tRmDAOjNwpMQDWke3VeyWDZ5hJ mHrnlpid1CcsLULW66DpcE+zYXk5qy+3+fVPoXjCoNWyomN/ZGUt4/zdLw2Jfq6X8vEQ RJzxR6070gB7ynrL7ene8gu/vN5TH8na7Db9UP889OEdHAUIBFAgq7KwQGhyho94Ac0A R5zie970H4iRqWsA9YkOouOA2B9/Gb2KblzUa3WIaEgu5ImFZv7Eb6/hPG/eBkRImOOq lQLg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Ygt+dRDCEOu33JFgtK5dcuDIe9KDSBk/8HcSlXFyiME=; b=o5VyCDGCj2AHjfarVZbynmoxbuWvNDIRv5x4/nOBN6UOD2w49PgZk+m9xfpjGRjw+s WdPxqw9wZfcOPpJz4dttCNwq83NbLei86QnqtxowQLdsBhvJvWXKCDN8r1GD68F/tp+G 2muhH6xccXvAFr+xbcVED1X1rMa34Yi57IfIh1dIidKjiEaR0kpUBh+sdWmhGyG6i6VP V0jz8uPuK9Gloh3xgxO/oU43ivExpRbCICMYc6+loYBolA8VSqxFN6Hzp2+RuFhxFSPy LZ/pE/fxAdLZ/x0nNcElOLy2Ryh66xEd4g/db0Y9WqIYYoL+3HDUU1+mfl9Au2Sto3+h UWCg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10-v6si7342196pge.674.2018.07.16.12.47.42; Mon, 16 Jul 2018 12:47:57 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728470AbeGPUQE (ORCPT + 99 others); Mon, 16 Jul 2018 16:16:04 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:2469 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728061AbeGPUQE (ORCPT ); Mon, 16 Jul 2018 16:16:04 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1, AES128-SHA) id ; Mon, 16 Jul 2018 12:46:19 -0700 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 16 Jul 2018 12:47:09 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 16 Jul 2018 12:47:09 -0700 Received: from [10.26.11.196] (172.20.13.39) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 16 Jul 2018 19:47:05 +0000 Subject: Re: [PATCH] mmc: tegra: Add and use tegra_sdhci_get_max_clock() To: Aapo Vienamo CC: Ulf Hansson , Adrian Hunter , Thierry Reding , Marcel Ziswiler , , , References: <1531487865-17427-1-git-send-email-avienamo@nvidia.com> <6af41450-4770-3b2d-05b8-914f90743a7e@nvidia.com> <20180713183925.67d7d5f4@dhcp-10-21-25-168> From: Jon Hunter Message-ID: <39421023-0354-2af5-0a29-2299321a4259@nvidia.com> Date: Mon, 16 Jul 2018 20:47:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180713183925.67d7d5f4@dhcp-10-21-25-168> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL103.nvidia.com (172.20.187.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/18 16:39, Aapo Vienamo wrote: ... >>> that it returns the current clock rate of the host instead of the >>> maximum one, which can lead to unnecessarily small clock rates. >>> >>> This differs from the previous implementation of >>> tegra_sdhci_get_max_clock() in that it doesn't divide the result by two. >> >> Why? > > As far as I can tell the original tegra_sdhci_get_max_clock() was > implemented this way in order to force sdhci_calc_clk() to always set > the SDHCI clock divider to two on sdhci_set_clock(). The requirement to > configure the SDHCI divider to two is specific to DDR50/52 modes on > Tegra. > > The .get_max_clock() callback retuning half of the actual maximum will > result in HS200 and HS400 modes not being able to run at full speed. > Another mechanism to enforce the divider requirement has to be figured > out in order to enable DDR50/52 modes on Tegra SoCs. OK, thanks. Ah I see Stefan's patch for doubling the clock. OK so that's fine. Cheers Jon -- nvpublic