ARM: bL_switcher: Add synchronous enable/disable interface
authorDave Martin <dave.martin@linaro.org>
Mon, 10 Dec 2012 17:19:57 +0000 (17:19 +0000)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Mon, 23 Sep 2013 22:38:54 +0000 (18:38 -0400)
commitc0f4375146a738bae23e48fa8b5383abf02177cb
tree271ff2cfeeaa91ebf6c0345814973ad7d67154a1
parent7f63037c8fb204f666367c6469f5a9b9d6888877
ARM: bL_switcher: Add synchronous enable/disable interface

Some subsystems will need to know for sure whether the switcher is
enabled or disabled during certain critical regions.

This patch provides a simple mutex-based mechanism to discover
whether the switcher is enabled and temporarily lock out further
enable/disable:

  * bL_switcher_get_enabled() returns true iff the switcher is
    enabled and temporarily inhibits enable/disable.

  * bL_switcher_put_enabled() permits enable/disable of the switcher
    again after a previous call to bL_switcher_get_enabled().

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
arch/arm/common/bL_switcher.c
arch/arm/include/asm/bL_switcher.h