blob: 83eaa46bb49dce825331478f2e5c1fcef35135b2 [file] [log] [blame]
zbao246e84b2012-07-13 18:47:03 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
zbao246e84b2012-07-13 18:47:03 +080014 */
15
Kyösti Mälkkief844012013-06-25 23:17:43 +030016// Use simple device model for this file even in ramstage
17#define __SIMPLE_DEVICE__
18
zbao246e84b2012-07-13 18:47:03 +080019#include <arch/io.h>
Nico Huberf4181052018-10-07 13:25:59 +020020#include <cf9_reset.h>
Stefan Reinauer24d1d4b2013-03-21 11:51:41 -070021#include <reset.h>
zbao246e84b2012-07-13 18:47:03 +080022
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030023#define HT_INIT_CONTROL 0x6c
24#define HTIC_ColdR_Detect (1<<4)
25#define HTIC_BIOSR_Detect (1<<5)
26#define HTIC_INIT_Detect (1<<6)
27
Nico Huberf4181052018-10-07 13:25:59 +020028void cf9_reset_prepare(void)
Kyösti Mälkki8251fa02018-05-30 06:51:28 +030029{
30 u32 htic;
31 htic = pci_io_read_config32(PCI_DEV(0, 0x18, 0), HT_INIT_CONTROL);
32 htic &= ~HTIC_BIOSR_Detect;
33 pci_io_write_config32(PCI_DEV(0, 0x18, 0), HT_INIT_CONTROL, htic);
34}
zbao246e84b2012-07-13 18:47:03 +080035
Nico Huberf4181052018-10-07 13:25:59 +020036void do_board_reset(void)
zbao246e84b2012-07-13 18:47:03 +080037{
Nico Huberf4181052018-10-07 13:25:59 +020038 system_reset();
zbao246e84b2012-07-13 18:47:03 +080039}