ALSA: atmel/ac97c: using software reset instead hardware reset if not available
authorBo Shen <voice.shen@atmel.com>
Mon, 19 Dec 2011 09:57:52 +0000 (17:57 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Dec 2011 10:27:41 +0000 (11:27 +0100)
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/atmel/ac97c.c

index 6e5addeb236b49595ea563e7525d5a262a32e295..73516f69ac7ca8a33244cb300df8958ac2d77e20 100644 (file)
@@ -899,6 +899,10 @@ static void atmel_ac97c_reset(struct atmel_ac97c *chip)
                /* AC97 v2.2 specifications says minimum 1 us. */
                udelay(2);
                gpio_set_value(chip->reset_pin, 1);
+       } else {
+               ac97c_writel(chip, MR, AC97C_MR_WRST | AC97C_MR_ENA);
+               udelay(2);
+               ac97c_writel(chip, MR, AC97C_MR_ENA);
        }
 }