diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
commit | e4862f2f6f5653dfb67f3ba2b6f0bc74516ed51a (patch) | |
tree | 1db5a0540a4eecfad9b7daee476b985e82ddc810 /sound/soc/fsl/mpc5200_psc_ac97.c | |
parent | ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (diff) | |
parent | b2c1e07b81a126e5846dfc3d36f559d861df59f4 (diff) |
Merge branch 'for-2.6.36' into for-2.6.37
Fairly simple conflicts, the most serious ones are the i.MX ones which I
suspect now need another rename.
Conflicts:
arch/arm/mach-mx2/clock_imx27.c
arch/arm/mach-mx2/devices.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom2.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/fsl/mpc5200_dma.h
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/pxa/spitz.c
Diffstat (limited to 'sound/soc/fsl/mpc5200_psc_ac97.c')
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index 11706c128c08..40acc8e2b1ca 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/time.h> | 21 | #include <asm/time.h> |
22 | #include <asm/delay.h> | 22 | #include <asm/delay.h> |
23 | #include <asm/mpc52xx.h> | ||
23 | #include <asm/mpc52xx_psc.h> | 24 | #include <asm/mpc52xx_psc.h> |
24 | 25 | ||
25 | #include "mpc5200_dma.h" | 26 | #include "mpc5200_dma.h" |
@@ -100,19 +101,32 @@ static void psc_ac97_warm_reset(struct snd_ac97 *ac97) | |||
100 | { | 101 | { |
101 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; | 102 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; |
102 | 103 | ||
104 | mutex_lock(&psc_dma->mutex); | ||
105 | |||
103 | out_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR); | 106 | out_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR); |
104 | udelay(3); | 107 | udelay(3); |
105 | out_be32(®s->sicr, psc_dma->sicr); | 108 | out_be32(®s->sicr, psc_dma->sicr); |
109 | |||
110 | mutex_unlock(&psc_dma->mutex); | ||
106 | } | 111 | } |
107 | 112 | ||
108 | static void psc_ac97_cold_reset(struct snd_ac97 *ac97) | 113 | static void psc_ac97_cold_reset(struct snd_ac97 *ac97) |
109 | { | 114 | { |
110 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; | 115 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; |
111 | 116 | ||
112 | /* Do a cold reset */ | 117 | mutex_lock(&psc_dma->mutex); |
113 | out_8(®s->op1, MPC52xx_PSC_OP_RES); | 118 | dev_dbg(psc_dma->dev, "cold reset\n"); |
114 | udelay(10); | 119 | |
115 | out_8(®s->op0, MPC52xx_PSC_OP_RES); | 120 | mpc5200_psc_ac97_gpio_reset(psc_dma->id); |
121 | |||
122 | /* Notify the PSC that a reset has occurred */ | ||
123 | out_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_ACRB); | ||
124 | |||
125 | /* Re-enable RX and TX */ | ||
126 | out_8(®s->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE); | ||
127 | |||
128 | mutex_unlock(&psc_dma->mutex); | ||
129 | |||
116 | msleep(1); | 130 | msleep(1); |
117 | psc_ac97_warm_reset(ac97); | 131 | psc_ac97_warm_reset(ac97); |
118 | } | 132 | } |
@@ -258,7 +272,7 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = { | |||
258 | * - Probe/remove operations | 272 | * - Probe/remove operations |
259 | * - OF device match table | 273 | * - OF device match table |
260 | */ | 274 | */ |
261 | static int __devinit psc_ac97_of_probe(struct of_device *op, | 275 | static int __devinit psc_ac97_of_probe(struct platform_device *op, |
262 | const struct of_device_id *match) | 276 | const struct of_device_id *match) |
263 | { | 277 | { |
264 | int rc; | 278 | int rc; |
@@ -288,7 +302,7 @@ static int __devinit psc_ac97_of_probe(struct of_device *op, | |||
288 | return 0; | 302 | return 0; |
289 | } | 303 | } |
290 | 304 | ||
291 | static int __devexit psc_ac97_of_remove(struct of_device *op) | 305 | static int __devexit psc_ac97_of_remove(struct platform_device *op) |
292 | { | 306 | { |
293 | snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_ac97_dai)); | 307 | snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_ac97_dai)); |
294 | return 0; | 308 | return 0; |