Skip to content

Commit

Permalink
ASoC: pxa2xx-i2s: Proper initialization
Browse files Browse the repository at this point in the history
Reset FIFO logic and registers, and make sure REC and RPL functions along
with FIFO service are disabled at probe.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Karl Beldan authored and Mark Brown committed May 13, 2009
1 parent 13e2c86 commit 8c10dc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sound/soc/pxa/pxa2xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,19 @@ static int pxa2xx_i2s_probe(struct platform_device *dev)
if (ret != 0)
clk_put(clk_i2s);

/*
* PXA Developer's Manual:
* If SACR0[ENB] is toggled in the middle of a normal operation,
* the SACR0[RST] bit must also be set and cleared to reset all
* I2S controller registers.
*/
SACR0 = SACR0_RST;
SACR0 = 0;
/* Make sure RPL and REC are disabled */
SACR1 = SACR1_DRPL | SACR1_DREC;
/* Along with FIFO servicing */
SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);

return ret;
}

Expand Down

0 comments on commit 8c10dc4

Please sign in to comment.