Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp684104ybi; Fri, 14 Jun 2019 01:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIg6TvihPlvfjmpQ5OJoyqBwW1ELyijFE+x8lEYmjxadTJ5uhe4B5geKm0Cju8kyEVvdj3 X-Received: by 2002:a17:90a:25af:: with SMTP id k44mr9596097pje.122.1560500920913; Fri, 14 Jun 2019 01:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560500920; cv=none; d=google.com; s=arc-20160816; b=eiNqOIDpqF6tSwgqkLgyRMPfrMnfEaInXc5bhttjSkeImXPXx/CmMX1ulqQdek8fDG m12MvLFhKZGSIVZnl5l3qw/CTiItX+hhxwpvQZKa2gLKm+tDhTJEzKXtSH4fL2D1etW0 sYqbNjWYfthZG+VZIxPICjJT6ZxaLzYKsx8XnO852PemzC+1lvtFrKGwSlg8FtTai9W1 PX+EZsuqm0R5+u9MpnSBH0jJWXMkwloOQC0hYL3JhWSoeqQIY8gdZltI+/Ft6LCLkOE2 nZ9ayCCSDl+uMysEVcQYYVbxb6N7A67j8oT6sOiRZ7qTgnzdWIVZGEWQlwfEc2Uv3Cqf R8DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=GeyQRr2mRwL1l9iL3yw7gMfvwNEp2SbcQZ0UxIfXwws=; b=ejeaeo+7gLxQ1IsKwwKOAXBGS2kbfLNb0uYWq98KsUx9TqLgkZBNoaGZXIi+Gv5FDL xlncm5Op+Fo0KdJv17/AjNhca6++ghTvgicKBoJGO9Z1sd8JLu2Xil3cKtoApzBsoKbh bW6F1VyywswR3oxTE7wmRXvlGtdgz3PcFrjriiIW3iMCiL4wQqmU5KHMev+W7yAo61lt GEF/K88oP9eCDPukE0XJrskFQ5rI6MPJSuKSqky9OgNdkNXRSoF7wWqaiBV5cwhS1CvJ gygXxKGwdJ3y21tBeJqcxFpZ53Qs2+fzRu01xkLw46vnGYz/ZJsjtju/XSgmsBRoJd4P jc8Q== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si1944574pgq.36.2019.06.14.01.28.24; Fri, 14 Jun 2019 01:28:40 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726627AbfFNI2M (ORCPT + 99 others); Fri, 14 Jun 2019 04:28:12 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48906 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbfFNI2K (ORCPT ); Fri, 14 Jun 2019 04:28:10 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 94BDC200077; Fri, 14 Jun 2019 10:28:08 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D4A232005D4; Fri, 14 Jun 2019 10:28:04 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C9B6C402DD; Fri, 14 Jun 2019 16:27:59 +0800 (SGT) From: Yinbo Zhu To: Adrian Hunter , Ulf Hansson Cc: yinbo.zhu@nxp.com, xiaobo.xie@nxp.com, jiafei.pan@nxp.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, yangbo.lu@nxp.com Subject: [PATCH v1] mmc: sdhci-of-esdhc: use 1/2 periperhal clock for ls1028a Date: Fri, 14 Jun 2019 16:29:54 +0800 Message-Id: <20190614082954.39648-2-yinbo.zhu@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190614082954.39648-1-yinbo.zhu@nxp.com> References: <20190614082954.39648-1-yinbo.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yangbo Lu LS1028A used 1/2 periperhal clock as one reference clock. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index c56c7d413a09..4dd43b1adf2c 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1048,11 +1048,12 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host) /* * esdhc->peripheral_clock would be assigned with a value * which is eSDHC base clock when use periperal clock. - * For ls1046a, the clock value got by common clk API is - * peripheral clock while the eSDHC base clock is 1/2 - * peripheral clock. + * For some platforms, the clock value got by common clk + * API is peripheral clock while the eSDHC base clock is + * 1/2 peripheral clock. */ - if (of_device_is_compatible(np, "fsl,ls1046a-esdhc")) + if (of_device_is_compatible(np, "fsl,ls1046a-esdhc") || + of_device_is_compatible(np, "fsl,ls1028a-esdhc")) esdhc->peripheral_clock = clk_get_rate(clk) / 2; else esdhc->peripheral_clock = clk_get_rate(clk); -- 2.17.1