All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] mx25pdk: Set the eSDHC PER clock to 48 MHz
Date: Wed,  3 May 2017 11:59:06 +0200	[thread overview]
Message-ID: <1493805546-3567-4-git-send-email-benoit@wsystem.com> (raw)
In-Reply-To: <1493805546-3567-1-git-send-email-benoit@wsystem.com>

The maximum SD clock frequency in High Speed mode is 50 MHz. This change
makes it possible to get 48 MHz from the USB PLL (240 MHz / 5 / 1)
instead of the previous 33.25 MHz from the AHB clock (133 MHz / 2 / 2).

Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
---
 board/freescale/mx25pdk/mx25pdk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 788d3c3..cab769c 100644
--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -175,6 +175,12 @@ int board_mmc_init(bd_t *bis)
 
 	imx_iomux_v3_setup_multiple_pads(sdhc1_pads, ARRAY_SIZE(sdhc1_pads));
 
+	/*
+	 * Set the eSDHC1 PER clock to the maximum frequency lower than or equal
+	 * to 50 MHz that can be obtained, which requires to use UPLL as the
+	 * clock source. This actually gives 48 MHz.
+	 */
+	imx_set_perclk(MXC_ESDHC1_CLK, true, 50000000);
 	esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
 	return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
 }
-- 
2.7.4

  parent reply	other threads:[~2017-05-03  9:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03  9:59 [U-Boot] [PATCH 1/4] mmc: fsl_esdhc: Allow all supported prescaler values Benoît Thébaudeau
2017-05-03  9:59 ` [U-Boot] [PATCH 2/4] mx25: Fix imx_get_perclk() Benoît Thébaudeau
2017-05-29 11:18   ` Fabio Estevam
2017-05-31  8:50   ` Stefano Babic
2017-05-03  9:59 ` [U-Boot] [PATCH 3/4] mx25: Add function to set PER clocks Benoît Thébaudeau
2017-05-29 11:19   ` Fabio Estevam
2017-05-31  8:50   ` Stefano Babic
2017-05-03  9:59 ` Benoît Thébaudeau [this message]
2017-05-29 11:20   ` [U-Boot] [PATCH 4/4] mx25pdk: Set the eSDHC PER clock to 48 MHz Fabio Estevam
2017-05-31  8:50   ` Stefano Babic
2017-05-29 11:17 ` [U-Boot] [PATCH 1/4] mmc: fsl_esdhc: Allow all supported prescaler values Fabio Estevam
2017-05-31  8:50 ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493805546-3567-4-git-send-email-benoit@wsystem.com \
    --to=benoit@wsystem.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.