pinky: implement hard_reset

this change implements hard_reset, which resets the board.

BUG=none
TEST=Booted Pinky
BRANCH=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: Ia375644be01aa4c2c078ba8c7df94e316d155402
Reviewed-on: https://chromium-review.googlesource.com/219624
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
Daisuke Nojiri 2014-09-23 15:47:30 -07:00 committed by chrome-internal-fetch
commit 17633fc8d4
3 changed files with 34 additions and 1 deletions

View file

@ -28,6 +28,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select EC_GOOGLE_CHROMEEC_SPI
select SOC_ROCKCHIP_RK3288
select MAINBOARD_DO_NATIVE_VGA_INIT
select HAVE_HARD_RESET
config MAINBOARD_DIR
string

View file

@ -16,11 +16,15 @@
## 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 += sdram_configs.c
romstage-y += reset.c
ramstage-y += boardid.c
ramstage-y += chromeos.c
ramstage-y += mainboard.c
ramstage-y += reset.c

View file

@ -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);
}