bdk: dram: homogenize return values

This commit is contained in:
CTCaer
2026-02-22 02:53:55 +02:00
parent 67a7d93a94
commit 1f2855b17d
3 changed files with 6 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ static bool no_table = false;
static mtc_config_t *mtc_cfg = NULL;
void (*mtc_call)(mtc_config_t *mtc_cfg, void *);
u32 minerva_init(minerva_str_t *mtc_str)
int minerva_init(minerva_str_t *mtc_str)
{
mtc_call = NULL;
mtc_cfg = (mtc_config_t *)&mtc_str->mtc_cfg;

View File

@@ -72,7 +72,7 @@ typedef enum
} minerva_freq_t;
extern void (*minerva_cfg)(mtc_config_t *mtc_cfg, void *);
u32 minerva_init(minerva_str_t *mtc_str);
int minerva_init(minerva_str_t *mtc_str);
void minerva_deinit();
void minerva_change_freq(minerva_freq_t freq);
void minerva_sdmmc_la_program(void *table, bool t210b01);

View File

@@ -85,9 +85,9 @@ static const u8 dram_encoding_t210b01[] = {
#include "sdram_config.inl"
#include "sdram_config_t210b01.inl"
static bool _sdram_wait_emc_status(u32 reg_offset, u32 bit_mask, bool updated_state, s32 emc_channel)
static int _sdram_wait_emc_status(u32 reg_offset, u32 bit_mask, bool updated_state, s32 emc_channel)
{
bool err = true;
int err = 1;
for (s32 i = 0; i < EMC_STATUS_UPDATE_TIMEOUT; i++)
{
@@ -98,13 +98,13 @@ static bool _sdram_wait_emc_status(u32 reg_offset, u32 bit_mask, bool updated_st
if (((EMC_CH1(reg_offset) & bit_mask) != 0) == updated_state)
{
err = false;
err = 0;
break;
}
}
else if (((EMC(reg_offset) & bit_mask) != 0) == updated_state)
{
err = false;
err = 0;
break;
}
usleep(1);