]> git.baikalelectronics.ru Git - uboot.git/commit
reset: socfpga: add reset handling for old kernels
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Fri, 1 Mar 2019 19:12:32 +0000 (20:12 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 17 Apr 2019 20:20:16 +0000 (22:20 +0200)
commitf7b8eb353f39c9d4058e6be50edb790629b09fce
tree24c060e1fffd827eb30c2f8c2a6575f9a759a5dd
parent324747fedf29cc1e8403b716683c932d0d2e617d
reset: socfpga: add reset handling for old kernels

This adds code to take peripherals out of reset based on an environment
variable. This is in preparation for removing the code that does this from
SPL.

However, some drivers even in current Linux cannot handle peripheral reset,
so until this works, we need a compatibility workaround.

This workaround is implemented in the 'assert' and 'remove' callbacks of
this reset driver: the 'assert' callback does not disable peripherals that
were already taken out of reset, while the 'remove' callback, which is
called on OS_PREPARE, deasserts all peripheral resets if the environment
variable "socfpga_legacy_reset_compat" is set to 1, which is what the gen5
SPL did up to now.

This is in preparation to clean up the SPL and implementing proper reset
handling for U-Boot.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
drivers/reset/reset-socfpga.c