diff mbox

[U-Boot,7/7] ti: wdt: Enable OMAP watchdog in u-boot's board_f.c

Message ID 1487543082-24746-9-git-send-email-lukma@denx.de
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Lukasz Majewski Feb. 19, 2017, 10:24 p.m. UTC
The init_func_watchdog_init called in u-boot's board_f.c's init_sequence
is responsible for enabling WDT in u-boot and notify user about it.

Several other architectures have adopted it for this purpose.
This code does the same with OMAP watchdog.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 common/board_f.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Feb. 20, 2017, 2:24 a.m. UTC | #1
On Sun, Feb 19, 2017 at 11:24:42PM +0100, Lukasz Majewski wrote:
> The init_func_watchdog_init called in u-boot's board_f.c's init_sequence
> is responsible for enabling WDT in u-boot and notify user about it.
> 
> Several other architectures have adopted it for this purpose.
> This code does the same with OMAP watchdog.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  common/board_f.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/board_f.c b/common/board_f.c
> index ae6cd85..5dd56a4 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -120,7 +120,7 @@ static int init_func_watchdog_init(void)
>  	defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
>  	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
>  	defined(CONFIG_DESIGNWARE_WATCHDOG) || \
> -	defined(CONFIG_IMX_WATCHDOG))
> +	defined(CONFIG_IMX_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG))

Please introduce a new symbol here with a reasonable name and select it
on the various platforms, then make OMAP also select it.  Thanks!
Lukasz Majewski Feb. 20, 2017, 7:35 a.m. UTC | #2
Hi Tom,

> On Sun, Feb 19, 2017 at 11:24:42PM +0100, Lukasz Majewski wrote:
> > The init_func_watchdog_init called in u-boot's board_f.c's
> > init_sequence is responsible for enabling WDT in u-boot and notify
> > user about it.
> > 
> > Several other architectures have adopted it for this purpose.
> > This code does the same with OMAP watchdog.
> > 
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >  common/board_f.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/common/board_f.c b/common/board_f.c
> > index ae6cd85..5dd56a4 100644
> > --- a/common/board_f.c
> > +++ b/common/board_f.c
> > @@ -120,7 +120,7 @@ static int init_func_watchdog_init(void)
> >  	defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
> >  	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) ||
> > \ defined(CONFIG_DESIGNWARE_WATCHDOG) || \
> > -	defined(CONFIG_IMX_WATCHDOG))
> > +	defined(CONFIG_IMX_WATCHDOG) ||
> > defined(CONFIG_OMAP_WATCHDOG))
> 
> Please introduce a new symbol here with a reasonable name and select
> it on the various platforms, then make OMAP also select it.  Thanks!

Something similar to CONFIG_SPL_HW_WATCHDOG bu for u-boot?

That would be something like CONFIG_HW_WATCHDOG_INIT ...

> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Tom Rini Feb. 20, 2017, 12:11 p.m. UTC | #3
On Mon, Feb 20, 2017 at 08:35:05AM +0100, Lukasz Majewski wrote:
> Hi Tom,
> 
> > On Sun, Feb 19, 2017 at 11:24:42PM +0100, Lukasz Majewski wrote:
> > > The init_func_watchdog_init called in u-boot's board_f.c's
> > > init_sequence is responsible for enabling WDT in u-boot and notify
> > > user about it.
> > > 
> > > Several other architectures have adopted it for this purpose.
> > > This code does the same with OMAP watchdog.
> > > 
> > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > ---
> > >  common/board_f.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/common/board_f.c b/common/board_f.c
> > > index ae6cd85..5dd56a4 100644
> > > --- a/common/board_f.c
> > > +++ b/common/board_f.c
> > > @@ -120,7 +120,7 @@ static int init_func_watchdog_init(void)
> > >  	defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
> > >  	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) ||
> > > \ defined(CONFIG_DESIGNWARE_WATCHDOG) || \
> > > -	defined(CONFIG_IMX_WATCHDOG))
> > > +	defined(CONFIG_IMX_WATCHDOG) ||
> > > defined(CONFIG_OMAP_WATCHDOG))
> > 
> > Please introduce a new symbol here with a reasonable name and select
> > it on the various platforms, then make OMAP also select it.  Thanks!
> 
> Something similar to CONFIG_SPL_HW_WATCHDOG bu for u-boot?
> 
> That would be something like CONFIG_HW_WATCHDOG_INIT ...

CONFIG_HW_WATCHDOG_INIT sounds good, thanks!
diff mbox

Patch

diff --git a/common/board_f.c b/common/board_f.c
index ae6cd85..5dd56a4 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -120,7 +120,7 @@  static int init_func_watchdog_init(void)
 	defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
 	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
 	defined(CONFIG_DESIGNWARE_WATCHDOG) || \
-	defined(CONFIG_IMX_WATCHDOG))
+	defined(CONFIG_IMX_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG))
 	hw_watchdog_init();
 	puts("       Watchdog enabled\n");
 # endif