remove trailing whitespace
[coreboot.git] / src / southbridge / via / k8t890 / error.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
5  * Copyright (C) 2011 Alexandru Gagniuc <mr.nuke.me@gmail.com>
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; version 2 of the License.
10  *
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.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #include <device/device.h>
22 #include <device/pci.h>
23 #include <device/pci_ids.h>
24 #include <console/console.h>
25 #include "k8x8xx.h"
26
27 static void error_enable(struct device *dev)
28 {
29         print_debug(" K8x8xx: Enabling NB error reporting: ");
30         /*
31          * bit0 - Enable V-link parity error reporting in 0x50 bit0 (RWC)
32          * bit6 - Parity Error/SERR# Report Through V-Link to SB
33          * bit7 - Parity Error/SERR# Report Through NMI
34          */
35         pci_write_config8(dev, 0x58, 0x81);
36
37         print_debug("Done\n");
38         /* TODO: enable AGP errors reporting on K8M890 */
39
40         print_debug(" VIA_X_1 device dump:\n");
41         dump_south(dev);
42 }
43
44 static const struct device_operations error_ops = {
45         .read_resources         = pci_dev_read_resources,
46         .set_resources          = pci_dev_set_resources,
47         .enable_resources       = pci_dev_enable_resources,
48         .enable                 = error_enable,
49         .ops_pci                = 0,
50 };
51
52 static const struct pci_driver northbridge_driver_t800 __pci_driver = {
53         .ops    = &error_ops,
54         .vendor = PCI_VENDOR_ID_VIA,
55         .device = PCI_DEVICE_ID_VIA_K8T800_ERR,
56 };
57
58 static const struct pci_driver northbridge_driver_m800 __pci_driver = {
59         .ops    = &error_ops,
60         .vendor = PCI_VENDOR_ID_VIA,
61         .device = PCI_DEVICE_ID_VIA_K8M800_ERR,
62 };
63
64 static const struct pci_driver northbridge_driver_t890 __pci_driver = {
65         .ops    = &error_ops,
66         .vendor = PCI_VENDOR_ID_VIA,
67         .device = PCI_DEVICE_ID_VIA_K8T890CE_1,
68 };
69
70 static const struct pci_driver northbridge_driver_tcf __pci_driver = {
71         .ops    = &error_ops,
72         .vendor = PCI_VENDOR_ID_VIA,
73         .device = PCI_DEVICE_ID_VIA_K8T890CF_1,
74 };
75
76 static const struct pci_driver northbridge_driver_m __pci_driver = {
77         .ops    = &error_ops,
78         .vendor = PCI_VENDOR_ID_VIA,
79         .device = PCI_DEVICE_ID_VIA_K8M890CE_1,
80 };