blob: cb3e2f0ae518da1c7a03b3ed8ad65e82060e27f8 [file] [log] [blame]
Yinghai Luc65bd562007-02-01 00:10:05 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Yinghai Luc65bd562007-02-01 00:10:05 +00003 *
4 * Copyright (C) 2007 AMD
5 * Written by Yinghai Lu <yinghai.lu@amd.com> for AMD.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Yinghai Luc65bd562007-02-01 00:10:05 +000016 */
17
Arthur Heymans8621a132017-04-19 13:19:15 +020018#include <arch/io.h>
19#include <console/console.h>
Stefan Reinauerd55e26f2010-04-25 13:54:30 +000020#include <reset.h>
Arthur Heymans8621a132017-04-19 13:19:15 +020021#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AMDK8)
22#include <northbridge/amd/amdk8/amdk8.h>
23#else /* CONFIG_NORTHBRIDGE_AMD_AMDFAM10 */
24#include <northbridge/amd/amdfam10/amdfam10.h>
25#endif
Stefan Reinauer6f57b512010-07-08 16:41:05 +000026#include "mcp55.h"
Stefan Reinauerd55e26f2010-04-25 13:54:30 +000027
Julius Werner01f9aa52017-05-18 16:03:26 -070028void do_soft_reset(void)
Stefan Reinauerd55e26f2010-04-25 13:54:30 +000029{
30 set_bios_reset();
31 /* link reset */
32 outb(0x02, 0x0cf9);
33 outb(0x06, 0x0cf9);
34}
35
Julius Werner01f9aa52017-05-18 16:03:26 -070036void do_hard_reset(void)
Yinghai Luc65bd562007-02-01 00:10:05 +000037{
38 set_bios_reset();
39
40 /* full reset */
41 outb(0x0a, 0x0cf9);
42 outb(0x0e, 0x0cf9);
43}
Stefan Reinauerd55e26f2010-04-25 13:54:30 +000044
Stefan Reinauer6f57b512010-07-08 16:41:05 +000045void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn)
Yinghai Luc65bd562007-02-01 00:10:05 +000046{
Uwe Hermannc7f0c8f2011-01-04 19:51:33 +000047 /* The default value for MCP55 is good. */
48 /* Set VFSMAF (VID/FID System Management Action Field) to 2. */
Yinghai Luc65bd562007-02-01 00:10:05 +000049}