All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled
@ 2020-01-23 19:05 Walter Lozano
  2020-01-30  2:19 ` Simon Glass
  2020-03-16 14:18 ` Stefan Roese
  0 siblings, 2 replies; 3+ messages in thread
From: Walter Lozano @ 2020-01-23 19:05 UTC (permalink / raw)
  To: u-boot

Currently watchdog tries to use dev_read_u32_default to get timeout
configuration in case OF_CONTROL is enabled. However, if SPL is
built with OF_PLATDATA this has no sense as there is no device tree.

This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL
is enabled but OF_PLATDATA is not.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
---
 include/wdt.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/wdt.h b/include/wdt.h
index 5bcff24ab3..dd83dfdd32 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -130,11 +130,10 @@ static inline int initr_watchdog(void)
 		}
 	}
 
-	if (CONFIG_IS_ENABLED(OF_CONTROL)) {
+	if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
 		timeout = dev_read_u32_default(gd->watchdog_dev, "timeout-sec",
 					       WATCHDOG_TIMEOUT_SECS);
 	}
-
 	wdt_start(gd->watchdog_dev, timeout * 1000, 0);
 	gd->flags |= GD_FLG_WDT_READY;
 	printf("WDT:   Started with%s servicing (%ds timeout)\n",
-- 
2.20.1

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

* [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled
  2020-01-23 19:05 [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled Walter Lozano
@ 2020-01-30  2:19 ` Simon Glass
  2020-03-16 14:18 ` Stefan Roese
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-01-30  2:19 UTC (permalink / raw)
  To: u-boot

On Thu, 23 Jan 2020 at 12:05, Walter Lozano <walter.lozano@collabora.com> wrote:
>
> Currently watchdog tries to use dev_read_u32_default to get timeout
> configuration in case OF_CONTROL is enabled. However, if SPL is
> built with OF_PLATDATA this has no sense as there is no device tree.
>
> This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL
> is enabled but OF_PLATDATA is not.
>
> Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
> ---
>  include/wdt.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled
  2020-01-23 19:05 [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled Walter Lozano
  2020-01-30  2:19 ` Simon Glass
@ 2020-03-16 14:18 ` Stefan Roese
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2020-03-16 14:18 UTC (permalink / raw)
  To: u-boot

On 23.01.20 20:05, Walter Lozano wrote:
> Currently watchdog tries to use dev_read_u32_default to get timeout
> configuration in case OF_CONTROL is enabled. However, if SPL is
> built with OF_PLATDATA this has no sense as there is no device tree.
> 
> This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL
> is enabled but OF_PLATDATA is not.
> 
> Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
> ---

Applied to u-boot-marvell/master.

Thanks,
Stefan

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

end of thread, other threads:[~2020-03-16 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 19:05 [PATCH] watchdog: Use dev_read only if OF_PLATDATA is not enabled Walter Lozano
2020-01-30  2:19 ` Simon Glass
2020-03-16 14:18 ` 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.