watchdog: Move watchdog_dev to data section (BSS may not be cleared)
authorStefan Roese <sr@denx.de>
Wed, 3 Apr 2019 07:12:48 +0000 (09:12 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 8 Apr 2019 13:21:39 +0000 (09:21 -0400)
commitccd063e9812a2bdcbeafbbcd8dcb062bfc290f24
tree3aa26119f289517fddfc0387279e400938b384d1
parentafbc31948a007e03d6a1282677aafc2208f45819
watchdog: Move watchdog_dev to data section (BSS may not be cleared)

This patch moves all instances of static "watchdog_dev" declarations to
the "data" section. This may be needed, as the BSS may not be cleared
in the early U-Boot phase, where watchdog_reset() is already beeing
called. This may result in incorrect pointer access, as the check to
"!watchdog_dev" in watchdog_reset() may not be true and the function
may continue to run.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Marek BehĂșn" <marek.behun@nic.cz>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
arch/mips/mach-mt7620/cpu.c
board/CZ.NIC/turris_mox/turris_mox.c
board/CZ.NIC/turris_omnia/turris_omnia.c
board/xilinx/microblaze-generic/microblaze-generic.c
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c