altera-cyclone-v/contrib/.../hwmgr/*.c: Fix warnings

Some of these were missing prototypes. Usually this could be addressed
by adding static or conditionally compiling unused functions out.
This commit is contained in:
Joel Sherrill
2025-04-21 13:52:29 -05:00
committed by Kinsey Moore
parent 2f04281682
commit ccc5651c99
4 changed files with 18 additions and 0 deletions

View File

@@ -289,6 +289,9 @@ inline static void alt_clk_mgr_wait(void* reg, uint32_t cnt)
// how many loops to wait for the SDRAM clock to come around
// to zero and allow for writing a new divisor ratio to it
#ifdef __rtems__
static
#endif /* __rtems__ */
ALT_STATUS_CODE alt_clk_plls_settle_wait(void)
{
int32_t i = ALT_BYPASS_TIMEOUT_CNT;
@@ -805,6 +808,9 @@ ALT_STATUS_CODE alt_clk_pll_is_bypassed(ALT_CLK_t pll)
/* alt_clk_pll_source_get() returns the current input of the specified PLL. */
/****************************************************************************************/
#ifdef __rtems__
static
#endif /* __rtems__ */
ALT_CLK_t alt_clk_pll_source_get(ALT_CLK_t pll)
{
ALT_CLK_t ret = ALT_CLK_UNKNOWN;
@@ -5131,6 +5137,7 @@ ALT_STATUS_CODE alt_clk_group_cfg_raw_set(const ALT_CLK_GROUP_RAW_CFG_t * clk_gr
//
// alt_clk_id_to_string() converts a clock ID to a text string.
//
#ifndef __rtems__
ALT_STATUS_CODE alt_clk_id_to_string(ALT_CLK_t clk_id, char * output, size_t size)
{
char * name = NULL;
@@ -5398,11 +5405,15 @@ ALT_STATUS_CODE alt_clk_id_to_string(ALT_CLK_t clk_id, char * output, size_t siz
return ALT_E_BAD_ARG;
}
}
#endif /* __rtems__ */
//
// alt_clk_pll_cntr_maxfreq_recalc() recalculate the maxmum frequency of the specified clock.
//
#ifdef __rtems__
static
#endif /* __rtems__ */
ALT_STATUS_CODE alt_clk_pll_cntr_maxfreq_recalc(ALT_CLK_t clk, ALT_PLL_CNTR_FREQMAX_t * maxfreq)
{
ALT_STATUS_CODE ret = ALT_E_BAD_ARG;

View File

@@ -3693,6 +3693,7 @@ ALT_STATUS_CODE alt_dma_periph_to_memory(ALT_DMA_CHANNEL_t channel,
/////
#ifndef __rtems__
static bool alt_dma_is_init(void)
{
uint32_t permodrst = alt_read_word(ALT_RSTMGR_PERMODRST_ADDR);
@@ -3753,3 +3754,4 @@ ALT_STATUS_CODE alt_dma_ecc_start(void * block, size_t size)
return ALT_E_SUCCESS;
}
#endif /* __rtems__ */

View File

@@ -1086,6 +1086,9 @@ ALT_STATUS_CODE alt_i2c_master_transmit(ALT_I2C_DEV_t *i2c_dev,
return status;
}
#ifdef __rtems__
static
#endif
ALT_STATUS_CODE alt_i2c_master_receive_helper(ALT_I2C_DEV_t *i2c_dev,
uint8_t * buffer,
size_t size,

View File

@@ -2415,6 +2415,7 @@ ALT_STATUS_CODE alt_qspi_device_bank_select(uint32_t bank)
/////
#ifndef __rtems__
static bool alt_qspi_is_enabled(void)
{
uint32_t cfg = alt_read_word(ALT_QSPI_CFG_ADDR);
@@ -2623,3 +2624,4 @@ ALT_STATUS_CODE alt_qspi_ecc_start(void * block, size_t size)
return status;
}
#endif