diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-09 03:23:58 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-09 03:23:58 +0200 |
commit | 8b449d1f1371e8ecd0b2499034e0b1432cdbe662 (patch) | |
tree | 56b203189ef65d853f1355abfc65263d96e44a06 /sound/soc | |
parent | memblock: Fix memblock_is_region_reserved() to return a boolean (diff) | |
parent | powerpc: fix i8042 module build error (diff) | |
download | linux-8b449d1f1371e8ecd0b2499034e0b1432cdbe662.tar.xz linux-8b449d1f1371e8ecd0b2499034e0b1432cdbe662.zip |
Merge remote branch 'gcl/next' into next
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index e2ee220bfb7e..e7f5d50ed084 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c @@ -20,6 +20,7 @@ #include <asm/time.h> #include <asm/delay.h> +#include <asm/mpc52xx.h> #include <asm/mpc52xx_psc.h> #include "mpc5200_dma.h" @@ -100,19 +101,32 @@ static void psc_ac97_warm_reset(struct snd_ac97 *ac97) { struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; + mutex_lock(&psc_dma->mutex); + out_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR); udelay(3); out_be32(®s->sicr, psc_dma->sicr); + + mutex_unlock(&psc_dma->mutex); } static void psc_ac97_cold_reset(struct snd_ac97 *ac97) { struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; - /* Do a cold reset */ - out_8(®s->op1, MPC52xx_PSC_OP_RES); - udelay(10); - out_8(®s->op0, MPC52xx_PSC_OP_RES); + mutex_lock(&psc_dma->mutex); + dev_dbg(psc_dma->dev, "cold reset\n"); + + mpc5200_psc_ac97_gpio_reset(psc_dma->id); + + /* Notify the PSC that a reset has occurred */ + out_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_ACRB); + + /* Re-enable RX and TX */ + out_8(®s->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE); + + mutex_unlock(&psc_dma->mutex); + msleep(1); psc_ac97_warm_reset(ac97); } |