Use Memory Read Line and Memory Read Multiple on the 21140, 21140A,

21142, and 21143, if the PCI bus says its okay.
This commit is contained in:
thorpej 1999-11-04 01:20:55 +00:00
parent 6c24c0b16b
commit e3f20e8ff1
3 changed files with 42 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tulip.c,v 1.29 1999/11/04 00:24:01 thorpej Exp $ */
/* $NetBSD: tulip.c,v 1.30 1999/11/04 01:20:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -1375,11 +1375,31 @@ tlp_init(sc)
/*
* Initialize the BUSMODE register.
*
* XXX What about read-multiple/read-line/write-line on
* XXX the 21140 and up?
*/
sc->sc_busmode = BUSMODE_BAR;
switch (sc->sc_chip) {
case TULIP_CHIP_21140:
case TULIP_CHIP_21140A:
case TULIP_CHIP_21142:
case TULIP_CHIP_21143:
/*
* If we're allowed to do so, use Memory Read Line
* and Memory Read Multiple.
*
* XXX Should we use Memory Write and Invalidate?
*/
if (sc->sc_flags & TULIPF_MRL)
sc->sc_busmode |= BUSMODE_RLE;
if (sc->sc_flags & TULIPF_MRM)
sc->sc_busmode |= BUSMODE_RME;
#if 0
if (sc->sc_flags & TULIPF_MWI)
sc->sc_busmode |= BUSMODE_WLE;
#endif
default:
/* Nothing. */
}
switch (sc->sc_cacheline) {
default:
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: tulipvar.h,v 1.19 1999/11/03 22:25:09 thorpej Exp $ */
/* $NetBSD: tulipvar.h,v 1.20 1999/11/04 01:20:58 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -370,9 +370,12 @@ struct tulip_softc {
#define TULIPF_DOING_SETUP 0x00000002 /* doing multicast setup */
#define TULIPF_HAS_MII 0x00000004 /* has media on MII */
#define TULIPF_IC_FS 0x00000008 /* IC bit on first tx seg */
#define TULIPF_LINK_UP 0x00000010 /* link is up (non-MII) */
#define TULIPF_LINK_VALID 0x00000020 /* link state valid */
#define TULIPF_DOINGAUTO 0x00000040 /* doing autoneg (non-MII) */
#define TULIPF_MRL 0x00000010 /* memory read line okay */
#define TULIPF_MRM 0x00000020 /* memory read multi okay */
#define TULIPF_MWI 0x00000040 /* memory write inval okay */
#define TULIPF_LINK_UP 0x00000100 /* link is up (non-MII) */
#define TULIPF_LINK_VALID 0x00000200 /* link state valid */
#define TULIPF_DOINGAUTO 0x00000400 /* doing autoneg (non-MII) */
/*
* This macro returns the current media entry for *non-MII* media.

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tlp_pci.c,v 1.21 1999/10/28 23:32:37 thorpej Exp $ */
/* $NetBSD: if_tlp_pci.c,v 1.22 1999/11/04 01:20:55 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -520,6 +520,16 @@ tlp_pci_attach(parent, self, aux)
sc->sc_cacheline = PCI_CACHELINE(pci_conf_read(pc, pa->pa_tag,
PCI_BHLC_REG));
/*
* Get PCI data moving command info.
*/
if (pa->pa_flags & PCI_FLAGS_MRL_OKAY)
sc->sc_flags |= TULIPF_MRL;
if (pa->pa_flags & PCI_FLAGS_MRM_OKAY)
sc->sc_flags |= TULIPF_MRM;
if (pa->pa_flags & PCI_FLAGS_MWI_OKAY)
sc->sc_flags |= TULIPF_MWI;
/*
* Read the contents of the Ethernet Address ROM/SROM.
*/