raiden00pl commented on code in PR #8827:
URL: https://github.com/apache/nuttx/pull/8827#discussion_r1140411354


##########
arch/arm/src/nrf52/nrf52_nvmc.c:
##########
@@ -102,78 +102,6 @@ static inline void nrf_mem_barrier(void)
  * Public Functions
  ****************************************************************************/
 
-/****************************************************************************
- * Name: nrf_nvmc_enable_icache
- *
- * Description:
- *   Enable I-Cache for Flash
- *
- * Input Parameter:
- *   flag - Flag to enable or disable.
- *
- * Returned Values:
- *   None
- *
- ****************************************************************************/
-
-void nrf_nvmc_enable_icache(bool flag)
-{
-  uint32_t value;
-
-  /* Read the current icache configuration */
-
-  value = getreg32(NRF52_NVMC_ICACHECNF);
-
-  if (flag)
-    {
-      value |= NVMC_ICACHECNF_CACHEEN;
-    }
-  else
-    {
-      value &= ~NVMC_ICACHECNF_CACHEEN;
-    }
-
-  /* Setup the new icache configuration */
-
-  putreg32(value, NRF52_NVMC_ICACHECNF);
-}
-
-/****************************************************************************
- * Name: nrf_nvmc_enable_profile
- *
- * Description:
- *   Enable profiling I-Cache for flash
- *
- * Input Parameter:
- *   flag - Flag to enable or disable.
- *
- * Returned Values:
- *   None
- *
- ****************************************************************************/
-
-void nrf_nvmc_enable_profile(bool flag)
-{
-  uint32_t value;
-
-  /* Read the current icache configuration */
-
-  value = getreg32(NRF52_NVMC_ICACHECNF);
-
-  if (flag)
-    {
-      value |= NVMC_ICACHECNF_CACHEPROFEN;
-    }
-  else
-    {
-      value &= ~NVMC_ICACHECNF_CACHEPROFEN;
-    }
-
-  /* Setup the new icache configuration */
-
-  putreg32(value, NRF52_NVMC_ICACHECNF);
-}
-

Review Comment:
   That's right, these are trivial functions so I wrote them again. One day 
maybe I will re-write the rest of the flash/nvmc functions. 
   I don't know if it make sense to add another #ifdefs on the entire file 
since it is already made in Make.defs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to