google/mistral: Implement board reset
Implement reset using PSHOLD. Change-Id: I472bf73cc7b227187b284a3730ec5dea5373695c Signed-off-by: Santhosh Hassan <sahassan@google.com> Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31827 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
0dd80aab25
commit
0eb4db185c
3 changed files with 39 additions and 1 deletions
|
@ -11,7 +11,6 @@ config BOARD_SPECIFIC_OPTIONS
|
|||
select SOC_QUALCOMM_QCS405
|
||||
select SPI_FLASH
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select MISSING_BOARD_RESET
|
||||
|
||||
config VBOOT
|
||||
select VBOOT_VBNV_FLASH
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
|
||||
bootblock-y += memlayout.ld
|
||||
bootblock-y += chromeos.c
|
||||
bootblock-y += reset.c
|
||||
bootblock-y += bootblock.c
|
||||
|
||||
verstage-y += memlayout.ld
|
||||
verstage-y += chromeos.c
|
||||
verstage-y += reset.c
|
||||
|
||||
romstage-y += memlayout.ld
|
||||
romstage-y += chromeos.c
|
||||
romstage-y += reset.c
|
||||
|
||||
ramstage-y += memlayout.ld
|
||||
ramstage-y += chromeos.c
|
||||
ramstage-y += reset.c
|
||||
ramstage-y += mainboard.c
|
||||
|
|
35
src/mainboard/google/mistral/reset.c
Normal file
35
src/mainboard/google/mistral/reset.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <device/mmio.h>
|
||||
#include <reset.h>
|
||||
|
||||
#define GCNT_PSHOLD ((void *)0x004AB000u)
|
||||
#define TCSR_BOOT_MISC_DETECT ((void *)0x0193D100)
|
||||
#define TCSR_RESET_DEBUG_SW_ENTRY ((void *)0x01940000)
|
||||
|
||||
void do_board_reset(void)
|
||||
{
|
||||
/*
|
||||
* At boot time the boot loaders would have set a magic cookie
|
||||
* here to detect watchdog reset. However, since this is a
|
||||
* normal reset clear the magic numbers.
|
||||
*/
|
||||
write32(TCSR_BOOT_MISC_DETECT, 0);
|
||||
write32(TCSR_RESET_DEBUG_SW_ENTRY, 0);
|
||||
write32(GCNT_PSHOLD, 0);
|
||||
}
|
Loading…
Reference in a new issue