By default, ich4 has NAMBAR and NABMBAR i/o spaces as

read-only.  Need to enable "legacy support", by poking
into pci config space.  (comment from the patch)

Submited by:	Autrijus Tang <autrijus@autrijus.org>
Approved by:	tanimura (mentor)
This commit is contained in:
Mathew Kanner 2004-03-31 00:11:24 +00:00
parent 7747c959fa
commit 236efae6a9

View File

@ -692,13 +692,24 @@ ich_pci_attach(device_t dev)
sc->sample_size = 2;
}
/*
* By default, ich4 has NAMBAR and NABMBAR i/o spaces as
* read-only. Need to enable "legacy support", by poking into
* pci config space. The driver should use MMBAR and MBBAR,
* but doing so will mess things up here. ich4 has enough new
* features it warrants it's own driver.
*/
if (pci_get_devid(dev) == ICH4ID) {
pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1);
}
/*
* Enable bus master. On ich4/5 this may prevent the detection of
* the primary codec becoming ready in ich_init().
*/
pci_enable_busmaster(dev);
if ((pci_get_devid(dev) == ICH4ID) || (pci_get_devid(dev) == ICH5ID)) {
if (pci_get_devid(dev) == ICH5ID) {
sc->nambarid = PCIR_MMBAR;
sc->nabmbarid = PCIR_MBBAR;
sc->regtype = SYS_RES_MEMORY;