From: Govind Jeyaram Date: Tue, 18 Jul 2017 00:37:00 +0000 (-0700) Subject: PASDK-218: Clean up the code removing deadwood. X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fperformance-audio-sr.git;a=commitdiff_plain;h=1e1d7d2acca64838e998f9615fd877d7bbfaa66a PASDK-218: Clean up the code removing deadwood. --- diff --git a/pasdk/test_dsp/sap/sap_mcasp.c b/pasdk/test_dsp/sap/sap_mcasp.c index 2adffe09..747e7666 100644 --- a/pasdk/test_dsp/sap/sap_mcasp.c +++ b/pasdk/test_dsp/sap/sap_mcasp.c @@ -229,8 +229,6 @@ Void SAP_MCASP_init (Void) base[_MCASP_PDIR_OFFSET] = 0; // all input by default } - - } // SAP_MCASP_init // ----------------------------------------------------------------------------- @@ -533,21 +531,10 @@ Int SAP_MCASP_enable (DEV2_Handle device) pSers =&base[_MCASP_SRCTL0_OFFSET]; for (i=0; i < _MCASP_CHANNEL_CNT; i++) { - timeout = 0; if (pDevExt->pParams->sap.pinMask & (1 << i)) { //Log_info3(( "SAP_MCASP_enable(): wait for serializer %d. pSers: 0x%x, *pSers: 0x%x", i, pSers, *pSers)); - while ((*pSers & _MCASP_SRCTL_XRDY_MASK) != 0) - { - timeout++; - if (timeout > 10000) - { - Log_info1("SAP_MCASP_enable(): McASP serializer %d timed out.\n", i); - result = SIO2_ETIMEOUT; - break; - } - - } + while ((*pSers & _MCASP_SRCTL_XRDY_MASK) != 0); } *pSers++; } @@ -601,7 +588,7 @@ Int SAP_MCASP_reset (DEV2_Handle device) { //TRACE_TERSE1(( "SAP_MCASP_reset(0x%x) input device.", device)); // disable FIFO if present - Log_info1("SAP_MCASP_reset(0x%x) input device.", device); //DJDBG + Log_info1("SAP_MCASP_reset(0x%x) input device.", device); if (sapMcaspDrv.fifoPresent[mcaspNum]) fifoBase[_MCASP_RFIFOCTL_OFFSET] &= ~(MCASP_RFIFOCTL_RENA_ENABLE << _MCASP_RFIFOCTL_RENA_SHIFT); @@ -639,7 +626,7 @@ Int SAP_MCASP_reset (DEV2_Handle device) else { //TRACE_TERSE1(("SAP_MCASP_reset(0x%x) output device.", device)); - Log_info1("SAP_MCASP_reset(0x%x) output device.", device); //DJDBG + Log_info1("SAP_MCASP_reset(0x%x) output device.", device); // disable FIFO if present if (sapMcaspDrv.fifoPresent[mcaspNum]) fifoBase[_MCASP_WFIFOCTL_OFFSET] &= @@ -707,7 +694,6 @@ Int SAP_MCASP_reset (DEV2_Handle device) // the settings will never take affect which would lead to a lockup condition. #define INT_MAX 0xFFFFFFFF // maximum value returned by Clock_getTicks -#define USEC_PER_MSEC ( 1000 ) // microseconds per millisecond Int SAP_MCASP_waitSet (MCASP_Handle hMcasp, Uint32 wrReg, Uint32 rdReg, Uint32 mask, Uint32 timeout) { @@ -729,27 +715,6 @@ Int SAP_MCASP_waitSet (MCASP_Handle hMcasp, Uint32 wrReg, Uint32 rdReg, Uint32 m // set register with mask value base[wrReg] = (base[rdReg] | mask) & resMask; -#if 0 - // convert timeout from milliseconds to nTicks - timeout = CLK_countspms () * timeout; - - timeStart = CLK_gethtime (); - while (1) { - // return success if register has latched value - if ((base[rdReg] & mask) == mask) - break; - timeNow = CLK_gethtime (); - elapsed = timeNow - timeStart; - // check for wrap aound - if (timeNow <= timeStart) - elapsed = INT_MAX - timeStart + timeNow; - - // return error if timeout reached - if (elapsed > timeout) - return SYS_ETIMEOUT; - } -#endif - timeStart = Clock_getTicks(); while (1) { if ((base[rdReg] & mask) == mask)