Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/bonito Issue a dummy read after a write to the...



details:   https://anonhg.NetBSD.org/src/rev/4ee04f062072
branches:  trunk
changeset: 535432:4ee04f062072
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Aug 18 15:57:55 2002 +0000

description:
Issue a dummy read after a write to the BONITO_PCIMAP_CFG register to
make sure the write is posted; needed to keep the BONITO64 happy.

diffstat:

 sys/arch/mips/bonito/bonito_pci.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r e8cd8de503f0 -r 4ee04f062072 sys/arch/mips/bonito/bonito_pci.c
--- a/sys/arch/mips/bonito/bonito_pci.c Sun Aug 18 14:59:32 2002 +0000
+++ b/sys/arch/mips/bonito/bonito_pci.c Sun Aug 18 15:57:55 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bonito_pci.c,v 1.1 2001/06/22 03:58:55 thorpej Exp $   */
+/*     $NetBSD: bonito_pci.c,v 1.2 2002/08/18 15:57:55 simonb Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -141,7 +141,7 @@
 {
        struct bonito_config *bc = v;
        pcireg_t data;
-       u_int32_t cfgoff, pcimap_cfg;
+       u_int32_t cfgoff, dummy, pcimap_cfg;
        int s;
 
        if (bonito_conf_addr(bc, tag, offset, &cfgoff, &pcimap_cfg))
@@ -157,6 +157,8 @@
        REGVAL(BONITO_PCIMAP_CFG) = (cfgoff >> 16) | pcimap_cfg;
 
        wbflush();
+       /* Issue a read to make sure the write is posted */
+       dummy = REGVAL(BONITO_PCIMAP_CFG);
 
        /* low 16 bits of address are offset into config space */
        data = REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc));
@@ -175,7 +177,7 @@
 bonito_conf_write(void *v, pcitag_t tag, int offset, pcireg_t data)
 {
        struct bonito_config *vt = v;
-       u_int32_t cfgoff, pcimap_cfg;
+       u_int32_t cfgoff, dummy, pcimap_cfg;
        int s;
 
        if (bonito_conf_addr(vt, tag, offset, &cfgoff, &pcimap_cfg))
@@ -191,6 +193,8 @@
        REGVAL(BONITO_PCIMAP_CFG) = (cfgoff >> 16) | pcimap_cfg;
 
        wbflush();
+       /* Issue a read to make sure the write is posted */
+       dummy = REGVAL(BONITO_PCIMAP_CFG);
 
        /* low 16 bits of address are offset into config space */
        REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc)) = data;



Home | Main Index | Thread Index | Old Index