]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rk3288: Disable JTAG function from sdmmc0 IO
authorCarlo Caione <carlo@endlessm.com>
Mon, 11 Jun 2018 19:00:49 +0000 (20:00 +0100)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 20 Jul 2018 23:55:27 +0000 (01:55 +0200)
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>
arch/arm/mach-rockchip/rk3288-board.c

index 0365793009ed174377cc61573a5088acd4e49659..73cd6684aad8e8eae99288bde9ce9e717dfcf03c 100644 (file)
@@ -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;
 }