blob: 94b2f31cb9afd8d4e1874a98688d210685512d6a [file] [log] [blame]
Martin Rothebace9f2018-05-26 18:56:17 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
Yinghai Lu70093f72004-07-01 03:55:03 +000014#include <pci.h>
15#include <arch/io.h>
16#include <printk.h>
17#
18
19void p64h2_pci_parity_enable(void)
20{
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020021 uint8_t reg;
Yinghai Lu70093f72004-07-01 03:55:03 +000022
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020023 /* 2SERREN - SERR enable for PCI bridge secondary device */
24 /* 2PEREN - Parity error for PCI bridge secondary device */
25 pcibios_read_config_byte(1, ((29 << 3) + (0 << 0)), 0x3e, &reg);
26 reg |= ((1 << 1) + (1 << 0));
27 pcibios_write_config_byte(1, ((29 << 3) + (0 << 0)), 0x3e, reg);
Yinghai Lu70093f72004-07-01 03:55:03 +000028
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020029 /* 2SERREN - SERR enable for PCI bridge secondary device */
30 /* 2PEREN - Parity error for PCI bridge secondary device */
31 pcibios_read_config_byte(1, ((31 << 3) + (0 << 0)), 0x3e, &reg);
32 reg |= ((1 << 1) + (1 << 0));
33 pcibios_write_config_byte(1, ((31 << 3) + (0 << 0)), 0x3e, reg);
Yinghai Lu70093f72004-07-01 03:55:03 +000034
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020035 return;
Yinghai Lu70093f72004-07-01 03:55:03 +000036}