diff options
author | matk <matk@FreeBSD.org> | 2004-03-31 00:11:24 +0000 |
---|---|---|
committer | matk <matk@FreeBSD.org> | 2004-03-31 00:11:24 +0000 |
commit | bc542b543dceb077637763284c40ef7de01cc60a (patch) | |
tree | a3a906c3bd739392c122b38ca9ab13675851ebff /sys/dev/sound | |
parent | 7d2b7cf0e95f0a00d0beccc6418403b1f1357fe0 (diff) | |
download | FreeBSD-src-bc542b543dceb077637763284c40ef7de01cc60a.zip FreeBSD-src-bc542b543dceb077637763284c40ef7de01cc60a.tar.gz |
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)
Diffstat (limited to 'sys/dev/sound')
-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 376fee8..2cb9118 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; |