blob: 2d90ae2acab1f79791312ee9aa601c4df188befb [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
zbao246e84b2012-07-13 18:47:03 +08003
Kyösti Mälkkief844012013-06-25 23:17:43 +03004// Use simple device model for this file even in ramstage
5#define __SIMPLE_DEVICE__
6
Kyösti Mälkkif1b58b72019-03-01 13:43:02 +02007#include <device/pci_ops.h>
Nico Huberf4181052018-10-07 13:25:59 +02008#include <cf9_reset.h>
Stefan Reinauer24d1d4b2013-03-21 11:51:41 -07009#include <reset.h>
zbao246e84b2012-07-13 18:47:03 +080010
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030011#define HT_INIT_CONTROL 0x6c
12#define HTIC_ColdR_Detect (1<<4)
13#define HTIC_BIOSR_Detect (1<<5)
14#define HTIC_INIT_Detect (1<<6)
15
Nico Huberf4181052018-10-07 13:25:59 +020016void cf9_reset_prepare(void)
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030017{
18 u32 htic;
Kyösti Mälkkib915fae2019-12-09 08:08:58 +020019 htic = pci_s_read_config32(PCI_DEV(0, 0x18, 0), HT_INIT_CONTROL);
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030020 htic &= ~HTIC_BIOSR_Detect;
Kyösti Mälkkib915fae2019-12-09 08:08:58 +020021 pci_s_write_config32(PCI_DEV(0, 0x18, 0), HT_INIT_CONTROL, htic);
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030022}
zbao246e84b2012-07-13 18:47:03 +080023
Nico Huberf4181052018-10-07 13:25:59 +020024void do_board_reset(void)
zbao246e84b2012-07-13 18:47:03 +080025{
Nico Huberf4181052018-10-07 13:25:59 +020026 system_reset();
zbao246e84b2012-07-13 18:47:03 +080027}