diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-02-19 02:44:12 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-19 04:22:26 -0500 |
commit | 1275d6f608abda23d101ada17dc39940192d4bc4 (patch) | |
tree | 17a9954dc31d2fa79494fe9b9b867a48a1dafc3e /sound/pci/oxygen/oxygen.h | |
parent | 30459d7b1843cbdea56ca120c8cac10dc5613e90 (diff) |
sound: oxygen: automatically restore overwritten EEPROM
If the EEPROM was partially overwritten (which seems to happen before the OS is
booted), restore its entire contents by deducing it from the remaining
information.
This does not have any effect on the Linux driver, which works even with
incomplete information in the EEPROM, but it makes other drivers work again.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r-- | sound/pci/oxygen/oxygen.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index c500d48ea349..bd615dbffadb 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | #define OXYGEN_IO_SIZE 0x100 | 19 | #define OXYGEN_IO_SIZE 0x100 |
20 | 20 | ||
21 | #define OXYGEN_EEPROM_ID 0x434d /* "CM" */ | ||
22 | |||
21 | /* model-specific configuration of outputs/inputs */ | 23 | /* model-specific configuration of outputs/inputs */ |
22 | #define PLAYBACK_0_TO_I2S 0x0001 | 24 | #define PLAYBACK_0_TO_I2S 0x0001 |
23 | /* PLAYBACK_0_TO_AC97_0 not implemented */ | 25 | /* PLAYBACK_0_TO_AC97_0 not implemented */ |
@@ -190,6 +192,7 @@ void oxygen_reset_uart(struct oxygen *chip); | |||
190 | void oxygen_write_uart(struct oxygen *chip, u8 data); | 192 | void oxygen_write_uart(struct oxygen *chip, u8 data); |
191 | 193 | ||
192 | u16 oxygen_read_eeprom(struct oxygen *chip, unsigned int index); | 194 | u16 oxygen_read_eeprom(struct oxygen *chip, unsigned int index); |
195 | void oxygen_write_eeprom(struct oxygen *chip, unsigned int index, u16 value); | ||
193 | 196 | ||
194 | static inline void oxygen_set_bits8(struct oxygen *chip, | 197 | static inline void oxygen_set_bits8(struct oxygen *chip, |
195 | unsigned int reg, u8 value) | 198 | unsigned int reg, u8 value) |