public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
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	[thread overview]
Message-ID: <20220428113309.10039-1-pali@kernel.org> (raw)

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 <pali@kernel.org>
---
 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


             reply	other threads:[~2022-04-28 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 11:33 Pali Rohár [this message]
2022-04-29  6:23 ` [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files Stefan Roese
2022-06-04 13:06 ` Pali Rohár
2022-06-07  8:44   ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428113309.10039-1-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox