public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/11] watchdog: Handle SPL build with watchdog disabled
Date: Wed, 20 Mar 2019 07:30:16 +0000	[thread overview]
Message-ID: <6c22122b-33fe-e4af-1ea2-df512fee359a@microchip.com> (raw)
In-Reply-To: <20190319155632.5680-4-sr@denx.de>



On 19.03.2019 17:56, Stefan Roese wrote:
> External E-Mail
> 
> 
> This patch adds some checks, so that the watchdog can be enabled in main
> U-Boot proper but can be disabled in SPL.

Hi Stefan,

Actually your code looks at CONFIG_SPL_WATCHDOG_SUPPORT , so , if this 
is disabled in the config, you say that the watchdog was still enabled? 
(thus broken CONFIG_SPL_WATCHDOG_SUPPORT ?)

Eugen

> 
> This will be used by some AT91SAM based boards, which might enable the
> watchdog in the main U-Boot proper and not in SPL. It will be enabled in
> SPL by default there, so no need to configure it there. This approach
> saves some space in SPL.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Andreas Bießmann <andreas@biessmann.org>
> Cc: Eugen Hristev <eugen.hristev@microchip.com>
> ---
>   include/watchdog.h | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/include/watchdog.h b/include/watchdog.h
> index 14073cfdd2..3a357de903 100644
> --- a/include/watchdog.h
> +++ b/include/watchdog.h
> @@ -51,9 +51,15 @@ int init_func_watchdog_reset(void);
>   		#if defined(__ASSEMBLY__)
>   			#define WATCHDOG_RESET bl watchdog_reset
>   		#else
> -			extern void watchdog_reset(void);
> +			/* Don't require the watchdog to be enabled in SPL */
> +			#if defined(CONFIG_SPL_BUILD) &&		\
> +				!defined(CONFIG_SPL_WATCHDOG_SUPPORT)
> +				#define WATCHDOG_RESET() {}
> +			#else
> +				extern void watchdog_reset(void);
>   
> -			#define WATCHDOG_RESET watchdog_reset
> +				#define WATCHDOG_RESET watchdog_reset
> +			#endif
>   		#endif
>   	#else
>   		/*
> 

  reply	other threads:[~2019-03-20  7:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 15:56 [U-Boot] [PATCH 01/11] arm: at91: Makefile: Compile lowlevel_init only when really necessary Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 02/11] arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 03/11] serial: atmel_usart: Use fixed clock value in SPL version Stefan Roese
2019-03-20  7:25   ` Eugen.Hristev at microchip.com
2019-03-20  7:30     ` Stefan Roese
2019-03-25 14:27       ` Eugen.Hristev at microchip.com
2019-03-25 14:57         ` Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 04/11] watchdog: Handle SPL build with watchdog disabled Stefan Roese
2019-03-20  7:30   ` Eugen.Hristev at microchip.com [this message]
2019-03-20  7:33     ` Stefan Roese
2019-03-20  7:41       ` Eugen.Hristev at microchip.com
2019-03-20  7:48         ` Stefan Roese
2019-03-20  8:06           ` Eugen.Hristev at microchip.com
2019-03-20  8:10             ` Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 05/11] watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start() Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 06/11] arm: at91: Enable watchdog support Stefan Roese
2019-03-21 10:23   ` Eugen.Hristev at microchip.com
2019-03-21 12:00     ` Stefan Roese
2019-03-21 12:07       ` Eugen.Hristev at microchip.com
2019-03-19 15:56 ` [U-Boot] [PATCH 07/11] arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 08/11] Makefile.spl: Move generate AT91SAM NAND image boot.bin to spl directory Stefan Roese
2019-03-25 14:22   ` Eugen.Hristev at microchip.com
2019-03-25 14:24     ` Stefan Roese
2019-03-26  7:06       ` Heiko Schocher
2019-03-19 15:56 ` [U-Boot] [PATCH 09/11] Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 10/11] arm: at91: siemens: Add support to generate combined SPL+U-Boot image Stefan Roese
2019-03-19 15:56 ` [U-Boot] [PATCH 11/11] arm: at91: Add gardena-gateway-at91sam support 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=6c22122b-33fe-e4af-1ea2-df512fee359a@microchip.com \
    --to=eugen.hristev@microchip.com \
    --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