Received: by 10.213.65.68 with SMTP id h4csp1809546imn; Thu, 29 Mar 2018 11:26:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+3I/c+yGlSfrdmB5SyAq2klf2f/lUlErohALiTGHdU1z94ghNf84gdqZ+rFSCHO0xynE99 X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr9691058plb.140.1522347989668; Thu, 29 Mar 2018 11:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522347989; cv=none; d=google.com; s=arc-20160816; b=hEFwW1HXEBgWwv+W5Juh9OfoK+B8b4Uz6XRTsgVQKwvSgbQkNAinLj7/E3FSIZWKY4 33MiZobkmLvO9VeSfF077yyR8pFpOeiWH8Z4wzb9aeQeAgt9CwtNvD9FwFMx3ILRVXph s/lMLXmHlwHPkfXCDFceYRYLads9hxTPNDwLkBLSVrxFh2+qcTJLUQ6iCFTnU+6N0tmr lzAZtLl25ACu8e0R96ol/TOnfRKdLDZUrNwwUHMxIMKuT5qGd0Bqil6gmzDxe2kzwcQU vCqNkZv6kQH77G3+Q5qITtoS0XTxC63vmJ2hj7zVuB+x29Wb7XzfcOSysFrrMBliCl5s O0FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=w1+FbNyUbePoYJke380V1ZyRwofp7t/IVaasIimhQDM=; b=EnrleQopEwshrofqPtTiBjGwh1XdU/JQ82Yv5LGvZYGz9Oh+RMsMimwZ+zn/ovNkC0 iBZn3nXahorpBjEWsUNYyEpR6OsofO/B0MqAqDIcXozeyxyaHqeG9PJ2yD2vX858vP2M Q9bX+JEGRtTm/+bfRUbS2jeHSy2d51DHetAy8ECJW2Cw8Gp1gkSebyEkQlBq+2Nd4CLK MOlogy5C2ZO7Wnas09uY3VFF+EWNggA0gUdSAYKmB3MZ1sEifimuJJFU5+gQvK9vXTQA 7hhcHyR/Aoq2QHTZk5r98RKHIMH30/lWbHyHl+WURkY0c8+/S67QvVIIa2s+SUf9oVd3 dQbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@edited-us.20150623.gappssmtp.com header.s=20150623 header.b=QJV0SoiF; 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 n2si319395pgv.789.2018.03.29.11.26.15; Thu, 29 Mar 2018 11:26:29 -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=fail header.i=@edited-us.20150623.gappssmtp.com header.s=20150623 header.b=QJV0SoiF; 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 S1753527AbeC2SZM (ORCPT + 99 others); Thu, 29 Mar 2018 14:25:12 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36877 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752825AbeC2SYz (ORCPT ); Thu, 29 Mar 2018 14:24:55 -0400 Received: by mail-io0-f194.google.com with SMTP id y128so8711850iod.4 for ; Thu, 29 Mar 2018 11:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edited-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=w1+FbNyUbePoYJke380V1ZyRwofp7t/IVaasIimhQDM=; b=QJV0SoiFqdrTDqwh/qojs6HbAMaDGxUPfavG8voWJ8g9Y7SnYxNAFvPVuPdZweuw2C nFNNzeviQ9PaUdOndajwgstoGI4Pf9scJ+nleh60kCt+wsPqSPT8iW5Lk7BC0zg/94Ka 4wf/YMa8o7OKeMDbE9yaJ/7HKKI4hHGCz3vm1WXGhD/DUEnratDBvHuazaYVLHK489t7 yePtzcAEqVJjY8rc/w9Lv0yX8vgwbxiWnPR19bkWElRjuXsHHtxTeVTwYXT3FJTeBW+C STwFjT6eiY5z8KyP1iZR1PjF9eTPEVF+BglNPbYXsJxIPR9aYkG46+wRQvTAbtPJ5rYs R8DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=w1+FbNyUbePoYJke380V1ZyRwofp7t/IVaasIimhQDM=; b=gu0UGh4HFeUot52A30DfdrCgCavD/rdrKlxJtG3tRwU1rr2V944TqXSasj1W+Vh9P4 WAWMEJfiYvSp7VLIuKUPtoMZQub2ONcQhB7To/flubfTqpYJZeO9/0+U7BEcSQt0GYRs FONvbFHp7SfBUNK/I+VglB+y6rD5elrN8iqLcnvjfB4dUK1MF7rJTYiYrXijly9z12iu E+zSfCnnmuxd/GRkctVBhsPLewkgm5V9jIPgE7vGi+yKwyR5UREE3/gR0x/iBdCa9J+w RFd3YQOo4ybwcwUCRUAgeQJviAc0CXcVL+Nqrc+S6c//Iqp4A6AI6uJWNkQUJ1VuQvuO yLfg== X-Gm-Message-State: AElRT7Epf9+ifVoBwDK9SNQGayA6IhUQbT+yFTbSNEiadhJOWHtgIuAt WLRyIwwFDRbv3fq/88iQ79l8Qg== X-Received: by 10.107.17.33 with SMTP id z33mr17521162ioi.206.1522347894655; Thu, 29 Mar 2018 11:24:54 -0700 (PDT) Received: from debian.hanksspec.com (ip-97-240-239-173.midwest.us.northamericancoax.com. [173.239.240.97]) by smtp.googlemail.com with ESMTPSA id y20sm4589128ioy.27.2018.03.29.11.24.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 11:24:53 -0700 (PDT) From: oscardagrach Cc: oscardagrach , Jaehoon Chung , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: dw_mmc-k3: Fix DDR52 mode by setting required clock divisor Date: Thu, 29 Mar 2018 13:24:22 -0500 Message-Id: <20180329182423.21201-1-ryan@edited.us> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: oscardagrach --- drivers/mmc/host/dw_mmc-k3.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c index 89cdb3d533bb..efc546cb4db8 100644 --- a/drivers/mmc/host/dw_mmc-k3.c +++ b/drivers/mmc/host/dw_mmc-k3.c @@ -194,8 +194,14 @@ static void dw_mci_hi6220_set_ios(struct dw_mci *host, struct mmc_ios *ios) int ret; unsigned int clock; - clock = (ios->clock <= 25000000) ? 25000000 : ios->clock; - + /* CLKDIV must be 1 for DDR52/8-bit mode */ + if (ios->bus_width == MMC_BUS_WIDTH_8 && + ios->timing == MMC_TIMING_MMC_DDR52) { + mci_writel(host, CLKDIV, 0x1); + clock = ios->clock; + } else { + clock = (ios->clock <= 25000000) ? 25000000 : ios->clock; + } ret = clk_set_rate(host->biu_clk, clock); if (ret) dev_warn(host->dev, "failed to set rate %uHz\n", clock); -- 2.11.0