diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-06-04 19:12:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-06-04 19:12:35 +0000 |
commit | 5d42846e8100568f001be65bfe88d75a09b5cd11 (patch) | |
tree | dc960e7d78b0cd7b45753072fc80ddd7b3f3c6ae /sys | |
parent | df4fd1c63b02cf3c953287c8e86d3c9940618212 (diff) |
Disable parity on the PCI bus; according to Linux, some lca-based systems hit
siop data parity errors when parity is enabled. This ought to help Alphabook
systems, as well as early Multia. Tested on Multia.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/pci/lca.c | 11 | ||||
-rw-r--r-- | sys/arch/alpha/pci/lcareg.h | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/alpha/pci/lca.c b/sys/arch/alpha/pci/lca.c index 0f59e3966dc..48474e38813 100644 --- a/sys/arch/alpha/pci/lca.c +++ b/sys/arch/alpha/pci/lca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lca.c,v 1.22 2009/09/30 19:32:11 miod Exp $ */ +/* $OpenBSD: lca.c,v 1.23 2013/06/04 19:12:34 miod Exp $ */ /* $NetBSD: lca.c,v 1.14 1996/12/05 01:39:35 cgd Exp $ */ /*- @@ -187,7 +187,8 @@ lca_init(lcp, mallocsafe) * IOC_HAE left AS IS. */ - /* According to section 6.4.2, all bits of the IOC_CONF register are + /* + * According to section 6.4.2, all bits of the IOC_CONF register are * undefined after reset. Bits <1:0> are write-only. Set them to * 0x00 for PCI Type 0 configuration access. * @@ -195,6 +196,12 @@ lca_init(lcp, mallocsafe) */ REGVAL64(LCA_IOC_CONF) = 0; + /* + * Disable parity on the bus. According to Linux, on some systems, + * siop(4) behaves badly unless parity is disabled. + */ + REGVAL64(LCA_IOC_PAR_DIS) = IOC_PAR_DISABLE; + lcp->lc_initted = 1; } diff --git a/sys/arch/alpha/pci/lcareg.h b/sys/arch/alpha/pci/lcareg.h index c391631fbcf..9c6226dad28 100644 --- a/sys/arch/alpha/pci/lcareg.h +++ b/sys/arch/alpha/pci/lcareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lcareg.h,v 1.7 2001/02/16 16:02:54 jason Exp $ */ +/* $OpenBSD: lcareg.h,v 1.8 2013/06/04 19:12:34 miod Exp $ */ /* $NetBSD: lcareg.h,v 1.7 1997/06/06 23:54:31 thorpej Exp $ */ /* @@ -67,6 +67,9 @@ #define LCA_IOC_TB_ENA (LCA_IOC_BASE + 0x0a0) /* TLB Enable */ #define IOC_TB_ENA_TEN 0x0000000000000080UL +#define LCA_IOC_PAR_DIS (LCA_IOC_BASE + 0x0e0) /* Parity Disable */ +#define IOC_PAR_DISABLE 0x0000000000000020UL + #define LCA_IOC_W_BASE0 (LCA_IOC_BASE + 0x100) /* Window Base */ #define LCA_IOC_W_MASK0 (LCA_IOC_BASE + 0x140) /* Window Mask */ #define LCA_IOC_W_T_BASE0 (LCA_IOC_BASE + 0x180) /* Translated Base */ |