diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-10-11 12:59:30 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-10-11 12:59:30 +0000 |
commit | 09003ad47b337807cd1bd122f75ca5c47e10fe3e (patch) | |
tree | d653a23ca5a64b9689759d2759b2a761b86337f6 /sys/dev/pci/envyreg.h | |
parent | 72516d22971d9fb1bdcc107e71e770c4e9498823 (diff) |
At initialization of HT chips, write configuration on the corresponding
control registers rather than on the PCI configuration space (which is
ok for non-HT chips only). Also fix the offset GPIO mask/dir are read
from EEPROM, old ones are working by accident.
both fixes are from Alexandr Shadchin <ShadchinAV _at_ mail.ru>
Thanks!
Diffstat (limited to 'sys/dev/pci/envyreg.h')
-rw-r--r-- | sys/dev/pci/envyreg.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/envyreg.h b/sys/dev/pci/envyreg.h index e70ff18603a..27a056a9d0e 100644 --- a/sys/dev/pci/envyreg.h +++ b/sys/dev/pci/envyreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: envyreg.h,v 1.9 2009/05/08 17:52:18 ratchov Exp $ */ +/* $OpenBSD: envyreg.h,v 1.10 2009/10/11 12:59:29 ratchov Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org> * @@ -36,6 +36,10 @@ #define ENVY_CCS_INT_TMR 0x80 #define ENVY_CCS_INT_MIDI0 0x80 #define ENVY_CCS_INTSTAT 0x02 +#define ENVY_CCS_CONF 0x04 /* Envy24HT only */ +#define ENVY_CCS_ACLINK 0x05 /* Envy24HT only */ +#define ENVY_CCS_I2S 0x06 /* Envy24HT only */ +#define ENVY_CCS_SPDIF 0x07 /* Envy24HT only */ #define ENVY_CCS_GPIODATA0 0x14 /* Envy24HT only */ #define ENVY_CCS_GPIODATA1 0x15 /* Envy24HT only */ #define ENVY_CCS_GPIODATA2 0x1e /* Envy24HT only */ @@ -86,9 +90,9 @@ #define ENVY_EEPROM_ACLINK 7 #define ENVY_EEPROM_I2S 8 #define ENVY_EEPROM_SPDIF 9 -#define ENVY_EEPROM_GPIOMASK 10 +#define ENVY_EEPROM_GPIOMASK(s) ((s)->isht ? 13 : 10) #define ENVY_EEPROM_GPIOST(s) ((s)->isht ? 16 : 11) -#define ENVY_EEPROM_GPIODIR(s) ((s)->isht ? 13 : 12) +#define ENVY_EEPROM_GPIODIR(s) ((s)->isht ? 10 : 12) /* * MT registers for play/record params |