Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2420812ybi; Mon, 17 Jun 2019 04:38:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjL5B6TJIZC7gJkmU1sFFq9lgE3vgZvEL97lRWQHGiCNeTUhyq/BWuZxjQfsHuFTq8YkLn X-Received: by 2002:a62:5214:: with SMTP id g20mr59282792pfb.187.1560771488814; Mon, 17 Jun 2019 04:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560771488; cv=none; d=google.com; s=arc-20160816; b=DXG9pIWl3ZHcsqGfJzN4HKCf62PUauZu7saV+4AJB7dqRLJrUjJex/MC6PAUH9R0nc 11TJ241GoDSRTzUp3YU5CymM4Rjmq39/6nYgynlui+yyNE31+KGg/i8B52nFPdP4njTx C9Z92fm+AWzTyqrZ9IEXbyof3Yroe1VamSXAQFIXq4GzScLfbFL+oLjAgdNWR0I5JfE4 +tuVXPhRpMalCaJUvTZyEWFsXUY5vRGjsq+rTvgCYR8Fa+nyMBKjEzNCPnGEfMaBmi6t uxUpYahFDy0M6di2VbmtK4dxTPLCE+p1AQ0a9yfXKzjgt4QO9V12JuiKeCkJqCHQiKYU PmKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=otnv9cTgTfe5r23dfOto9MZjGxvYYJ6GS/smezsERbw=; b=XPcQUjKStlm3Sv4DLpTJTEphPg8Myuh/7EY10v4X4nCsyzBiQSgqQBQ+1a3l3y864f ZUOLE5u+j6ZxVWEWsIFZPEoi5zb513PMCE2dakg0RBqY3PbpQu3LrljfV5oi+Ywq6sY8 NsON2EQpjsswVsCBdJFRY5c+e/S+a0aIi2AwEjuVIra//lJDBDCtSn90U35QHF6u0HJQ S8UQhv5uDIMWnMLMWhV5p2X1Mukua0JgRIJdiAjHyGWkF593M5qgnO6MKls1VO4SQPZ8 EIUwIbVZoagHFWssPS/NvknTXTbs+gNxRT6FumGJ5C5/KwVQQYDPXWdg49DgoJ+m8FhA FgKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GhSJZeoC; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si10509719plb.420.2019.06.17.04.37.53; Mon, 17 Jun 2019 04:38:08 -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=@linaro.org header.s=google header.b=GhSJZeoC; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbfFQLf6 (ORCPT + 99 others); Mon, 17 Jun 2019 07:35:58 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:35002 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728373AbfFQLf5 (ORCPT ); Mon, 17 Jun 2019 07:35:57 -0400 Received: by mail-vs1-f66.google.com with SMTP id u124so5887450vsu.2 for ; Mon, 17 Jun 2019 04:35:56 -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=otnv9cTgTfe5r23dfOto9MZjGxvYYJ6GS/smezsERbw=; b=GhSJZeoC/oXLyZ+TRiMZ0YoXyHryTR3BQ9q66WqrqpWj4KduSA9n3Udj3Q7AiY94c7 ApmEGyvfHjEeCnF+Bow7WWJquaPIFB/gMPr49O2j6bcgghpvg0XWk/cc4JHNjEdz7yxi 3icABA7wUklyEK6MablY/noFcwcUfOP3MqD3ooi54cey/mH1qVhQzu81icq43SWOvl8k 3VEbBqiExhkaV+MutYoQNaN0MHEf5ou1YKkOclJVHN73qhp9Gh04uCnDKw/GCo4h7T5N RUktUXFcT0j/RWnPTbUMjGO6Ottd0/ODo86n5mbFPW0+6YhmJ6Jg4cX0RsNVBFGx7ZPt uZAQ== 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=otnv9cTgTfe5r23dfOto9MZjGxvYYJ6GS/smezsERbw=; b=mo/j4qqPpy485j45YTfPSyh/eYs1XPX/Zyn2L6w98fmlRuEgufXETuASpI6ypFy/tR DY5D8msqBbheKXMvNoTcdkZi1aTH98xzXCY+ip0mpbZsVOwmo7WFEx2rOn1mXuh8RyeJ c7Hf0W8QfLKhfG4UIE4m7NDuV2yyOaGBXsHMPt7oaAdRd4e95gvQt+m7qx+X6DIu1YVx XALYG22HiCJDHTkHomUcgt1zOztGgHZya6WT61gP9nBO3PuVGyKemOM7so491zUm9Osc GYCweQYv+FUNAU0M5/P1aTwGArpMhUQCJOGKZP3abNeSFwtGsczOLPXFVINfgfRFLAFT /E1Q== X-Gm-Message-State: APjAAAXBsCO0evjCP4DzbA8AmrwjdXKsDcZxz00nrQQtB5DfLwzXDx26 0ub2rky2AJAppHmR5oWXpyBRWzy9zouhg3rqXNPRIw== X-Received: by 2002:a67:ee5b:: with SMTP id g27mr9846vsp.165.1560771356174; Mon, 17 Jun 2019 04:35:56 -0700 (PDT) MIME-Version: 1.0 References: <20190614082954.39648-1-yinbo.zhu@nxp.com> In-Reply-To: <20190614082954.39648-1-yinbo.zhu@nxp.com> From: Ulf Hansson Date: Mon, 17 Jun 2019 13:35:20 +0200 Message-ID: Subject: Re: [PATCH v1] mmc: sdhci-of-esdhc: set the sd clock divisor value above 3 To: Yinbo Zhu Cc: Adrian Hunter , Xiaobo Xie , Jiafei Pan , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Yangbo Lu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Jun 2019 at 10:28, Yinbo Zhu wrote: > > From: Yangbo Lu > > This patch is to set the sd clock divisor value above 3 in tuning mode > > Signed-off-by: Yinbo Zhu > Signed-off-by: Yangbo Lu Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/sdhci-of-esdhc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c > index d4ec0a959a75..c4af026c3fba 100644 > --- a/drivers/mmc/host/sdhci-of-esdhc.c > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > @@ -824,9 +824,17 @@ static int esdhc_execute_tuning(struct mmc_host *mmc, u32 opcode) > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host); > bool hs400_tuning; > + unsigned int clk; > u32 val; > int ret; > > + /* For tuning mode, the sd clock divisor value > + * must be larger than 3 according to reference manual. > + */ > + clk = esdhc->peripheral_clock / 3; > + if (host->clock > clk) > + esdhc_of_set_clock(host, clk); > + > if (esdhc->quirk_limited_clk_division && > host->flags & SDHCI_HS400_TUNING) > esdhc_of_set_clock(host, host->clock); > -- > 2.17.1 >