arch/arm/stm32, stm32f7, stm32l4: Rename up_waste to stm32_waste

The naming standard at https://cwiki.apache.org/confluence/display/NUTTX/Naming+FAQ requires that all MCU-private functions begin with the name of the MCU, not up_.

This PR addresses only these name changes for the STM32-private functions up_waste() which should be called stm32_waste.

There should be no impact of this change (other that one step toward more consistent naming).

Normal PR checks are sufficient
This commit is contained in:
Gregory Nutt 2020-05-03 08:35:35 -06:00 committed by Abdelatif Guettouche
parent f09e58fe73
commit 01d32a2b22
12 changed files with 44 additions and 32 deletions

View File

@ -80,7 +80,7 @@ void stm32_rcc_enablelse(void)
while ((getreg32(STM32_RCC_CSR) & RCC_CSR_LSERDY) == 0)
{
up_waste();
stm32_waste();
}
#else
@ -94,7 +94,7 @@ void stm32_rcc_enablelse(void)
while ((getreg16(STM32_RCC_BDCR) & RCC_BDCR_LSERDY) == 0)
{
up_waste();
stm32_waste();
}
#endif

View File

@ -204,7 +204,7 @@ static inline void stm32_rtc_beginwr(void)
while ((getreg16(STM32_RTC_CRL) & RTC_CRL_RTOFF) == 0)
{
up_waste();
stm32_waste();
}
/* Enter Config mode, Set Value and Exit */
@ -234,7 +234,7 @@ static inline void stm32_rtc_endwr(void)
while ((getreg16(STM32_RTC_CRL) & RTC_CRL_RTOFF) == 0)
{
up_waste();
stm32_waste();
}
}
@ -257,7 +257,7 @@ static inline void stm32_rtc_wait4rsf(void)
modifyreg16(STM32_RTC_CRL, RTC_CRL_RSF, 0);
while ((getreg16(STM32_RTC_CRL) & RTC_CRL_RSF) == 0)
{
up_waste();
stm32_waste();
}
}

View File

@ -51,7 +51,7 @@ uint32_t idle_wastecounter = 0;
* Public Functions
****************************************************************************/
void up_waste(void)
void stm32_waste(void)
{
idle_wastecounter++;
}

View File

@ -59,7 +59,7 @@ extern "C"
/** Waste CPU Time
*
* up_waste() is the logic that will be executed when portions of kernel
* stm32_waste() is the logic that will be executed when portions of kernel
* or user-app is polling some register or similar, waiting for desired
* status. This time is wasted away. This function offers a measure of
* badly written piece of software or some undesired behavior.
@ -68,7 +68,7 @@ extern "C"
* cannot be used for other purposes (yet).
**/
void up_waste(void);
void stm32_waste(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@ -108,7 +108,7 @@ static void flash_unlock(uintptr_t base)
{
while ((getreg32(base + STM32_FLASH_SR_OFFSET) & FLASH_SR_BSY) != 0)
{
up_waste();
stm32_waste();
}
if ((getreg32(base + STM32_FLASH_CR_OFFSET) & FLASH_CR_LOCK) != 0)
@ -292,7 +292,7 @@ ssize_t up_progmem_eraseblock(size_t block)
while ((getreg32(base + STM32_FLASH_SR_OFFSET) & FLASH_SR_BSY) != 0)
{
up_waste();
stm32_waste();
}
modifyreg32(base + STM32_FLASH_CR_OFFSET, FLASH_CR_PER, 0);
@ -375,7 +375,7 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count)
while ((getreg32(base + STM32_FLASH_SR_OFFSET) & FLASH_SR_BSY) != 0)
{
up_waste();
stm32_waste();
}
/* Verify */

View File

@ -101,7 +101,7 @@ static void flash_unlock(void)
{
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
if (getreg32(STM32_FLASH_CR) & FLASH_CR_LOCK)
@ -241,7 +241,7 @@ int stm32_flash_writeprotect(size_t page, bool enabled)
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
/* Relock options */
@ -365,7 +365,10 @@ ssize_t up_progmem_eraseblock(size_t block)
modifyreg32(STM32_FLASH_CR, FLASH_CR_SNB_MASK, FLASH_CR_SNB(block));
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT);
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
stm32_waste();
}
modifyreg32(STM32_FLASH_CR, FLASH_CR_SER, 0);
sem_unlock();
@ -428,7 +431,10 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count)
putreg16(*hword, addr);
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
stm32_waste();
}
/* Verify */

