am64x/am243x: SDFM: Remove sdfm handle null initialization

- Remove sdfm handle null initialization in driver file

Fixes: PINDSW-6607

Signed-off-by: Achala Ram <a-ram@ti.com>
This commit is contained in:
Achala Ram 2023-08-31 13:39:09 +05:30
parent 8e38d03072
commit d2aad2c201
4 changed files with 8 additions and 10 deletions

View File

@ -384,11 +384,11 @@ void pruSdfmIrqHandler(void *args)
PRUICSS_clearEvent(gPruIcssHandle, PRU_TRIGGER_HOST_SDFM_EVT); PRUICSS_clearEvent(gPruIcssHandle, PRU_TRIGGER_HOST_SDFM_EVT);
/* SDFM Output sample for Channel 0 */ /* SDFM Output sample for Channel 0 */
sdfm_ch0_samples[sdfm_ch0_idx++] = SDFM_getFilterData(0); sdfm_ch0_samples[sdfm_ch0_idx++] = SDFM_getFilterData(gHPruSdfm, 0);
/* SDFM Output sample for Channel 1 */ /* SDFM Output sample for Channel 1 */
sdfm_ch1_samples[sdfm_ch1_idx++] = SDFM_getFilterData(1); sdfm_ch1_samples[sdfm_ch1_idx++] = SDFM_getFilterData(gHPruSdfm, 1);
/* SDFM Output sample for Channel 2 */ /* SDFM Output sample for Channel 2 */
sdfm_ch2_samples[sdfm_ch2_idx++] = SDFM_getFilterData(2); sdfm_ch2_samples[sdfm_ch2_idx++] = SDFM_getFilterData(gHPruSdfm, 2);
if(sdfm_ch0_idx >= MAX_SAMPLES) if(sdfm_ch0_idx >= MAX_SAMPLES)

View File

@ -243,7 +243,7 @@ int32_t init_sdfm_pru_fw(uint8_t pruId, SdfmPrms *pSdfmPrms, sdfm_handle *pHSdfm
/* Enable (global) SDFM */ /* Enable (global) SDFM */
SDFM_enable(hSdfm); SDFM_enable(hSdfm);
pHSdfm = &hSdfm; *pHSdfm = hSdfm;
return SDFM_ERR_NERR; return SDFM_ERR_NERR;
} }

View File

@ -284,11 +284,9 @@ void SDFM_configComparatorGpioPins(sdfm_handle h_sdfm, uint8_t ch,uint32_t gpio_
} }
/* Get current (or latest) sample for the specified channel */ /* Get current (or latest) sample for the specified channel */
uint32_t SDFM_getFilterData(uint8_t ch) uint32_t SDFM_getFilterData(sdfm_handle h_sdfm, uint8_t ch)
{ {
SDFM *p_sdfm = NULL; return h_sdfm->p_sdfm_interface->curr_out_samp_buf[ch];
p_sdfm->p_sdfm_interface = (SDFM_Interface *)(PRU_ICSSG_DRAM0_SLV_RAM + 0x0);
return p_sdfm->p_sdfm_interface->curr_out_samp_buf[ch];
} }
/*Configure normal current OSR for data filter*/ /*Configure normal current OSR for data filter*/

View File

@ -268,14 +268,14 @@ void SDFM_configComparatorGpioPins(sdfm_handle h_sdfm, uint8_t ch,uint32_t gpio_
/** /**
* *
* \brief get sample data from DMEM * \brief get sample data from DMEM
* * \param[in] h_sdfm SDFM handle
* \param[in] ch current ch number * \param[in] ch current ch number
* *
* *
* \retval current sample value * \retval current sample value
* *
*/ */
uint32_t SDFM_getFilterData(uint8_t ch); uint32_t SDFM_getFilterData(sdfm_handle h_sdfm,uint8_t ch);
/** /**
* *
* \brief Configure iep count for normal current sampling * \brief Configure iep count for normal current sampling