tiva: Fix nxstyle warnings

arch/arm/src/tiva/cc13xx/cc13xx_prcm.h:

    * Fix nxstyle warnings. No functional changes.
This commit is contained in:
Nathan Hartman 2020-10-12 15:41:54 -04:00 committed by Xiang Xiao
parent c67da1d2b5
commit 78049d4081

View File

@ -130,7 +130,9 @@
#define PRCM_PERIPH_INDEX(a) (((a) >> 5) & 7)
/* This macro extracts the peripheral instance number and generates bit mask */
/* This macro extracts the peripheral instance number and generates bit
* mask
*/
#define PRCM_PERIPH_MASKBIT(a) (1 << ((a) & 0x1f))
@ -203,7 +205,7 @@ static inline void prcm_audioclock_disable(void)
}
#endif
/******************************************************************************
/****************************************************************************
* Name: prcm_mcuuldo_configure
*
* Description:
@ -224,7 +226,7 @@ static inline void prcm_audioclock_disable(void)
* - 0 : Disable uLDO request
* - 1 : Enable uLDO request
*
******************************************************************************/
****************************************************************************/
static inline void prcm_mcuuldo_configure(uint32_t enable)
{
@ -233,7 +235,7 @@ static inline void prcm_mcuuldo_configure(uint32_t enable)
putreg32(enable, TIVA_PRCM_VDCTL);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_gptclock_set
*
* Description:
@ -241,8 +243,8 @@ static inline void prcm_mcuuldo_configure(uint32_t enable)
*
* Use this function to set up the clock division factor on the GP-Timer.
*
* The division rate will be constant and ungated for Run / Sleep / DeepSleep
* mode when it is slower than PRCM_GPTCLKDIV_RATIO setting.
* The division rate will be constant and ungated for Run / Sleep /
* DeepSleep mode when it is slower than PRCM_GPTCLKDIV_RATIO setting.
* When set faster than PRCM_GPTCLKDIV_RATIO setting PRCM_GPTCLKDIV_RATIO
* will be used.
*
@ -254,40 +256,42 @@ static inline void prcm_mcuuldo_configure(uint32_t enable)
* Input Parameters:
* clkdiv - The division factor to set. The argument must be only one of
* the following values:
* PRCM_GPTCLKDIV_DIV1, PRCM_GPTCLKDIV_DIV2, PRCM_GPTCLKDIV_DIV4,
* PRCM_GPTCLKDIV_DIV8, PRCM_GPTCLKDIV_DIV16, PRCM_GPTCLKDIV_DIV32.
* PRCM_GPTCLKDIV_DIV64, PRCM_GPTCLKDIV_DIV128, PRCM_GPTCLKDIV_DIV256
* PRCM_GPTCLKDIV_DIV1, PRCM_GPTCLKDIV_DIV2,
* PRCM_GPTCLKDIV_DIV4, PRCM_GPTCLKDIV_DIV8,
* PRCM_GPTCLKDIV_DIV16, PRCM_GPTCLKDIV_DIV32.
* PRCM_GPTCLKDIV_DIV64, PRCM_GPTCLKDIV_DIV128,
* PRCM_GPTCLKDIV_DIV256
*
******************************************************************************/
****************************************************************************/
static inline void prcm_gptclock_set(uint32_t clkdiv)
{
putreg32(clkdiv, TIVA_PRCM_GPTCLKDIV);
}
/******************************************************************************
/****************************************************************************
* Name:
*
* Description:
* Get the clock division factor for the GP-Timer domain.
*
******************************************************************************/
****************************************************************************/
static inline uint32_t prcm_gptclock_get(void)
{
return getreg32(TIVA_PRCM_GPTCLKDIV);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_load_set
*
* Description:
* Use this function to synchronize the load settings.
*
* Most of the clock settings in the PRCM module should be updated
* synchronously. This is ensured by the implementation of a load registers
* that, when written to, will let the previous written update values for all
* the relevant registers propagate through to hardware.
* synchronously. This is ensured by the implementation of a load
* registers that, when written to, will let the previous written update
* values for all the relevant registers propagate through to hardware.
*
* The functions that require a synchronization of the clock settings are:
* - prcm_audioclock_manual()
@ -302,7 +306,7 @@ static inline uint32_t prcm_gptclock_get(void)
* - prcm_periph_deepsleepenable()
* - prcm_periph_deepsleepdisable()
*
******************************************************************************/
****************************************************************************/
static inline void prcm_load_set(void)
{
@ -311,7 +315,7 @@ static inline void prcm_load_set(void)
putreg32(PRCM_CLKLOADCTL_LOAD, TIVA_PRCM_CLKLOADCTL);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_load_get
*
* Description:
@ -322,7 +326,7 @@ static inline void prcm_load_set(void)
* - true : No registers have changed since the last load.
* - false : Any register has changed.
*
******************************************************************************/
****************************************************************************/
static inline bool prcm_load_get(void)
{
@ -331,16 +335,16 @@ static inline bool prcm_load_get(void)
return ((getreg32(TIVA_PRCM_CLKLOADCTL) & PRCM_CLKLOADCTL_LOADDONE) != 0);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_domain_enable
*
* Description:
* Enable clock domains in the MCU voltage domain.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* NOTE: Clocks will only be running if the domain is powered.
*
@ -350,7 +354,7 @@ static inline bool prcm_load_get(void)
* - PRCM_DOMAIN_RFCORE
* - PRCM_DOMAIN_VIMS
*
******************************************************************************/
****************************************************************************/
static inline void prcm_domain_enable(uint32_t domains)
{
@ -370,16 +374,16 @@ static inline void prcm_domain_enable(uint32_t domains)
}
}
/******************************************************************************
/****************************************************************************
* Name: prcm_domain_disable
*
* Description:
* Disable clock domains in the MCU voltage domain.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* NOTE: Clocks will only be running if the domain is powered.
*
@ -388,7 +392,7 @@ static inline void prcm_domain_enable(uint32_t domains)
* - PRCM_DOMAIN_RFCORE
* - PRCM_DOMAIN_VIMS
*
******************************************************************************/
****************************************************************************/
static inline void prcm_domain_disable(uint32_t domains)
{
@ -408,17 +412,17 @@ static inline void prcm_domain_disable(uint32_t domains)
}
}
/******************************************************************************
/****************************************************************************
* Name: prcm_rfpowerdown_whenidle
*
* Description:
* Configure RF core to power down when idle.
*
* Use this function to configure the RF core to power down when Idle. This
* is handled automatically in hardware if the RF Core reports that it is
* idle.
* Use this function to configure the RF core to power down when Idle.
* This is handled automatically in hardware if the RF Core reports that
* it is idle.
*
******************************************************************************/
****************************************************************************/
static inline void prcm_rfpowerdown_whenidle(void)
{
@ -427,21 +431,21 @@ static inline void prcm_rfpowerdown_whenidle(void)
modifyreg32(TIVA_PRCM_PDCTL0RFC, 0, PRCM_PDCTL0RFC_ON);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_rfready
*
* Description:
* Return the access status of the RF Core.
*
* Use this function to check if the RF Core is on and ready to be accessed.
* Accessing register or memories that are not powered and clocked will
* cause a bus fault.
* Use this function to check if the RF Core is on and ready to be
* accessed. Accessing register or memories that are not powered and
* clocked will cause a bus fault.
*
* Returns access status of the RF Core.
* - true : RF Core can be accessed.
* - false : RF Core domain is not ready for access.
*
******************************************************************************/
****************************************************************************/
static inline bool prcm_rfready(void)
{
@ -450,7 +454,7 @@ static inline bool prcm_rfready(void)
return ((getreg32(TIVA_PRCM_PDSTAT1RFC) & PRCM_PDSTAT1RFC_ON) != 0);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_cacheretention_enable
*
* Description:
@ -458,7 +462,7 @@ static inline bool prcm_rfready(void)
*
* Enables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM
*
******************************************************************************/
****************************************************************************/
static inline void prcm_cacheretention_enable(void)
{
@ -466,7 +470,7 @@ static inline void prcm_cacheretention_enable(void)
PRCM_RAMRETEN_VIMS_TRAM | PRCM_RAMRETEN_VIMS_CRAM, 0);
}
/******************************************************************************
/****************************************************************************
* Name: prcm_cacheretention_disable
*
* Description:
@ -474,7 +478,7 @@ static inline void prcm_cacheretention_enable(void)
*
* Disables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM
*
*****************************************************************************/
****************************************************************************/
static inline void prcm_cacheretention_disable(void)
{
@ -485,18 +489,19 @@ static inline void prcm_cacheretention_disable(void)
* Public Function Prototypes
****************************************************************************/
/******************************************************************************
/****************************************************************************
* Name: prcm_infclock_configure
*
* Description:
* Configure the infrastructure clock.
*
* Each System CPU power mode has its own infrastructure clock division
* factor. This function can be used for setting up the division factor for
* the infrastructure clock in the available power modes for the System CPU.
* The infrastructure clock is used for all internal logic in the PRCM, and
* is always running as long as power is on in the MCU voltage domain. This
* can be enabled and disabled from the AON Wake Up Controller.
* factor. This function can be used for setting up the division factor
* for the infrastructure clock in the available power modes for the
* System CPU. The infrastructure clock is used for all internal logic in
* the PRCM, and is always running as long as power is on in the MCU
* voltage domain. This can be enabled and disabled from the AON Wake Up
* Controller.
*
* NOTE: If source clock is 48 MHz, minimum clock divider is 2.
*
@ -513,18 +518,20 @@ static inline void prcm_cacheretention_disable(void)
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_infclock_configure(enum prcm_clkdivider_e clkdiv,
enum prcm_powermode_e powermode);
/******************************************************************************
/****************************************************************************
* Name: prcm_audioclock_manual
*
* Description:
* Configure the audio clock generation with manual setting of clock divider.
* Configure the audio clock generation with manual setting of clock
* divider.
*
* NOTE: See hardware documentation before setting audio clock dividers manually.
* NOTE: See hardware documentation before setting audio clock dividers
* manually.
*
* Input Parameters:
* clkconfig - The audio clock configuration. The parameter is a bitwise
@ -542,25 +549,25 @@ void prcm_infclock_configure(enum prcm_clkdivider_e clkdiv,
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
#ifdef CONFIG_TIVA_I2S
void prcm_audioclock_manual(uint32_t clkconfig, uint32_t mstdiv,
uint32_t bitdiv, uint32_t worddiv);
#endif
/******************************************************************************
/****************************************************************************
* Name: prcm_audioclock_configure
*
* Description:
* Configure the audio clock generation
*
* Use this function to set the sample rate when using internal audio clock
* generation for the I2S module.
* Use this function to set the sample rate when using internal audio
* clock generation for the I2S module.
*
* NOTE: While other clocks are possible, the stability of the four sample
* rates defined here are only guaranteed if the clock input to the I2S module
* is 48MHz.
* NOTE: While other clocks are possible, the stability of the four
* sample rates defined here are only guaranteed if the clock input to the
* I2S module is 48MHz.
*
* Input Parameters:
* clkconfig - The audio clock configuration. The parameter is a bitwise
@ -579,19 +586,21 @@ void prcm_audioclock_manual(uint32_t clkconfig, uint32_t mstdiv,
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
#ifdef CONFIG_TIVA_I2S
void prcm_audioclock_configure(uint32_t clkconfig,
enum prcm_i2samplerate_e samplerate);
#endif
/******************************************************************************
/****************************************************************************
* Name: prcm_powerdomain_on
*
* Description:
* Turn power on in power domains in the MCU domain
* Use this function to turn on power domains inside the MCU voltage domain.
*
* Use this function to turn on power domains inside the MCU voltage
* domain.
*
* Power on and power off request has different implications for the
* different power domains.
@ -639,11 +648,11 @@ void prcm_audioclock_configure(uint32_t clkconfig,
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_powerdomain_on(uint32_t domains);
/******************************************************************************
/****************************************************************************
* Name: prcm_powerdomain_off
*
* Description:
@ -667,11 +676,11 @@ void prcm_powerdomain_on(uint32_t domains);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_powerdomain_off(uint32_t domains);
/******************************************************************************
/****************************************************************************
* Name: prcm_powerdomain_status
*
* Description:
@ -683,8 +692,8 @@ void prcm_powerdomain_off(uint32_t domains);
* parameter must be an OR'ed combination of one or several of:
* 1) PRCM_DOMAIN_RFCORE : RF Core.
* 2) PRCM_DOMAIN_SERIAL : SSI0, UART0, I2C0
* 3) PRCM_DOMAIN_PERIPH : GPT0, GPT1, GPT2, GPT3, GPIO, SSI1, I2S,
* DMA, UART1
* 3) PRCM_DOMAIN_PERIPH : GPT0, GPT1, GPT2, GPT3, GPIO, SSI1,
* I2S, DMA, UART1
*
* Returned Value
* - True: The specified domains are all powered up.
@ -693,90 +702,90 @@ void prcm_powerdomain_off(uint32_t domains);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
bool prcm_powerdomain_status(uint32_t domains);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_runenable
*
* Description:
* Enables a peripheral in Run mode
*
* Peripherals are enabled with this function. At power-up, some peripherals
* are disabled; they must be enabled in order to operate or respond to
* register reads/writes.
* Peripherals are enabled with this function. At power-up, some
* peripherals are disabled; they must be enabled in order to operate or
* respond to register reads/writes.
*
* NOTE: The actual enabling of the peripheral may be delayed until some
* time after this function returns. Care should be taken to ensure that the
* peripheral is not accessed until it is enabled.
* time after this function returns. Care should be taken to ensure that
* the peripheral is not accessed until it is enabled.
*
* When enabling Timers always make sure that the division factor for the
* PERBUSCPUCLK is set. This will guarantee that the timers run at a
* continuous rate even if the SYSBUSCLK is gated.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should always
* be followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* Input Parameters:
* peripheral - The peripheral to enable. This is an encoded value. See the
* PRCRM_PERIPH_* definitions for available encodings.
* peripheral - The peripheral to enable. This is an encoded value. See
* the PRCRM_PERIPH_* definitions for available encodings.
*
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_runenable(uint32_t peripheral);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_rundisable
*
* Description:
* Disables a peripheral in Run mode
*
* Peripherals are disabled with this function. Once disabled, they will not
* operate or respond to register reads/writes.
* Peripherals are disabled with this function. Once disabled, they will
* not operate or respond to register reads/writes.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* NOTE: The actual disabling of the peripheral may be delayed until some
* time after this function returns. Care should be taken by the user to
* ensure that the peripheral is not accessed in this interval as this might
* cause the system to hang.
* ensure that the peripheral is not accessed in this interval as this
* might cause the system to hang.
*
* Input Parameters:
* peripheral - The peripheral to enable. This is an encoded value. See the
* PRCRM_PERIPH_* definitions for available encodings.
* peripheral - The peripheral to enable. This is an encoded value. See
* the PRCRM_PERIPH_* definitions for available encodings.
*
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_rundisable(uint32_t peripheral);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_sleepenable
*
* Description:
* Enables a peripheral in sleep mode
*
* This function allows a peripheral to continue operating when the processor
* goes into sleep mode. Since the clocking configuration of the device does
* not change, any peripheral can safely continue operating while the
* processor is in sleep mode, and can therefore wake the processor from sleep
* mode.
* This function allows a peripheral to continue operating when the
* processor goes into sleep mode. Since the clocking configuration of the
* device does not change, any peripheral can safely continue operating
* while the processor is in sleep mode, and can therefore wake the
* processor from sleep mode.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* Input Parameters:
* peripheral - The peripheral to enable in sleep mode. This is an encoded
@ -786,27 +795,27 @@ void prcm_periph_rundisable(uint32_t peripheral);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_sleepenable(uint32_t peripheral);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_sleepdisable
*
* Description:
* Disables a peripheral in sleep mode
*
* This function causes a peripheral to stop operating when the processor goes
* into sleep mode. Disabling peripherals while in sleep mode helps to lower
* the current draw of the device. If enabled (via prcm_periph_runenable()),
* the peripheral will automatically resume operation when the processor
* leaves sleep mode, maintaining its entire state from before sleep mode was
* entered.
* This function causes a peripheral to stop operating when the processor
* goes into sleep mode. Disabling peripherals while in sleep mode helps
* to lower the current draw of the device. If enabled (via
* prcm_periph_runenable()), the peripheral will automatically resume
* operation when the processor leaves sleep mode, maintaining its entire
* state from before sleep mode was entered.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* Input Parameters:
* peripheral - The peripheral to disable in sleep mode. This is an encoded
@ -816,26 +825,27 @@ void prcm_periph_sleepenable(uint32_t peripheral);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_sleepdisable(uint32_t peripheral);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_deepsleepenable
*
* Description:
* Enables a peripheral in deep-sleep mode
*
* This function allows a peripheral to continue operating when the processor
* goes into deep-sleep mode. Since the clocking configuration of the device
* may change, not all peripherals can safely continue operating while the
* processor is in sleep mode. This in turn depends on the chosen power mode.
* It is the responsibility of the caller to make sensible choices.
* This function allows a peripheral to continue operating when the
* processor goes into deep-sleep mode. Since the clocking configuration
* of the device may change, not all peripherals can safely continue
* operating while the processor is in sleep mode. This in turn depends on
* the chosen power mode. It is the responsibility of the caller to make
* sensible choices.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* Input Parameters:
* peripheral - The peripheral to ensable in deep sleep mode. This is an
@ -845,29 +855,30 @@ void prcm_periph_sleepdisable(uint32_t peripheral);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_deepsleepenable(uint32_t peripheral);
/******************************************************************************
/****************************************************************************
* Name: prcm_periph_deepsleepdisable
*
* Description:
* Disables a peripheral in deep-sleep mode
*
* This function causes a peripheral to stop operating when the processor goes
* into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps
* to lower the current draw of the device, and can keep peripherals that
* require a particular clock frequency from operating when the clock changes
* as a result of entering deep-sleep mode. If enabled (via
* prcm_periph_runenable()), the peripheral will automatically resume
* operation when the processor leaves deep-sleep mode, maintaining its entire
* state from before deep-sleep mode was entered.
* This function causes a peripheral to stop operating when the processor
* goes into deep-sleep mode. Disabling peripherals while in deep-sleep
* mode helps to lower the current draw of the device, and can keep
* peripherals that require a particular clock frequency from operating
* when the clock changes as a result of entering deep-sleep mode. If
* enabled (via prcm_periph_runenable()), the peripheral will
* automatically resume operation when the processor leaves deep-sleep
* mode, maintaining its entire state from before deep-sleep mode was
* entered.
*
* NOTE: A call to this function will only setup the shadow registers in the
* MCU domain for the PRCM module. For the changes to propagate to the system
* controller in the AON domain a call to this function should always be
* followed by a call to prcm_load_set().
* NOTE: A call to this function will only setup the shadow registers in
* the MCU domain for the PRCM module. For the changes to propagate to the
* system controller in the AON domain a call to this function should
* always be followed by a call to prcm_load_set().
*
* Input Parameters:
* peripheral - The peripheral to disable in deep sleep mode. This is an
@ -877,7 +888,7 @@ void prcm_periph_deepsleepenable(uint32_t peripheral);
* Returned Value:
* None
*
******************************************************************************/
****************************************************************************/
void prcm_periph_deepsleepdisable(uint32_t peripheral);