summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2014-09-23 15:47:30 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-03-24 15:27:36 +0100
commitaee84263363e4fdc2b7e4762f0b4c7c68a48bea1 (patch)
tree633ed1c870b2686732f9f86f6d44bfe908f9cb6b /src
parent05c370e90401703f18fc5cf9c577408be8668f56 (diff)
downloadcoreboot-aee84263363e4fdc2b7e4762f0b4c7c68a48bea1.tar.xz
pinky: implement hard_reset
this change implements hard_reset, which resets the board. BUG=none TEST=Booted Pinky BRANCH=none Change-Id: Iefb9d96fbddc77892191b62cc2bd0fe6054c3857 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 17633fc8d4132d99c5b4f9f208bf9bd0fbb0773b Original-Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Change-Id: Ia375644be01aa4c2c078ba8c7df94e316d155402 Original-Reviewed-on: https://chromium-review.googlesource.com/219624 Original-Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Original-Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: http://review.coreboot.org/8874 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/veyron_pinky/Kconfig1
-rw-r--r--src/mainboard/google/veyron_pinky/Makefile.inc6
-rw-r--r--src/mainboard/google/veyron_pinky/reset.c28
3 files changed, 34 insertions, 1 deletions
diff --git a/src/mainboard/google/veyron_pinky/Kconfig b/src/mainboard/google/veyron_pinky/Kconfig
index 8db35ab25c..beacefead5 100644
--- a/src/mainboard/google/veyron_pinky/Kconfig
+++ b/src/mainboard/google/veyron_pinky/Kconfig
@@ -28,6 +28,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SOC_ROCKCHIP_RK3288
select MAINBOARD_DO_NATIVE_VGA_INIT
select BOARD_ROMSIZE_KB_4096
+ select HAVE_HARD_RESET
config MAINBOARD_DIR
string
diff --git a/src/mainboard/google/veyron_pinky/Makefile.inc b/src/mainboard/google/veyron_pinky/Makefile.inc
index 7b49a559b8..4936672082 100644
--- a/src/mainboard/google/veyron_pinky/Makefile.inc
+++ b/src/mainboard/google/veyron_pinky/Makefile.inc
@@ -16,12 +16,16 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+bootblock-y += reset.c
+
+verstage-y += reset.c
romstage-y += romstage.c
romstage-y += chromeos.c
romstage-y += sdram_configs.c
+romstage-y += reset.c
ramstage-y += boardid.c
ramstage-y += chromeos.c
ramstage-y += mainboard.c
-
+ramstage-y += reset.c
diff --git a/src/mainboard/google/veyron_pinky/reset.c b/src/mainboard/google/veyron_pinky/reset.c
new file mode 100644
index 0000000000..fa90f549bd
--- /dev/null
+++ b/src/mainboard/google/veyron_pinky/reset.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <soc/rockchip/rk3288/gpio.h>
+#include <reset.h>
+
+void hard_reset(void)
+{
+ gpio_output((gpio_t){.port = 0, .bank = GPIO_B, .idx = 2}, 1);
+ while (1);
+}