summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorCarlo Caione <carlo@endlessm.com>2018-06-11 20:00:49 +0100
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-07-21 01:55:27 +0200
commit389167c3c4f77f3e67c1a5ef689a58a44837a2f0 (patch)
treecd14adab6d1f28f41016de009646b13ac066b24d /arch/arm
parent0d4d5fd73cf9e4851e84df09972e928641136314 (diff)
rk3288: Disable JTAG function from sdmmc0 IO
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> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-rockchip/rk3288-board.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index 0365793009..73cd6684aa 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -307,10 +307,10 @@ U_BOOT_CMD(
""
);
-#define GRF_SOC_CON2 0xff77024c
-
int board_early_init_f(void)
{
+ const uintptr_t GRF_SOC_CON0 = 0xff770244;
+ const uintptr_t GRF_SOC_CON2 = 0xff77024c;
struct udevice *pinctrl;
struct udevice *dev;
int ret;
@@ -339,5 +339,11 @@ int board_early_init_f(void)
}
rk_setreg(GRF_SOC_CON2, 1 << 0);
+ /*
+ * Disable JTAG on sdmmc0 IO. The SDMMC won't work until this bit is
+ * cleared
+ */
+ rk_clrreg(GRF_SOC_CON0, 1 << 12);
+
return 0;
}