All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files
@ 2022-04-28 11:33 Pali Rohár
  2022-04-29  6:23 ` Stefan Roese
  2022-06-04 13:06 ` Pali Rohár
  0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2022-04-28 11:33 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files
  2022-04-28 11:33 [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files Pali Rohár
@ 2022-04-29  6:23 ` Stefan Roese
  2022-06-04 13:06 ` Pali Rohár
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2022-04-29  6:23 UTC (permalink / raw)
  To: Pali Rohár; +Cc: u-boot

On 4/28/22 13:33, Pali Rohár wrote:
> 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>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   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) &&		\

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files
  2022-04-28 11:33 [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files Pali Rohár
  2022-04-29  6:23 ` Stefan Roese
@ 2022-06-04 13:06 ` Pali Rohár
  2022-06-07  8:44   ` Stefan Roese
  1 sibling, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2022-06-04 13:06 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot

PING?

On Thursday 28 April 2022 13:33:09 Pali Rohár wrote:
> 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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files
  2022-06-04 13:06 ` Pali Rohár
@ 2022-06-07  8:44   ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2022-06-07  8:44 UTC (permalink / raw)
  To: Pali Rohár; +Cc: u-boot

On 04.06.22 15:06, Pali Rohár wrote:
> PING?
> 
> On Thursday 28 April 2022 13:33:09 Pali Rohár wrote:
>> 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>

Applied to u-boot-watchdog/master

Thanks,
Stefan

>> ---
>>   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
>>

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-07  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 11:33 [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files Pali Rohár
2022-04-29  6:23 ` Stefan Roese
2022-06-04 13:06 ` Pali Rohár
2022-06-07  8:44   ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.