hartmannathan commented on code in PR #8827:
URL: https://github.com/apache/nuttx/pull/8827#discussion_r1140383310
##########
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:
I assume `nrf_nvmc_enable_icache()` and `nrf_nvmc_enable_profile()` are
being moved to another file because they are **NOT** part of the BSD-licensed
code originating at Nordic?
Since this file has a BSD license, would it make sense to wrap the entire
contents of this file with
```
#ifdef ALLOW_BSD_COMPONENTS
.
.
.
#endif /* ALLOW_BSD_COMPONENTS */
```
The same could be done for all non-Apache-2.0-Licensed files (but not in
this PR... each one needs to be treated individually).
--
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]