From: Stefan Roese Date: Thu, 4 Apr 2019 13:26:14 +0200 Subject: [U-Boot] [PATCH] watchdog: Implement generic watchdog_reset() version In-Reply-To: <20190404112320.20350-1-sr@denx.de> References: <20190404112320.20350-1-sr@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 04.04.19 13:23, Stefan Roese wrote: > This patch tries to implement a generic watchdog_reset() function that > can be used by all boards that want to service the watchdog device in > U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG. >=20 > Without this approach, new boards or platforms needed to implement a > board specific version of this functionality, mostly copy'ing the same > code over and over again into their board or platforms code base. >=20 > With this new generic function, the scattered other functions are now > removed to be replaced by the generic one. The new version also enables > the configuration of the watchdog timeout via the DT "timeout-sec" > property (if enabled via CONFIG_OF_CONTROL). >=20 > This patch also adds a new flag to the GD flags, to flag that the > watchdog is ready to use and adds the pointer to the watchdog device > to the GD. This enables us to remove the global "watchdog_dev" > variable, which was prone to cause problems because of its potentially > very early use in watchdog_reset(), even before the BSS is cleared. >=20 > Signed-off-by: Stefan Roese > Cc: Tom Rini > Cc: Simon Glass > Cc: Heiko Schocher > Cc: Michal Simek > Cc: "Marek Beh=C3=BAn" > Cc: Daniel Schwierzeck > --- > This patch depends on the following patches: >=20 > [1] watchdog: Move watchdog_dev to data section (BSS may not be cleared) > https://patchwork.ozlabs.org/patch/1075500/ >=20 > [2] watchdog: Handle SPL build with watchdog disabled > https://patchwork.ozlabs.org/patch/1074098/ >=20 > I would like to see [2] applied in this release, since its a real fix on > some of the platforms with minimal chances of breakage. Sorry, this should be: "I would like to see [1] applied" (instead of [2]). Thanks, Stefan