ARM: at91: pm: configure wakeup sources for ULP1 mode
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Tue, 17 Jul 2018 11:06:24 +0000 (14:06 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 17 Jul 2018 13:08:12 +0000 (15:08 +0200)
commitd7484f5c6b3b0565d2395aece2862f183581e1c1
tree4c77bc564737e34f56529b5a9628c263f26e69d6
parent3abd729aa468d7346f12d7dfc8f81aba653f6c88
ARM: at91: pm: configure wakeup sources for ULP1 mode

Since for ULP1 PM mode of SAMA5D2 the wakeup sources are limited and
well known add a method to check if these wakeup sources are defined by
user (either via DT or filesystem). In case there are no wakeup sources
defined for ULP1 the PM suspend will fail, otherwise these will be
configured in fast startup registers of PMC. Since wakeup sources of
ULP1 need also to be configured in SHDWC registers the code was a bit
changed to map the SHDWC also in case ULP1 is requested by user (this
was done in the initialization phase). In case the ULP1 initialization
fails the ULP0 mode is used (this mode was also used in case backup mode
initialization failed).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
arch/arm/mach-at91/pm.c