* [PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning @ 2021-03-06 22:16 Pali Rohár 2021-03-07 13:30 ` Tom Rini 2021-03-09 20:19 ` [PATCH v2] " Pali Rohár 0 siblings, 2 replies; 6+ messages in thread From: Pali Rohár @ 2021-03-06 22:16 UTC (permalink / raw) To: u-boot Signed-off-by: Pali Roh?r <pali@kernel.org> --- This patch increase u-boot.bin binary size above maximal limit. So this patch cannot be applied yet. But it can be applied on top of the LTO patches. So please put this patch into the queue and include it into U-Boot after LTO patches are merged. --- configs/nokia_rx51_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 312ca3a1a991..2949c37f721b 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -67,4 +67,6 @@ CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set CONFIG_SPLASH_SCREEN=y +# CONFIG_WATCHDOG is not set +CONFIG_WDT=y # CONFIG_GZIP is not set -- 2.20.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning 2021-03-06 22:16 [PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning Pali Rohár @ 2021-03-07 13:30 ` Tom Rini 2021-03-09 20:19 ` [PATCH v2] " Pali Rohár 1 sibling, 0 replies; 6+ messages in thread From: Tom Rini @ 2021-03-07 13:30 UTC (permalink / raw) To: u-boot On Sat, Mar 06, 2021 at 11:16:53PM +0100, Pali Roh?r wrote: > Signed-off-by: Pali Roh?r <pali@kernel.org> > --- > This patch increase u-boot.bin binary size above maximal limit. So this > patch cannot be applied yet. But it can be applied on top of the LTO > patches. So please put this patch into the queue and include it into > U-Boot after LTO patches are merged. > --- > configs/nokia_rx51_defconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig > index 312ca3a1a991..2949c37f721b 100644 > --- a/configs/nokia_rx51_defconfig > +++ b/configs/nokia_rx51_defconfig > @@ -67,4 +67,6 @@ CONFIG_CFB_CONSOLE=y > CONFIG_CFB_CONSOLE_ANSI=y > # CONFIG_VGA_AS_SINGLE_DEVICE is not set > CONFIG_SPLASH_SCREEN=y > +# CONFIG_WATCHDOG is not set > +CONFIG_WDT=y > # CONFIG_GZIP is not set Please update include/configs/nokia_rx51.h to not set CONFIG_HW_WATCHDOG and then make sure the appropriate watchdog options are enabled. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210307/16f9593c/attachment.sig> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning 2021-03-06 22:16 [PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning Pali Rohár 2021-03-07 13:30 ` Tom Rini @ 2021-03-09 20:19 ` Pali Rohár 2021-06-07 9:27 ` Lokesh Vutla 2021-06-09 16:55 ` Lokesh Vutla 1 sibling, 2 replies; 6+ messages in thread From: Pali Rohár @ 2021-03-09 20:19 UTC (permalink / raw) To: u-boot Also convert CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG. Signed-off-by: Pali Roh?r <pali@kernel.org> --- This patch increase u-boot.bin binary size above maximal limit. So this patch cannot be applied yet. But it can be applied on top of the LTO patches. So please put this patch into the queue and include it into U-Boot after LTO patches are merged. Changes in v2: * converted CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG --- board/nokia/rx51/rx51.c | 37 ++++++++++++++++++++++++++++++++---- configs/nokia_rx51_defconfig | 2 ++ include/configs/nokia_rx51.h | 3 --- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 7bd5fbd71520..fd3cec8358aa 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -26,6 +26,7 @@ #include <env.h> #include <init.h> #include <watchdog.h> +#include <wdt.h> #include <malloc.h> #include <twl4030.h> #include <i2c.h> @@ -487,20 +488,20 @@ static unsigned long int twl_wd_time; /* last time of watchdog reset */ static unsigned long int twl_i2c_lock; /* - * Routine: hw_watchdog_reset + * Routine: rx51_watchdog_reset * Description: Reset timeout of twl4030 watchdog. */ -void hw_watchdog_reset(void) +static int rx51_watchdog_reset(struct udevice *dev) { u8 timeout = 0; /* do not reset watchdog too often - max every 4s */ if (get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ) - return; + return 0; /* localy lock twl4030 i2c bus */ if (test_and_set_bit(0, &twl_i2c_lock)) - return; + return 0; /* read actual watchdog timeout */ twl4030_i2c_read_u8(TWL4030_CHIP_PM_RECEIVER, @@ -517,8 +518,32 @@ void hw_watchdog_reset(void) /* localy unlock twl4030 i2c bus */ test_and_clear_bit(0, &twl_i2c_lock); + + return 0; +} + +static int rx51_watchdog_start(struct udevice *dev, u64 timeout_ms, ulong flags) +{ + return 0; } +static int rx51_watchdog_probe(struct udevice *dev) +{ + return 0; +} + +static const struct wdt_ops rx51_watchdog_ops = { + .start = rx51_watchdog_start, + .reset = rx51_watchdog_reset, +}; + +U_BOOT_DRIVER(rx51_watchdog) = { + .name = "rx51_watchdog", + .id = UCLASS_WDT, + .ops = &rx51_watchdog_ops, + .probe = rx51_watchdog_probe, +}; + /* * TWL4030 keypad handler for cfb_console */ @@ -722,3 +747,7 @@ U_BOOT_DRVINFOS(rx51_i2c) = { { "i2c_omap", &rx51_i2c[1] }, { "i2c_omap", &rx51_i2c[2] }, }; + +U_BOOT_DRVINFOS(rx51_watchdog) = { + { "rx51_watchdog" }, +}; diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 312ca3a1a991..80b18e435105 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -67,4 +67,6 @@ CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set CONFIG_SPLASH_SCREEN=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=31000 +CONFIG_WDT=y # CONFIG_GZIP is not set diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 23368de624e1..fe991ea03991 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -85,9 +85,6 @@ #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -/* Watchdog support */ -#define CONFIG_HW_WATCHDOG - /* * Framebuffer */ -- 2.20.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning 2021-03-09 20:19 ` [PATCH v2] " Pali Rohár @ 2021-06-07 9:27 ` Lokesh Vutla 2021-06-07 9:30 ` Pali Rohár 2021-06-09 16:55 ` Lokesh Vutla 1 sibling, 1 reply; 6+ messages in thread From: Lokesh Vutla @ 2021-06-07 9:27 UTC (permalink / raw) To: Pali Rohár, Tom Rini; +Cc: u-boot On 10/03/21 1:49 am, Pali Rohár wrote: > Also convert CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG. > > Signed-off-by: Pali Rohár <pali@kernel.org> > --- > This patch increase u-boot.bin binary size above maximal limit. So this > patch cannot be applied yet. But it can be applied on top of the LTO > patches. So please put this patch into the queue and include it into > U-Boot after LTO patches are merged. Hi, Can you ping me once the LTO patches are merged? Thanks and regards, Lokesh ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning 2021-06-07 9:27 ` Lokesh Vutla @ 2021-06-07 9:30 ` Pali Rohár 0 siblings, 0 replies; 6+ messages in thread From: Pali Rohár @ 2021-06-07 9:30 UTC (permalink / raw) To: Lokesh Vutla; +Cc: Tom Rini, u-boot On Monday 07 June 2021 14:57:55 Lokesh Vutla wrote: > On 10/03/21 1:49 am, Pali Rohár wrote: > > Also convert CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG. > > > > Signed-off-by: Pali Rohár <pali@kernel.org> > > --- > > This patch increase u-boot.bin binary size above maximal limit. So this > > patch cannot be applied yet. But it can be applied on top of the LTO > > patches. So please put this patch into the queue and include it into > > U-Boot after LTO patches are merged. > > Hi, > Can you ping me once the LTO patches are merged? ping (they are already merged) > Thanks and regards, > Lokesh > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning 2021-03-09 20:19 ` [PATCH v2] " Pali Rohár 2021-06-07 9:27 ` Lokesh Vutla @ 2021-06-09 16:55 ` Lokesh Vutla 1 sibling, 0 replies; 6+ messages in thread From: Lokesh Vutla @ 2021-06-09 16:55 UTC (permalink / raw) To: Pali Rohár, u-boot; +Cc: Lokesh Vutla On Tue, 9 Mar 2021 21:19:15 +0100, Pali Rohár wrote: > Also convert CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG. Applied to https://source.denx.de/u-boot/custodians/u-boot-ti.git master, thanks! [1/1] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/e61a4ff13f -- Thanks and Regards, Lokesh ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-09 16:56 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-03-06 22:16 [PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning Pali Rohár 2021-03-07 13:30 ` Tom Rini 2021-03-09 20:19 ` [PATCH v2] " Pali Rohár 2021-06-07 9:27 ` Lokesh Vutla 2021-06-07 9:30 ` Pali Rohár 2021-06-09 16:55 ` Lokesh Vutla
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox