blob: eb0583feedc8a09784284de9f1a0fed8295644d6 [file] [log] [blame]
Stefan Reinauerdebb11f2008-10-29 04:46:52 +00001/*
2 * This file is part of the coreboot project.
3 *
Stefan Reinauera8e11682009-03-11 14:54:18 +00004 * Copyright (C) 2008-2009 coresystems GmbH
Stefan Reinauerdebb11f2008-10-29 04:46:52 +00005 *
Stefan Reinauera8e11682009-03-11 14:54:18 +00006 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000010 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000015 */
16
17#include <console/console.h>
18#include <device/device.h>
19#include <device/pci.h>
20#include "i82801gx.h"
Damien Zammit647e3852016-01-15 13:44:53 +110021#include "sata.h"
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000022
Elyes HAOUAS99667032018-05-13 12:47:28 +020023void i82801gx_enable(struct device *dev)
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000024{
Stefan Reinauera8e11682009-03-11 14:54:18 +000025 u32 reg32;
26
27 /* Enable SERR */
28 reg32 = pci_read_config32(dev, PCI_COMMAND);
29 reg32 |= PCI_COMMAND_SERR;
30 pci_write_config32(dev, PCI_COMMAND, reg32);
Damien Zammit647e3852016-01-15 13:44:53 +110031
32 if (dev->path.pci.devfn == PCI_DEVFN(31, 2)) {
33 printk(BIOS_DEBUG, "Set SATA mode early\n");
34 sata_enable(dev);
35 }
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000036}
37
38struct chip_operations southbridge_intel_i82801gx_ops = {
39 CHIP_NAME("Intel ICH7/ICH7-M (82801Gx) Series Southbridge")
40 .enable_dev = i82801gx_enable,
41};