Skip to content
Snippets Groups Projects
Commit 183f5fd3 authored by Marek Vasut's avatar Marek Vasut Committed by Tom Rini
Browse files

ARM: rmobile: Fix SD divider settings on Gen3


On RCar M3 and on RCar H3 newer than and not including ES1.0, the SD clock
must be divided by 4 rather than 2 because a hardware workaround present
only in the H3 ES1.0 has been removed from these chips. U-Boot currently
only supports M3 and H3 ES 2.0 and newer, so configure the SD pre-divider
to 4 to prevent SD instability.

Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
parent ec6bc928
No related branches found
No related tags found
No related merge requests found
...@@ -74,10 +74,10 @@ int board_early_init_f(void) ...@@ -74,10 +74,10 @@ int board_early_init_f(void)
/* SDHI0, 3 */ /* SDHI0, 3 */
mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SD0_MSTP314 | SD3_MSTP311); mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SD0_MSTP314 | SD3_MSTP311);
writel(0, SD0CKCR); writel(1, SD0CKCR);
writel(0, SD1CKCR); writel(1, SD1CKCR);
writel(0, SD2CKCR); writel(1, SD2CKCR);
writel(0, SD3CKCR); writel(1, SD3CKCR);
#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH) #if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */ /* DVFS for reset */
......
...@@ -72,10 +72,10 @@ int board_early_init_f(void) ...@@ -72,10 +72,10 @@ int board_early_init_f(void)
/* SDHI0 */ /* SDHI0 */
mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SD0_MSTP314); mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SD0_MSTP314);
writel(0, SD0CKCR); writel(1, SD0CKCR);
writel(0, SD1CKCR); writel(1, SD1CKCR);
writel(0, SD2CKCR); writel(1, SD2CKCR);
writel(0, SD3CKCR); writel(1, SD3CKCR);
#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH) #if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */ /* DVFS for reset */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment