All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
To: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Philipp Tomsich
	<philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org>
Cc: Jagan Teki
	<jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>,
	u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org,
	Akash Gajjar <akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled
Date: Mon, 26 Aug 2019 23:51:08 +0530	[thread overview]
Message-ID: <20190826182111.30999-14-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20190826182111.30999-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>

This patch handle a checks to not enable watchdog in TPL,
if TPL won't require to enable that.

This is useful, in rockchip platforms where watchdog would
require in SPL and U-Boot proper and optional to have it
in TPL. So, without this check, the TPL build failed to get
the watchdog_reset function even though the watchdog is not
enable for it.

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 include/watchdog.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/watchdog.h b/include/watchdog.h
index a4a4e8e614..f04e3e7c4d 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -51,9 +51,10 @@ int init_func_watchdog_reset(void);
 		#if defined(__ASSEMBLY__)
 			#define WATCHDOG_RESET bl watchdog_reset
 		#else
-			/* Don't require the watchdog to be enabled in SPL */
-			#if defined(CONFIG_SPL_BUILD) &&		\
-				!defined(CONFIG_SPL_WATCHDOG_SUPPORT)
+			/* Don't require the watchdog to be enabled in TPL/SPL */
+			#if ((defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_BUILD)) && \
+			      (!defined(CONFIG_TPL_WATCHDOG_SUPPORT) || \
+			       !defined(CONFIG_SPL_WATCHDOG_SUPPORT)))
 				#define WATCHDOG_RESET() {}
 			#else
 				extern void watchdog_reset(void);
-- 
2.18.0.321.gffc6fa0e3

WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled
Date: Mon, 26 Aug 2019 23:51:08 +0530	[thread overview]
Message-ID: <20190826182111.30999-14-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20190826182111.30999-1-jagan@amarulasolutions.com>

This patch handle a checks to not enable watchdog in TPL,
if TPL won't require to enable that.

This is useful, in rockchip platforms where watchdog would
require in SPL and U-Boot proper and optional to have it
in TPL. So, without this check, the TPL build failed to get
the watchdog_reset function even though the watchdog is not
enable for it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 include/watchdog.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/watchdog.h b/include/watchdog.h
index a4a4e8e614..f04e3e7c4d 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -51,9 +51,10 @@ int init_func_watchdog_reset(void);
 		#if defined(__ASSEMBLY__)
 			#define WATCHDOG_RESET bl watchdog_reset
 		#else
-			/* Don't require the watchdog to be enabled in SPL */
-			#if defined(CONFIG_SPL_BUILD) &&		\
-				!defined(CONFIG_SPL_WATCHDOG_SUPPORT)
+			/* Don't require the watchdog to be enabled in TPL/SPL */
+			#if ((defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_BUILD)) && \
+			      (!defined(CONFIG_TPL_WATCHDOG_SUPPORT) || \
+			       !defined(CONFIG_SPL_WATCHDOG_SUPPORT)))
 				#define WATCHDOG_RESET() {}
 			#else
 				extern void watchdog_reset(void);
-- 
2.18.0.321.gffc6fa0e3

  parent reply	other threads:[~2019-08-26 18:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 18:20 [PATCH v2 00/16] rk3399: Add redundant boot support Jagan Teki
2019-08-26 18:20 ` [U-Boot] " Jagan Teki
     [not found] ` <20190826182111.30999-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-08-26 18:20   ` [PATCH v2 01/16] rockchip: Add cpu-info Jagan Teki
2019-08-26 18:20     ` [U-Boot] " Jagan Teki
2019-09-02  8:33     ` Kever Yang
2019-09-02  8:33       ` [U-Boot] " Kever Yang
2019-08-26 18:20   ` [PATCH v2 02/16] rockchip: rk3288/rk3399: Enable DISPLAY_CPUINFO Jagan Teki
2019-08-26 18:20     ` [U-Boot] " Jagan Teki
2019-08-26 18:20   ` [PATCH v2 03/16] arm: rockchip: Add common cru.h Jagan Teki
2019-08-26 18:20     ` [U-Boot] " Jagan Teki
2019-08-26 18:20   ` [PATCH v2 04/16] rockchip: Add rk3399 reset cause Jagan Teki
2019-08-26 18:20     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 05/16] wdt: designware: Simplify is_enabled function Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 06/16] wdt: designware: Simplify enable function Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 07/16] wdt: dw: Add driver-model support Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 08/16] wdt: dw: Rename to dw_wdt.c Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 09/16] rockchip: dts: rk3399: Add u-boot, dm-pre-reloc for watchdog Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 10/16] wdt: Kconfig: Add WDT_DW entry Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 11/16] wdt: Kconfig: Add TPL_WDT entry Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 12/16] spl: Add watchdog support fot TPL Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` Jagan Teki [this message]
2019-08-26 18:21     ` [U-Boot] [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled Jagan Teki
2019-08-26 18:21   ` [DO NOT MERGE] [PATCH v2 14/16] rk3399: rockpro64: Enable watchdog Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [PATCH v2 15/16] rockchip: rk3399: Add bootcount support Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki
2019-08-26 18:21   ` [DO NOT MERGE] [PATCH v2 16/16] rk3399: rockpro64: Enable bootcount Jagan Teki
2019-08-26 18:21     ` [U-Boot] " Jagan Teki

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=20190826182111.30999-14-jagan@amarulasolutions.com \
    --to=jagan-dyjbcgdgk7pe9whmmfpqlfatqe2ktcn/@public.gmane.org \
    --cc=akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org \
    --cc=kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \
    /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 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.