From patchwork Thu Jan 7 15:36:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 1423365 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=FB3sajAf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DBVjH6XNSz9sWF for ; Fri, 8 Jan 2021 02:37:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B52C828A0; Thu, 7 Jan 2021 16:36:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="FB3sajAf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B33C828A7; Thu, 7 Jan 2021 16:36:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 98A988289F for ; Thu, 7 Jan 2021 16:36:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matthias.bgg@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 3BC9922AAA; Thu, 7 Jan 2021 15:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610033810; bh=veGpLmRK62gvqWRcspSI1AUVlxcjvpqLlsLluAOi/kQ=; h=From:To:Cc:Subject:Date:From; b=FB3sajAfy3/M5XuihEo0++B97SyOKEcPdNlEW5pNEco9q0UyRkopfAWl3UU3d76ge W9yIZIa6OlvJ1dxkF7MKFUOH0RGq76YvGdZ50yiBbGDPDuhjr7Oi0iqknVUoyPDkN3 xcw7xZEXiCs+iyKLG4c1TwkPLOShIusfSQWxlXd2nSxEj0pFy088b24sDsgN1sQ5pl 6jvhRfb53CcuShAawmku44pTEAzROhdwleuvVFzJiXxcu3hMRB1NjMWcxBXjkVGZDg rqYM6s2vvUXN5EjCVoMyrDMPqS0DQHR2+jSq1noz2CxeTkL62995Pc+zTGKMjsB+af jXGqgsCs9UuZA== From: matthias.bgg@kernel.org To: GSS_MTK_Uboot_upstream@mediatek.com, ryder.lee@mediatek.com, weijie.gao@mediatek.com, frank-w@public-files.de Cc: u-boot@lists.denx.de, Matthias Brugger Subject: [PATCH] board: mediatek: disable watchdog on BananaPi R2 Date: Thu, 7 Jan 2021 16:36:38 +0100 Message-Id: <20210107153638.15241-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Matthias Brugger Watchdog timeout comes in before we are able to load the kernel and reset the watchdog. Disable the watchdog late in the boot process to be able to boot the board. Signed-off-by: Matthias Brugger --- board/mediatek/mt7623/mt7623_rfb.c | 8 ++++++++ configs/mt7623n_bpir2_defconfig | 1 + 2 files changed, 9 insertions(+) diff --git a/board/mediatek/mt7623/mt7623_rfb.c b/board/mediatek/mt7623/mt7623_rfb.c index 984e75ccaf..22120be412 100644 --- a/board/mediatek/mt7623/mt7623_rfb.c +++ b/board/mediatek/mt7623/mt7623_rfb.c @@ -5,6 +5,7 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -40,3 +41,10 @@ int mmc_get_env_dev(void) return mmc_get_boot_dev(); } #endif + +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + wdt_stop(gd->watchdog_dev); +} +#endif diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig index 9177c17dff..fe0b6259dd 100644 --- a/configs/mt7623n_bpir2_defconfig +++ b/configs/mt7623n_bpir2_defconfig @@ -14,6 +14,7 @@ CONFIG_FIT_VERBOSE=y CONFIG_BOOTDELAY=3 CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2.dtb" +CONFIG_BOARD_LATE_INIT=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_BOOTMENU=y