]> git.dujemihanovic.xyz Git - u-boot.git/commit
watchdog: omap_wdt: improve watchdog reset path
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Thu, 1 Mar 2018 01:15:48 +0000 (03:15 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 16 Mar 2018 13:42:38 +0000 (09:42 -0400)
commit87c692cbc17bc987c8a5f8c0377d8326348786ea
treee0b0c2549d2b35c6a69a9462408fdfc254f8662a
parentfc228dc96c64674bc6fc85635708eb39708fafc4
watchdog: omap_wdt: improve watchdog reset path

Remove busy looping during watchdog reset.
Each polling of W_PEND_WTGR bit ("finish posted
write") after watchdog reset takes 120-140us
on BeagleBone Black board. Current U-Boot code
has watchdog resets in random places and often
there is situation when watchdog is reset
few times in a row in nested functions.
This adds extra delays and slows the whole system.

Instead of polling W_PEND_WTGR bit, we skip
watchdog reset if the bit is set. Anyway, watchdog
is in the middle of reset *right now*, so we can
just return.

This noticeably increases performance of the
system. Below are some measurements on BBB:
 - DFU upload over USB                 15% faster
 - fastboot image upload               3x times faster
 - USB ep0 transfers with 4k packets   20% faster

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
drivers/watchdog/omap_wdt.c