2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
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.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <console/console.h>
21 #include <device/device.h>
22 #include <device/pci.h>
24 #include <boot/tables.h>
25 #include <cpu/x86/msr.h>
26 #include <cpu/amd/mtrr.h>
27 #include <device/pci_def.h>
28 #include <NbPlatform.h>
31 void set_pcie_dereset(void *nbconfig);
32 void set_pcie_reset(void *nbconfig);
37 void set_pcie_reset(void *nbconfig)
42 * Mainboard specific RD890 CIMx callback
43 * Release Resets to PCIe Links
44 * For Both SR56X0 chips, PCIE_RESET_GPIO1 to reset pcie
46 void set_pcie_dereset(void *nbconfig)
48 //u32 nb_dev = MAKE_SBDFO(0, 0x0, 0x0, 0x0, 0x0);
54 AMD_NB_CONFIG_BLOCK *pConfig = (AMD_NB_CONFIG_BLOCK*)nbconfig;
55 for (i = 0; i < MAX_NB_COUNT; i ++) {
56 nb_addr = pConfig->Northbridges[i].NbPciAddress.AddressValue | NB_HTIU_INDEX;
57 LibNbPciIndexRMW(nb_addr,
62 &(pConfig->Northbridges[i]));
67 /*************************************************
68 * enable the dedicated function in h8qgi board.
69 *************************************************/
70 static void h8qgi_enable(device_t dev)
72 printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
75 #if (CONFIG_HAVE_MAINBOARD_RESOURCES == 1)
76 int add_mainboard_resources(struct lb_memory *mem)
82 struct chip_operations mainboard_ops = {
83 CHIP_NAME(CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_NUMBER " Mainboard")
84 .enable_dev = h8qgi_enable,