From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8D3CECAAD3 for ; Sat, 17 Sep 2022 08:15:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E884C849BC; Sat, 17 Sep 2022 10:14:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1663402498; bh=J4zP16FMVpVXihXaEKXJCeF3I1zE0Mcl1Bsx6QXbCFk=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=MrymGkQdr/l+bsA67SmjtgnDM8IsA2KfEkHyJGu981QzelHN5F3Ji4YPS37mL+Qq2 bhTxXWmLZh+xEBQ4wQ1XnaRZIrbO/ohZQc7AXzoDFulK15AymBperc2LfBXkaJjCfK 2mxGys3XcPxg1L/RjoFoFb5kK50QyVB6lDsLrF0GEW/shpEC1ysYsKMBcMn0P9DHzv KsYi76ogFVDBQeCXdJ0b52+owsmxUBAfVbpZCsdMNdigd+b8wYBlLw+qIt9UWCEcuE A9/DR4sZE7j2q4j23qQELMPEUa49vuAMqReytSxngc7ON0JJHHVKcBsrNeUw8vIgmg m9RTxc9UykNzw== Received: by phobos.denx.de (Postfix, from userid 109) id F04C784BDE; Sat, 17 Sep 2022 10:14:55 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BC6F9845F4 for ; Sat, 17 Sep 2022 10:14:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4MV3dR6VKYz9sSR; Sat, 17 Sep 2022 10:14:51 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, rasmus.villemoes@prevas.dk Subject: [PATCH v2 0/6] Migrate watchdog reset to cyclic infrastructure Date: Sat, 17 Sep 2022 10:14:44 +0200 Message-Id: <20220917081450.21549-1-sr@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This patchset migrates the watchdog triggering (WATCHDOG_RESET calls) to the newly introduced cyclic execution framework. For this, the watchdog driver now registers a cyclic execution function for each WDT device that needs to get serviced. Additionally the cyclic IF is a bit extended to also support the CONFIG_HW_WATCHDOG users. It might make sense to deprecate this HW_WATCHDOG usage at some point. Please note that this migration work is based on the cyclic execution infrastructure, which I posted in the last few weeks. So these cyclic patches need to be applied for this migration to work. Some further cleanup and improvements are possible after this patch. E.g. Heinrich mentioned that the WATCHDOG_RESET call locations need to get improved / changed in some places. Thanks, Stefan Stefan Roese (6): watchdog: Integrate watchdog triggering into the cyclic framework cyclic: Introduce schedule() function cyclic: Use schedule() instead of WATCHDOG_RESET() watchdog: Get rid of ASSEMBLY hacks watchdog: Remove WATCHDOG_RESET macro watchdog: Further cleanup arch/arm/mach-at91/phy.c | 2 +- arch/arm/mach-imx/i2c-mxv7.c | 2 +- arch/arm/mach-socfpga/spl_a10.c | 8 +- .../cmd_stm32prog/stm32prog_serial.c | 6 +- arch/m68k/lib/time.c | 2 +- arch/powerpc/cpu/mpc8xx/cpu_init.c | 2 +- arch/powerpc/lib/bootm.c | 6 +- arch/powerpc/lib/cache.c | 2 +- arch/powerpc/lib/interrupts.c | 2 +- arch/powerpc/lib/ticks.S | 5 +- board/astro/mcf5373l/fpga.c | 4 +- board/dhelectronics/dh_stm32mp1/board.c | 2 +- board/liebherr/display5/spl.c | 2 +- board/nokia/rx51/rx51.c | 2 +- board/st/stm32mp1/stm32mp1.c | 2 +- boot/bootretry.c | 2 +- boot/image-board.c | 2 +- cmd/fastboot.c | 2 +- cmd/mem.c | 16 ++-- cmd/usb_mass_storage.c | 2 +- cmd/ximg.c | 2 +- common/board_f.c | 4 +- common/board_r.c | 2 +- common/cli_readline.c | 4 +- common/console.c | 2 +- common/cyclic.c | 16 ++++ common/dfu.c | 2 +- common/lcd.c | 10 +-- common/menu.c | 6 +- common/usb_kbd.c | 2 +- common/xyzModem.c | 2 +- drivers/block/ide.c | 8 +- drivers/crypto/aspeed/aspeed_hace.c | 2 +- drivers/crypto/hash/hash_sw.c | 2 +- drivers/ddr/altera/sdram_arria10.c | 4 +- drivers/ddr/altera/sdram_n5x.c | 4 +- drivers/ddr/altera/sdram_soc64.c | 2 +- drivers/fpga/intel_sdm_mb.c | 8 +- drivers/fpga/socfpga_arria10.c | 8 +- drivers/i2c/mxc_i2c.c | 4 +- drivers/mmc/octeontx_hsmmc.c | 12 +-- drivers/mmc/sh_mmcif.c | 6 +- drivers/mmc/stm32_sdmmc2.c | 2 +- drivers/mtd/cfi_flash.c | 4 +- drivers/mtd/nand/core.c | 2 +- drivers/mtd/nand/raw/atmel_nand.c | 6 +- drivers/mtd/nand/raw/nand_base.c | 10 +-- drivers/mtd/nand/raw/nand_util.c | 6 +- drivers/mtd/nand/spi/core.c | 4 +- drivers/mtd/onenand/onenand_base.c | 4 +- drivers/mtd/spi/spi-nor-core.c | 4 +- drivers/net/octeontx2/nix.c | 2 +- drivers/net/octeontx2/nix_af.c | 32 ++++---- drivers/ram/stm32mp1/stm32mp1_tests.c | 2 +- drivers/serial/atmel_usart.c | 2 +- drivers/serial/ns16550.c | 6 +- drivers/serial/serial-uclass.c | 2 +- drivers/serial/serial_bcm283x_mu.c | 2 +- drivers/serial/serial_lpuart.c | 8 +- drivers/serial/serial_mpc8xx.c | 4 +- drivers/serial/serial_mt7620.c | 2 +- drivers/serial/serial_mtk.c | 4 +- drivers/serial/serial_mxc.c | 6 +- drivers/serial/serial_octeon_bootcmd.c | 2 +- drivers/serial/serial_octeon_pcie_console.c | 4 +- drivers/serial/serial_pl01x.c | 8 +- drivers/serial/serial_sifive.c | 2 +- drivers/serial/serial_zynq.c | 2 +- drivers/spi/mtk_snfi_spi.c | 2 +- drivers/spi/octeon_spi.c | 2 +- drivers/spi/stm32_qspi.c | 2 +- drivers/timer/mpc83xx_timer.c | 4 +- drivers/usb/eth/lan7x.h | 4 +- drivers/usb/gadget/f_acm.c | 4 +- drivers/usb/gadget/f_sdp.c | 4 +- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/musb-new/musb_uboot.c | 2 +- drivers/video/video_bmp.c | 4 +- drivers/watchdog/Kconfig | 2 + drivers/watchdog/wdt-uclass.c | 73 +++++++++++-------- env/common.c | 2 +- fs/cramfs/uncompress.c | 3 +- fs/jffs2/jffs2_1pass.c | 2 +- include/cyclic.h | 12 +++ include/linux/compat.h | 2 +- include/wait_bit.h | 2 +- include/watchdog.h | 68 +---------------- lib/bzip2/bzlib.c | 2 +- lib/bzip2/bzlib_decompress.c | 8 +- lib/crc32.c | 2 +- lib/efi_loader/efi_boottime.c | 4 +- lib/gunzip.c | 2 +- lib/lzma/LzmaDec.c | 16 ++-- lib/lzma/LzmaTools.c | 2 +- lib/md5.c | 2 +- lib/sha1.c | 2 +- lib/sha256.c | 2 +- lib/sha512.c | 4 +- lib/time.c | 2 +- lib/zlib/inflate.c | 8 +- net/net.c | 2 +- post/cpu/mpc83xx/ecc.c | 2 +- post/drivers/memory.c | 36 ++++----- post/lib_powerpc/cpu.c | 16 ++-- post/lib_powerpc/fpu/fpu.c | 4 +- post/post.c | 4 +- test/common/cyclic.c | 2 +- test/dm/wdt.c | 9 ++- 108 files changed, 311 insertions(+), 333 deletions(-) -- 2.37.3