From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83BC5C433EF for ; Thu, 28 Apr 2022 11:33:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F39781A02; Thu, 28 Apr 2022 13:33:32 +0200 (CEST) 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="LUAQWeaW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B68880818; Thu, 28 Apr 2022 13:33:30 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EEF5781A02 for ; Thu, 28 Apr 2022 13:33:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8FDDAB82C88; Thu, 28 Apr 2022 11:33:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EDC7C385A0; Thu, 28 Apr 2022 11:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651145596; bh=vpfwF6qqlmyEpVJ9fSbefQTJp4XVE8PfEoJ5IkuegBU=; h=From:To:Cc:Subject:Date:From; b=LUAQWeaWfXOj9lxuYuqSLjhZTk5XceaWI2+3GbAonRlnVUyWCyQv7cOk6IyUQQd63 7+NzcaTsOTBAQuHkZteLVGjhf95O+s3SucM2mvoLDbwQa3aGNCJJC6h/xfmoXi4cba Y5pqtoSol8pN/Zcw94/TCliturVYcD0FCbay/ZRQ+r/jDjeaABdIt2DhsTfjhoodXV DrySfmHKN3dSmbQmmsGUOw/Nphim8DU/jObr0dwql0fGpIuX1x08sqUdEC0pmuqPJQ 0nVzgQTE3CBOCNkLEdFMtiMnLIsF4yFAVVXRv0sV1noCb5QTxM0FrdJASAVyznPJ82 J7ngPdUS94Ktw== Received: by pali.im (Postfix) id BE8E68A0; Thu, 28 Apr 2022 13:33:13 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: u-boot@lists.denx.de Subject: [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files Date: Thu, 28 Apr 2022 13:33:09 +0200 Message-Id: <20220428113309.10039-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean Allow to compile assembler files in SPL build which calls WATCHDOG_RESET function when watchdog is disabled in SPL and enabled in U-Boot proper. This issue was fixed in past by commit 7fbd42f5afc4 ("watchdog: Handle SPL build with watchdog disabled") for C source files, but not for assembler source files. Currently the only assembler source file which calls WATCHDOG_RESET is arch/powerpc/lib/ticks.S, so this patch affects and fixes powerpc SPL builds. Signed-off-by: Pali Rohár --- include/watchdog.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/watchdog.h b/include/watchdog.h index 14fa5fda259e..813cc8f2a5d3 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -49,7 +49,13 @@ int init_func_watchdog_reset(void); */ #if defined(CONFIG_WATCHDOG) #if defined(__ASSEMBLY__) - #define WATCHDOG_RESET bl watchdog_reset + /* Don't require the watchdog to be enabled in SPL */ + #if defined(CONFIG_SPL_BUILD) && \ + !defined(CONFIG_SPL_WATCHDOG) + #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/ + #else + #define WATCHDOG_RESET bl watchdog_reset + #endif #else /* Don't require the watchdog to be enabled in SPL */ #if defined(CONFIG_SPL_BUILD) && \ -- 2.20.1