[coreboot-gerrit] New patch to review for coreboot: gru: implement hw reset function

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Fri Jul 15 18:28:32 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15718

-gerrit

commit ae6efad586af2b0500b57c20e139036a2cbb918f
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Wed Jul 13 23:12:27 2016 -0700

    gru: implement hw reset function
    
    Asserting this GPIO will send a signal to the EC to trigger a reset
    for the AP and the CR50.
    
    BRANCH=none
    BUG=chrome-os-partner:55252
    TEST=the device now reboots when it needs to switch between different
         boot modes instead of hanging with "failed to reboot" message.
    
    Change-Id: I8d168e313b6983c96c80f7ad6d70bb84c1ec1d9c
    Signed-off-by: Martin Roth <martinroth at chromium.org>
    Original-Commit-Id: 83a4c8ff68ab24a103f2166e948eb23624ea97f7
    Original-Change-Id: Idfd20977cf3682bd8933f89e8eec53005e55864e
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/360238
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
---
 src/mainboard/google/gru/Makefile.inc | 2 --
 src/mainboard/google/gru/reset.c      | 7 ++++++-
 src/soc/rockchip/rk3399/Makefile.inc  | 2 ++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/mainboard/google/gru/Makefile.inc b/src/mainboard/google/gru/Makefile.inc
index 9e87fad..a0839e0 100644
--- a/src/mainboard/google/gru/Makefile.inc
+++ b/src/mainboard/google/gru/Makefile.inc
@@ -16,7 +16,6 @@
 bootblock-y += bootblock.c
 bootblock-y += chromeos.c
 bootblock-y += memlayout.ld
-bootblock-y += reset.c
 
 verstage-y += chromeos.c
 verstage-y += memlayout.ld
@@ -25,7 +24,6 @@ verstage-y += reset.c
 romstage-y += boardid.c
 romstage-y += chromeos.c
 romstage-y += memlayout.ld
-romstage-y += reset.c
 romstage-y += sdram_configs.c
 
 ramstage-y += boardid.c
diff --git a/src/mainboard/google/gru/reset.c b/src/mainboard/google/gru/reset.c
index 31d8b3d..bd06923 100644
--- a/src/mainboard/google/gru/reset.c
+++ b/src/mainboard/google/gru/reset.c
@@ -13,9 +13,14 @@
  * GNU General Public License for more details.
  */
 
-#include <arch/io.h>
+#include <gpio.h>
 #include <reset.h>
 
+#include "board.h"
+
 void hard_reset(void)
 {
+	gpio_output(GPIO_RESET, 1);
+	while (1)
+		;
 }
diff --git a/src/soc/rockchip/rk3399/Makefile.inc b/src/soc/rockchip/rk3399/Makefile.inc
index 28c6338..7a5e7a1 100644
--- a/src/soc/rockchip/rk3399/Makefile.inc
+++ b/src/soc/rockchip/rk3399/Makefile.inc
@@ -29,6 +29,8 @@ bootblock-y += mmu_operations.c
 bootblock-y += timer.c
 
 verstage-y += ../common/cbmem.c
+verstage-y += ../common/gpio.c
+verstage-y += gpio.c
 verstage-y += sdram.c
 verstage-y += ../common/spi.c
 verstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c



More information about the coreboot-gerrit mailing list