diff mbox series

[U-Boot,2/3] rk3288: Disable JTAG function from sdmmc0 IO

Message ID 20180607123918.15245-3-carlo@caione.org
State Superseded
Headers show
Series rk3288: veyron: Enable SDMMC when booting from SPI | expand

Commit Message

Carlo Caione June 7, 2018, 12:39 p.m. UTC
From: Carlo Caione <carlo@endlessm.com>

The GRF_SOC_CON0.grf_force_jtag bit is automatically set at boot and it
is preventing the SDMMC to work correctly. Disable the JTAG function on
the assumption that a working SD has higher priority over JTAG.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
---
 arch/arm/mach-rockchip/rk3288-board.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Simon Glass June 8, 2018, 9:59 p.m. UTC | #1
On 7 June 2018 at 04:39, Carlo Caione <carlo@caione.org> wrote:
> From: Carlo Caione <carlo@endlessm.com>
>
> The GRF_SOC_CON0.grf_force_jtag bit is automatically set at boot and it
> is preventing the SDMMC to work correctly. Disable the JTAG function on
> the assumption that a working SD has higher priority over JTAG.
>
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>  arch/arm/mach-rockchip/rk3288-board.c | 4 ++++
>  1 file changed, 4 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

But please expand your comment to explain why you are disabling JTAG.

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index 0365793009..7499201b73 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -307,6 +307,7 @@  U_BOOT_CMD(
 	""
 );
 
+#define GRF_SOC_CON0 0xff770244
 #define GRF_SOC_CON2 0xff77024c
 
 int board_early_init_f(void)
@@ -339,5 +340,8 @@  int board_early_init_f(void)
 	}
 	rk_setreg(GRF_SOC_CON2, 1 << 0);
 
+	/* Disable JTAG */
+	rk_clrreg(GRF_SOC_CON0, 1 << 12);
+
 	return 0;
 }