gru: Add psci_power_ops
authorJulius Werner <jwerner@chromium.org>
Fri, 8 Jul 2016 00:25:57 +0000 (17:25 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 8 Jul 2016 07:21:47 +0000 (00:21 -0700)
This patch makes Gru-based boards use the new psci_power_ops driver, so
they can now reboot and shut down correctly.

BRANCH=None
BUG=None
TEST=Triggered reboot and power-off reasons on Kevin, observed how
system reacted correctly.

Change-Id: Idd441b820eb075cdd62b02274a57df92ece26161
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358923
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
src/board/gru/board.c

index 15a587c..6b66131 100644 (file)
@@ -29,6 +29,7 @@
 #include "drivers/flash/spi.h"
 #include "drivers/gpio/rockchip.h"
 #include "drivers/gpio/sysinfo.h"
+#include "drivers/power/psci.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98357a.h"
 #include "drivers/sound/route.h"
@@ -134,6 +135,8 @@ static int board_setup(void)
        flag_replace(FLAG_LIDSW, lid_open_gpio());
        flag_replace(FLAG_PWRSW, power_btn_gpio());
 
+       power_set_ops(&psci_power_ops);
+
        SdhciHost *emmc = new_mem_sdhci_host((void *)0xfe330000,
                                             SDHCI_PLATFORM_NO_EMMC_HS200 |
                                             SDHCI_PLATFORM_NO_CLK_BASE,