summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-09-06 23:53:39 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-09-06 23:53:39 +0000
commit6ab639234b1171aae73e9d80c1b905ca03535fd3 (patch)
treed497eeae7af4604d000a6a0ce5f0891aea1730ca /sys/arch/hppa/dev
parent42031a3996e32c6e9b646070d6dd68e9f26e559e (diff)
fix two conf space related hw erratas; dino-moh-humm
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r--sys/arch/hppa/dev/dino.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/sys/arch/hppa/dev/dino.c b/sys/arch/hppa/dev/dino.c
index 0498b50fc5d..ec279bdb32d 100644
--- a/sys/arch/hppa/dev/dino.c
+++ b/sys/arch/hppa/dev/dino.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: dino.c,v 1.15 2004/09/18 07:02:23 mickey Exp $ */
+/* $OpenBSD: dino.c,v 1.16 2005/09/06 23:53:38 mickey Exp $ */
/*
- * Copyright (c) 2003 Michael Shalayeff
+ * Copyright (c) 2003-2005 Michael Shalayeff
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -186,9 +186,18 @@ dino_conf_read(void *v, pcitag_t tag, int reg)
struct dino_softc *sc = v;
volatile struct dino_regs *r = sc->sc_regs;
pcireg_t data;
+ u_int32_t pamr;
+
+ /* fix arbitration errata by disabling all pci devs on config read */
+ pamr = r->pamr;
+ r->pamr = 0;
r->pci_addr = tag | reg;
data = r->pci_conf_data;
+
+ /* restore arbitration */
+ r->pamr = pamr;
+
return (letoh32(data));
}
@@ -198,13 +207,21 @@ dino_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
struct dino_softc *sc = v;
volatile struct dino_regs *r = sc->sc_regs;
pcireg_t data1;
+ u_int32_t pamr;
- /* fix coalescing config writes errata by interleaving w/ a read */
- r->pci_addr = tag | PCI_ID_REG;
- data1 = r->pci_conf_data;
+ /* fix arbitration errata by disabling all pci devs on config read */
+ pamr = r->pamr;
+ r->pamr = 0;
r->pci_addr = tag | reg;
r->pci_conf_data = htole32(data);
+
+ /* fix coalescing config and io writes by interleaving w/ a read */
+ r->pci_addr = tag | PCI_ID_REG;
+ data1 = r->pci_conf_data;
+
+ /* restore arbitration */
+ r->pamr = pamr;
}
int