Martin Roth | ebace9f | 2018-05-26 18:56:17 -0600 | [diff] [blame^] | 1 | /* |
| 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 Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 14 | #include <pci.h> |
| 15 | #include <arch/io.h> |
| 16 | #include <printk.h> |
| 17 | # |
| 18 | |
| 19 | void p64h2_pci_parity_enable(void) |
| 20 | { |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 21 | uint8_t reg; |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 22 | |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 23 | /* 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, ®); |
| 26 | reg |= ((1 << 1) + (1 << 0)); |
| 27 | pcibios_write_config_byte(1, ((29 << 3) + (0 << 0)), 0x3e, reg); |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 28 | |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 29 | /* 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, ®); |
| 32 | reg |= ((1 << 1) + (1 << 0)); |
| 33 | pcibios_write_config_byte(1, ((31 << 3) + (0 << 0)), 0x3e, reg); |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 34 | |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 35 | return; |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 36 | } |