From patchwork Mon Jun 11 19:00:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 927849 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=caione.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eP2j4JCJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 414Mnd5F5Lz9rvt for ; Tue, 12 Jun 2018 05:01:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 55AF3C21DFB; Mon, 11 Jun 2018 19:01:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A9640C21DA2; Mon, 11 Jun 2018 19:01:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F2DF8C21DEC; Mon, 11 Jun 2018 19:01:10 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id 41A50C21DCA for ; Mon, 11 Jun 2018 19:01:07 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id r11-v6so10726820pfl.6 for ; Mon, 11 Jun 2018 12:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=TA1QN2SYY6E1+92f1Orouy3UEasy2WKNt1WmpS+23us=; b=eP2j4JCJRpufT/sBAd+X789tj5JWHJKZ6PwMNu6l/Ctz+JSx+NYx+AM3/HR01MWe2A jhIdlGSPvOcWRhxDCkEJOouzqKbXYDjxUU/RPXBFbYaToS1NubVqXtFQF0zHFQRksSWi Es4dcXK9gHgFYeW/8eits1UIKyAY86Y4ccITulGPuhdAblCEMZ8BqjB/QOaHashPDpqI 4pi/XDS1MPAeeHom1otW4bfO1uEZOi+Y6mST//E040PrHxZ+8Z7WUXxLGPzBIVH5djl4 Sjw/rEEtQVHqZ9TOc/kHc0TM8YwgKpihwIzQ73JJ5Imc/C1rCU9onyIcmSpDFxrfnrbn D8LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=TA1QN2SYY6E1+92f1Orouy3UEasy2WKNt1WmpS+23us=; b=NVbaFly2MevULVt0iqz9T2DBtNqWyEqzSRebnuqtiOGDNhc8M2FyoBMpC6zsqKh7WX QKCKImxlnirLpvx+Ga4E3FZKemUr/cQD7LsSHxyiUf3GE08vejwKHkgD0jqn36MkHm0C Y93a0v1dUNnj7zJbKOWNX8nx8bKNC2KuJOHwtYkayr6bWzYNbaqWwm/ZACDafpbPdvb/ q4U4DuC8QOb1Mj7TkASd/didT7SK6eOaSa4tVYj0SrY1T3hz+4V5PaOO3sdTxH/couD7 h5JKNdstXfjT4nvkXJrW8hLahERbd3RAYc7XIU5Zwdzqzu98hJQknYN9AeeEcj1TNItU OoPA== X-Gm-Message-State: APt69E2o3o0vgaY0nMsLXiZGy1iFzTKaVKnCsozRfR0R0Hcy4W4fol4s NuXs92UVQ+0cV0J7jPO+31o= X-Google-Smtp-Source: ADUXVKJJeVenoEpg8+sg7pgh1z7nuepBmNAFFo7sbw1Pa3oBTFLnbqnXvykZV9MDeQum/EQyGwrQfQ== X-Received: by 2002:a65:6290:: with SMTP id f16-v6mr311710pgv.155.1528743665895; Mon, 11 Jun 2018 12:01:05 -0700 (PDT) Received: from localhost.localdomain ([2a00:23c4:f78b:2a00:4533:23a5:db75:b5ae]) by smtp.gmail.com with ESMTPSA id h10-v6sm44920834pgc.28.2018.06.11.12.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 12:01:05 -0700 (PDT) From: Carlo Caione To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, albert.u.boot@aribaud.net, u-boot@lists.denx.de, linux@endlessm.com Date: Mon, 11 Jun 2018 20:00:49 +0100 Message-Id: <20180611190051.6897-3-carlo@caione.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611190051.6897-1-carlo@caione.org> References: <20180611190051.6897-1-carlo@caione.org> Cc: Carlo Caione Subject: [U-Boot] [PATCH v3 2/4] rk3288: Disable JTAG function from sdmmc0 IO X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Carlo Caione 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 Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- arch/arm/mach-rockchip/rk3288-board.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index 0365793009..bf24d8e074 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,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; }