From patchwork Tue Jan 30 15:01:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 126235 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp3440420ljd; Tue, 30 Jan 2018 07:04:01 -0800 (PST) X-Google-Smtp-Source: AH8x22507E6S3J4xU/XcKbv+tE3A81Uf5v0HYatqqwv3s7dBnN7aS8Q9tCH/g/VbEY6l3u8rPdD4 X-Received: by 10.80.226.68 with SMTP id o4mr54550498edl.151.1517324641345; Tue, 30 Jan 2018 07:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517324641; cv=none; d=google.com; s=arc-20160816; b=tvF40dHsFBXP6cQfhaoiPUkgC4ZZKyhUrqyH5tr9HoT4dgU2QB3XuMcPswRTdUFzH4 24mwMjEskFRM5LSy4L63UlQhMYpzOOQkueaAGVt/WwViY/tDKrt0VakvJrC9QlQFxfZ5 AfPsdEOiauWcY+58PTY2HPDd2YoHov37rEqKrPV7k/4iz4mLREYqTpnp4hQrPEivv3/L bqoGTOH2FrcggRff8xBvHE00XPoKQqrbWEdDPhvpGCOTzptlq1bANBLWVSBuIbgvK2zI ClY6M0ycoyBD+87VRcQ3iwe1R1OLD2R0X9roOTZp0gYGzQaD8P+4EcLxyQzQhl1552PF KCCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=7lRN1CTEzlwmynb3sjnv4xko1vOgIcDe9uIU7WiMEaI=; b=Y0tG9oeoIIzv+HfAploE1r+rc0q/eteqCM0NsjGoNQ4hyP5l2k+ATRgfuM2/Fryzsy p5++nz/XtfgppP3T9M8badSRqyKR7gCMvYejW4F5eHUFok/uJiWPZMJj46UKdSyuQEGy 3v8I1/zE26VnLPX7zffqucXIAIitmlAccELHwLVyrhK3dY/FHwI/RYMr9flWj5CaiQDf lKBq4tbjqmWc3019/IxHWjTVia8LA7yjV8y1QmCkNlrjNBjtXKuKTcGzS/i84EFTe3o0 ZK2ogzRiBpN2IfWwmMI/I2Nv3Q5xf85bKsscAvtJOJ7Bt5YfgyVw+WVousr/TrWMStL2 KISg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=BGdH7BPd; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id w15si9524441eda.32.2018.01.30.07.04.01; Tue, 30 Jan 2018 07:04:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=BGdH7BPd; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id DB5E3C21E3A; Tue, 30 Jan 2018 15:02:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A77DAC21E45; Tue, 30 Jan 2018 15:02:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3E034C21E8B; Tue, 30 Jan 2018 15:02:12 +0000 (UTC) Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by lists.denx.de (Postfix) with ESMTPS id 9FFEBC21E8A for ; Tue, 30 Jan 2018 15:02:07 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w0UF2408024879; Tue, 30 Jan 2018 09:02:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517324524; bh=c542K6RVQoIH3cWkk7JM65B7xwWYPo7vxVkXvXht3x0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BGdH7BPdKqbO0gwDWFdfV30reaLIpMxgTDDqzwlV2U6lqAqzhCCIoDHru/Cktr35Q 6330C3GJS648okjYSnDsmYbkbICKuEtvlTp3XoNTLKwUifi8QcZpbnjlJzgkvNrOOe Sd464JJhjQIV6TxaOpVu57njkrOBc8gTNVN8W2s0= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0UF2462004934; Tue, 30 Jan 2018 09:02:04 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 30 Jan 2018 09:02:03 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 30 Jan 2018 09:02:03 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0UF23Hf012031; Tue, 30 Jan 2018 09:02:03 -0600 From: Jean-Jacques Hiblot To: , , , Date: Tue, 30 Jan 2018 16:01:34 +0100 Message-ID: <1517324513-13875-6-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517324513-13875-1-git-send-email-jjhiblot@ti.com> References: <1517324513-13875-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 05/24] mmc: omap_hsmmc: Enable DDR mode support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Kishon Vijay Abraham I In order to enable DDR mode, Dual Data Rate mode bit has to be set in MMCHS_CON register. Set it here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Jean-Jacques Hiblot --- Changes in v3: None arch/arm/include/asm/omap_mmc.h | 1 + drivers/mmc/omap_hsmmc.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h index 507435a..6aca9e9 100644 --- a/arch/arm/include/asm/omap_mmc.h +++ b/arch/arm/include/asm/omap_mmc.h @@ -89,6 +89,7 @@ struct omap_hsmmc_plat { #define WPP_ACTIVEHIGH (0x0 << 8) #define RESERVED_MASK (0x3 << 9) #define CTPL_MMC_SD (0x0 << 11) +#define DDR (0x1 << 19) #define DMA_MASTER (0x1 << 20) #define BLEN_512BYTESLEN (0x200 << 0) #define NBLK_STPCNT (0x0 << 16) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index c6b74a1..2f4909e 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -271,6 +271,11 @@ static void omap_hsmmc_set_timing(struct mmc *mmc) val &= ~AC12_UHSMC_MASK; priv->mode = mmc->selected_mode; + if (mmc_is_mode_ddr(priv->mode)) + writel(readl(&mmc_base->con) | DDR, &mmc_base->con); + else + writel(readl(&mmc_base->con) & ~DDR, &mmc_base->con); + switch (priv->mode) { case MMC_HS_200: case UHS_SDR104: