From patchwork Thu Feb 22 10:25:45 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: 876576 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="d1HpFKJm"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zn9WF1tt0z9sVy for ; Thu, 22 Feb 2018 21:26:33 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 02CD2C21F2F; Thu, 22 Feb 2018 10:26:22 +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=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 32207C21EA8; Thu, 22 Feb 2018 10:26:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6CA24C21D72; Thu, 22 Feb 2018 10:25:59 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id C3C89C21C50 for ; Thu, 22 Feb 2018 10:25:58 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1MAPsmI001824; Thu, 22 Feb 2018 04:25:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519295154; bh=NVlqWLxhI8lWxKlyEDdLr1GWRv/jAEc0hz+X92iTJRc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d1HpFKJm3uulxYu+sKzkkpAnG72jBpEY1xmNt7hbw+17pFwRAfpb5PweroLd1dJts OLrDtZ7Mm2W8yHH8KjppCQycfWWCKYuGC+F/H4BKsfhuUgbA+K5JD/J8rLQshCbRZJ N9CYbiOB5Zx6i8vLU7tRXxlBF2RfIwySQYUlITIQ= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPsO3018961; Thu, 22 Feb 2018 04:25:54 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 22 Feb 2018 04:25:53 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 22 Feb 2018 04:25:53 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPrw2030875; Thu, 22 Feb 2018 04:25:53 -0600 From: Jean-Jacques Hiblot To: , Date: Thu, 22 Feb 2018 11:25:45 +0100 Message-ID: <1519295148-6817-2-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519295148-6817-1-git-send-email-jjhiblot@ti.com> References: <1519295148-6817-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Kishon Vijay Abraham I , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat 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" The area for struct mmc can be allocated dynamically. It greatly reduces the size of struct omap_hsmmc_plat. This is useful in cases where the board level code declares one or two struct omap_hsmmc_plat because it doesn't use the Driver Model. This saves around 740 bytes for the am335x_evm SPL. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- arch/arm/include/asm/omap_mmc.h | 2 +- drivers/mmc/omap_hsmmc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h index 3d70148..42ce8dc 100644 --- a/arch/arm/include/asm/omap_mmc.h +++ b/arch/arm/include/asm/omap_mmc.h @@ -67,7 +67,7 @@ struct hsmmc { struct omap_hsmmc_plat { struct mmc_config cfg; struct hsmmc *base_addr; - struct mmc mmc; + struct mmc *mmc; bool cd_inverted; u32 controller_flags; const char *hw_rev; diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 02970f2..e0b679a 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -1858,8 +1858,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev) static int omap_hsmmc_bind(struct udevice *dev) { struct omap_hsmmc_plat *plat = dev_get_platdata(dev); - - return mmc_bind(dev, &plat->mmc, &plat->cfg); + plat->mmc = calloc(1, sizeof(struct mmc)); + return mmc_bind(dev, plat->mmc, &plat->cfg); } #endif static int omap_hsmmc_probe(struct udevice *dev) @@ -1882,7 +1882,7 @@ static int omap_hsmmc_probe(struct udevice *dev) #endif #ifdef CONFIG_BLK - mmc = &plat->mmc; + mmc = plat->mmc; #else mmc = mmc_create(cfg, priv); if (mmc == NULL) From patchwork Thu Feb 22 10:25:46 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: 876575 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="EMW3KhPt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zn9Vw14ZCz9sVy for ; Thu, 22 Feb 2018 21:26:14 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B031EC21D65; Thu, 22 Feb 2018 10:26:03 +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=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 5C526C21D72; Thu, 22 Feb 2018 10:26:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AA0F5C21D65; Thu, 22 Feb 2018 10:25:58 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id 0BE45C21C50 for ; Thu, 22 Feb 2018 10:25:57 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1MAPtnd001828; Thu, 22 Feb 2018 04:25:55 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519295155; bh=2XNo5x91Alv7ap5J58AMFvZGmsOLztILIJOr+RckhOg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EMW3KhPtMtKrusawE/2ZUjD+sCbVzLnU7Cc4i2KqsjZI9Goc05OgaHFQtZLhvE8e3 ZQJKUf3gk4/RiuxxWq7RfdQv5Ps9wLnw6d5UZa+oJLXE2sLwlhVkqCdnKtwMDLGSFq S4iLuomAyQulWeh/d2XF1AT/TSXnp212WCQdGyvI= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPtDp020388; Thu, 22 Feb 2018 04:25:55 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 22 Feb 2018 04:25:55 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 22 Feb 2018 04:25:55 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPsCZ030894; Thu, 22 Feb 2018 04:25:54 -0600 From: Jean-Jacques Hiblot To: , Date: Thu, 22 Feb 2018 11:25:46 +0100 Message-ID: <1519295148-6817-3-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519295148-6817-1-git-send-email-jjhiblot@ti.com> References: <1519295148-6817-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 v1 2/4] mmc: omap_hsmmc: compile out write support if not needed 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" This reduces the size of the binary by about 196 bytes. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini --- drivers/mmc/omap_hsmmc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index e0b679a..8b57edc 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -1181,8 +1181,9 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size) return 0; } +#if CONFIG_IS_ENABLED(MMC_WRITE) static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, - unsigned int size) + unsigned int size) { unsigned int *input_buf = (unsigned int *)buf; unsigned int mmc_stat; @@ -1235,7 +1236,13 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, } return 0; } - +#else +static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, + unsigned int size) +{ + return -ENOTSUPP; +} +#endif static void omap_hsmmc_stop_clock(struct hsmmc *mmc_base) { writel(readl(&mmc_base->sysctl) & ~CEN_ENABLE, &mmc_base->sysctl); From patchwork Thu Feb 22 10:25:47 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: 876580 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="FC0EptiY"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zn9Xn4rp5z9sVy for ; Thu, 22 Feb 2018 21:27:53 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 46A9AC21E76; Thu, 22 Feb 2018 10:26:40 +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=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 29DADC21F1D; Thu, 22 Feb 2018 10:26:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C33DDC21C50; Thu, 22 Feb 2018 10:25:59 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 37BADC21D65 for ; Thu, 22 Feb 2018 10:25:59 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1MAPumM011984; Thu, 22 Feb 2018 04:25:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519295156; bh=srfzfCRlU4xXCRGyqn5q5uZ+Nz59I5YLzxcTHMH2UtE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FC0EptiYbK/jnCAeHT6OBarLWT+SrHY+6yg/tbSsjocWs91gV3azt+VLjmzbA1spl MVGfiuz1I8SRRn3R7URNiZoMIaSJBGhH7NuzfNlajoECNp7bhA4whNEZY2JIwFa9fD M8DvALnCxTCQSezT/hFY7iLWa+p5+qglXzqtohs0= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPuJI018989; Thu, 22 Feb 2018 04:25:56 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 22 Feb 2018 04:25:56 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 22 Feb 2018 04:25:56 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPtKc013680; Thu, 22 Feb 2018 04:25:56 -0600 From: Jean-Jacques Hiblot To: , Date: Thu, 22 Feb 2018 11:25:47 +0100 Message-ID: <1519295148-6817-4-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519295148-6817-1-git-send-email-jjhiblot@ti.com> References: <1519295148-6817-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 v1 3/4] mmc: omap_hsmmc: compile out ADMA support for am33xx and omap34xx 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" This reduces the size of the binary by about 600 bytes. Signed-off-by: Jean-Jacques Hiblot --- drivers/mmc/omap_hsmmc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 8b57edc..31c1f66 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -48,6 +48,10 @@ #include #include +#if !defined(CONFIG_AM33XX) && !defined(CONFIG_OMAP34XX) +#define ADMA_SUPPORT +#endif + DECLARE_GLOBAL_DATA_PTR; /* simplify defines to OMAP_HSMMC_USE_GPIO */ @@ -93,7 +97,7 @@ struct omap_hsmmc_data { enum bus_mode mode; #endif u8 controller_flags; -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT struct omap_hsmmc_adma_desc *adma_desc_table; uint desc_slot; #endif @@ -117,7 +121,7 @@ struct omap_mmc_of_data { u8 controller_flags; }; -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT struct omap_hsmmc_adma_desc { u8 attr; u8 reserved; @@ -741,7 +745,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) return -ETIMEDOUT; } } -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT reg_val = readl(&mmc_base->hl_hwinfo); if (reg_val & MADMA_EN) priv->controller_flags |= OMAP_HSMMC_USE_ADMA; @@ -834,7 +838,7 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit) } } -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT static void omap_hsmmc_adma_desc(struct mmc *mmc, char *buf, u16 len, bool end) { struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc); @@ -1037,7 +1041,7 @@ static int omap_hsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, else flags |= (DP_DATA | DDIR_WRITE); -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT if ((priv->controller_flags & OMAP_HSMMC_USE_ADMA) && !mmc_is_tuning_cmd(cmd->cmdidx)) { omap_hsmmc_prepare_data(mmc, data); @@ -1082,7 +1086,7 @@ static int omap_hsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, } } -#ifndef CONFIG_OMAP34XX +#ifdef ADMA_SUPPORT if ((priv->controller_flags & OMAP_HSMMC_USE_ADMA) && data && !mmc_is_tuning_cmd(cmd->cmdidx)) { u32 sz_mb, timeout; From patchwork Thu Feb 22 10:25:48 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: 876579 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="FI0zIRYU"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zn9XH6SjGz9sVy for ; Thu, 22 Feb 2018 21:27:27 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7F6E2C21EA7; Thu, 22 Feb 2018 10:26:57 +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=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 297F0C21F3E; Thu, 22 Feb 2018 10:26:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A59DEC21D65; Thu, 22 Feb 2018 10:26:00 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id F3D5AC21D65 for ; Thu, 22 Feb 2018 10:25:59 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1MAPwgJ011992; Thu, 22 Feb 2018 04:25:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519295158; bh=cbyheGYJzQMRFlgNpo1GJEdoG0zmoG0p5xX2uYVqcd4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FI0zIRYUz/POtzzHCMpMH0GU8R38UbYKsXbkJhK6cbLyIavR7TFgiG0ifuNDeDy7r wGUrzqPD1Cj2qMbWcOH0qELhRfiF17EgVMwviOnz9FSIvt7c0DaWgvAsvWGSVJHfvu GVNjZU0uIR2JvmyVORpTlc6GpM1Ma0g5bmjdXfPs= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPwdi019012; Thu, 22 Feb 2018 04:25:58 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 22 Feb 2018 04:25:57 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 22 Feb 2018 04:25:57 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1MAPuxI030757; Thu, 22 Feb 2018 04:25:57 -0600 From: Jean-Jacques Hiblot To: , Date: Thu, 22 Feb 2018 11:25:48 +0100 Message-ID: <1519295148-6817-5-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519295148-6817-1-git-send-email-jjhiblot@ti.com> References: <1519295148-6817-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 v1 4/4] mmc: omap_hsmmc: use a default 52MHz max clock rate if none is specified 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" mmc_of_parse() doesn't set a default value if none is available in DT. In that case, use a default 52MHz clock rate. Signed-off-by: Alex Kiernan Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini --- drivers/mmc/omap_hsmmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 31c1f66..f61fae9 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -1836,6 +1836,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev) if (ret < 0) return ret; + if (!cfg->f_max) + cfg->f_max = 52000000; cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS; cfg->f_min = 400000; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;