aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mcbsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/mcbsp.c')
-rw-r--r--arch/arm/plat-omap/mcbsp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index e31496e35b0f..ecbfe398a309 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -878,7 +878,7 @@ EXPORT_SYMBOL(omap_mcbsp_free);
878void omap_mcbsp_start(unsigned int id, int tx, int rx) 878void omap_mcbsp_start(unsigned int id, int tx, int rx)
879{ 879{
880 struct omap_mcbsp *mcbsp; 880 struct omap_mcbsp *mcbsp;
881 int idle; 881 int enable_srg = 0;
882 u16 w; 882 u16 w;
883 883
884 if (!omap_mcbsp_check_valid_id(id)) { 884 if (!omap_mcbsp_check_valid_id(id)) {
@@ -893,10 +893,13 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
893 mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7; 893 mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7;
894 mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7; 894 mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7;
895 895
896 idle = !((MCBSP_READ_CACHE(mcbsp, SPCR2) | 896 /* Only enable SRG, if McBSP is master */
897 MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1); 897 w = MCBSP_READ_CACHE(mcbsp, PCR0);
898 if (w & (FSXM | FSRM | CLKXM | CLKRM))
899 enable_srg = !((MCBSP_READ_CACHE(mcbsp, SPCR2) |
900 MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1);
898 901
899 if (idle) { 902 if (enable_srg) {
900 /* Start the sample generator */ 903 /* Start the sample generator */
901 w = MCBSP_READ_CACHE(mcbsp, SPCR2); 904 w = MCBSP_READ_CACHE(mcbsp, SPCR2);
902 MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 6)); 905 MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 6));
@@ -919,7 +922,7 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
919 */ 922 */
920 udelay(500); 923 udelay(500);
921 924
922 if (idle) { 925 if (enable_srg) {
923 /* Start frame sync */ 926 /* Start frame sync */
924 w = MCBSP_READ_CACHE(mcbsp, SPCR2); 927 w = MCBSP_READ_CACHE(mcbsp, SPCR2);
925 MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7)); 928 MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7));