View File

@ -111,7 +111,7 @@ static void stm32_eeprom_unlock(void)
{
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
if (getreg32(STM32_FLASH_PECR) & FLASH_PECR_PELOCK)
@ -221,7 +221,7 @@ static ssize_t stm32_eeprom_erase_write(size_t addr, const void *buf,
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
/* Verify */
@ -472,7 +472,7 @@ ssize_t up_progmem_eraseblock(size_t block)
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
flash_lock();
@ -538,7 +538,7 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count)
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
/* Verify */

View File

@ -83,7 +83,7 @@ static sem_t g_sem = SEM_INITIALIZER(1);
* Private Functions
****************************************************************************/
static void up_waste(void)
static void stm32_waste(void)
{
}
@ -101,7 +101,7 @@ static void flash_unlock(void)
{
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
if (getreg32(STM32_FLASH_CR) & FLASH_CR_LOCK)
@ -223,7 +223,7 @@ int stm32_flash_writeprotect(size_t page, bool enabled)
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32_waste();
}
/* Re-lock options */
@ -353,7 +353,10 @@ ssize_t up_progmem_eraseblock(size_t block)
modifyreg32(STM32_FLASH_CR, FLASH_CR_SNB_MASK, FLASH_CR_SNB(block));
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT);
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
stm32_waste();
{
modifyreg32(STM32_FLASH_CR, FLASH_CR_SER, 0);
sem_unlock();
@ -425,7 +428,10 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count)
ARM_DSB();
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY)
{
stm32_waste();
}
/* Verify */

View File

@ -132,7 +132,7 @@ static void flash_unlock(void)
{
while (getreg32(STM32L4_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32l4_waste();
}
if (getreg32(STM32L4_FLASH_CR) & FLASH_CR_LOCK)
@ -196,7 +196,7 @@ static inline void flash_erase(size_t page)
while (getreg32(STM32L4_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32l4_waste();
}
modifyreg32(STM32L4_FLASH_CR, FLASH_CR_PAGE_ERASE, 0);
@ -311,7 +311,7 @@ uint32_t stm32l4_flash_user_optbytes(uint32_t clrbits, uint32_t setbits)
while (getreg32(STM32L4_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32l4_waste();
}
flash_optbytes_lock();
@ -530,7 +530,7 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t buflen)
while (getreg32(STM32L4_FLASH_SR) & FLASH_SR_BSY)
{
up_waste();
stm32l4_waste();
}
/* Verify */

View File

@ -114,7 +114,7 @@ void stm32l4_rcc_enablelse(void)
while (((regval = getreg32(STM32L4_RCC_BDCR)) & RCC_BDCR_LSERDY) == 0)
{
up_waste();
stm32l4_waste();
}
#if defined(CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY) && \

View File

@ -51,7 +51,7 @@ uint32_t idle_wastecounter = 0;
* Public Functions
****************************************************************************/
void up_waste(void)
void stm32l4_waste(void)
{
idle_wastecounter++;
}

View File

@ -59,7 +59,7 @@ extern "C"
/** Waste CPU Time
*
* up_waste() is the logic that will be executed when portions of kernel
* stm32l4_waste() is the logic that will be executed when portions of kernel
* or user-app is polling some register or similar, waiting for desired
* status. This time is wasted away. This function offers a measure of
* badly written piece of software or some undesired behavior.
@ -68,7 +68,7 @@ extern "C"
* cannot be used for other purposes (yet).
**/
void up_waste(void);
void stm32l4_waste(void);
#undef EXTERN
#if defined(__cplusplus)