diff options
author | Mathew Kanner <matk@FreeBSD.org> | 2004-03-31 00:11:24 +0000 |
---|---|---|
committer | Mathew Kanner <matk@FreeBSD.org> | 2004-03-31 00:11:24 +0000 |
commit | 236efae6a954eaf6323f57466bc753fcdfefc9e2 (patch) | |
tree | a3a906c3bd739392c122b38ca9ab13675851ebff /sys | |
parent | 7747c959faa093746e31b34f32bc1b4feb5ae0ce (diff) | |
download | src-236efae6a954eaf6323f57466bc753fcdfefc9e2.tar.gz src-236efae6a954eaf6323f57466bc753fcdfefc9e2.zip |
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)
Notes
Notes:
svn path=/head/; revision=127651
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/pci/ich.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 376fee83464b..2cb9118de7f0 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -693,12 +693,23 @@ ich_pci_attach(device_t dev) } /* + * 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; |