feat(st-clock): use early traces
Replace trace macros with their corresponding EARLY_* macros.
Change-Id: I39b163964fa3129be38e58352b5dee9b4081675b
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
diff --git a/drivers/st/clk/clk-stm32mp13.c b/drivers/st/clk/clk-stm32mp13.c
index 1cacad0..fd62049 100644
--- a/drivers/st/clk/clk-stm32mp13.c
+++ b/drivers/st/clk/clk-stm32mp13.c
@@ -974,8 +974,8 @@
timeout = timeout_init_us(HSIDIV_TIMEOUT);
while ((mmio_read_32(address) & RCC_OCRDYR_HSIDIVRDY) == 0U) {
if (timeout_elapsed(timeout)) {
- ERROR("HSIDIV failed @ 0x%lx: 0x%x\n",
- address, mmio_read_32(address));
+ EARLY_ERROR("HSIDIV failed @ 0x%lx: 0x%x\n",
+ address, mmio_read_32(address));
return -ETIMEDOUT;
}
}
@@ -997,7 +997,7 @@
}
if (hsidiv == 4U) {
- ERROR("Invalid clk-hsi frequency\n");
+ EARLY_ERROR("Invalid clk-hsi frequency\n");
return -EINVAL;
}
@@ -1239,7 +1239,7 @@
uint32_t value = 0;
if (clk_stm32_pll_compute_cfgr1(priv, pll, vco, &value) != 0) {
- ERROR("Invalid Vref clock !\n");
+ EARLY_ERROR("Invalid Vref clock !\n");
panic();
}
diff --git a/drivers/st/clk/stm32mp1_clk.c b/drivers/st/clk/stm32mp1_clk.c
index 1028a06..3d352af 100644
--- a/drivers/st/clk/stm32mp1_clk.c
+++ b/drivers/st/clk/stm32mp1_clk.c
@@ -1617,7 +1617,7 @@
static void stm32mp1_lse_wait(void)
{
if (stm32mp1_osc_wait(true, RCC_BDCR, RCC_BDCR_LSERDY) != 0) {
- VERBOSE("%s: failed\n", __func__);
+ EARLY_ERROR("%s: failed\n", __func__);
}
}
@@ -1626,7 +1626,7 @@
stm32mp1_ls_osc_set(enable, RCC_RDLSICR, RCC_RDLSICR_LSION);
if (stm32mp1_osc_wait(enable, RCC_RDLSICR, RCC_RDLSICR_LSIRDY) != 0) {
- VERBOSE("%s: failed\n", __func__);
+ EARLY_ERROR("%s: failed\n", __func__);
}
}
@@ -1644,7 +1644,7 @@
stm32mp1_hs_ocs_set(true, RCC_OCENR_HSEON);
if (stm32mp1_osc_wait(true, RCC_OCRDYR, RCC_OCRDYR_HSERDY) != 0) {
- VERBOSE("%s: failed\n", __func__);
+ EARLY_ERROR("%s: failed\n", __func__);
}
if (css) {
@@ -1663,7 +1663,7 @@
{
stm32mp1_hs_ocs_set(enable, RCC_OCENR_CSION);
if (stm32mp1_osc_wait(enable, RCC_OCRDYR, RCC_OCRDYR_CSIRDY) != 0) {
- VERBOSE("%s: failed\n", __func__);
+ EARLY_ERROR("%s: failed\n", __func__);
}
}
@@ -1671,7 +1671,7 @@
{
stm32mp1_hs_ocs_set(enable, RCC_OCENR_HSION);
if (stm32mp1_osc_wait(enable, RCC_OCRDYR, RCC_OCRDYR_HSIRDY) != 0) {
- VERBOSE("%s: failed\n", __func__);
+ EARLY_ERROR("%s: failed\n", __func__);
}
}
@@ -1711,7 +1711,7 @@
}
if (hsidiv == 4U) {
- ERROR("Invalid clk-hsi frequency\n");
+ EARLY_ERROR("Invalid clk-hsi frequency\n");
return -1;
}
@@ -1813,8 +1813,8 @@
/* Wait PLL lock */
while ((mmio_read_32(pllxcr) & RCC_PLLNCR_PLLRDY) == 0U) {
if (timeout_elapsed(timeout)) {
- ERROR("PLL%u start failed @ 0x%lx: 0x%x\n",
- pll_id, pllxcr, mmio_read_32(pllxcr));
+ EARLY_ERROR("PLL%u start failed @ 0x%lx: 0x%x\n",
+ pll_id, pllxcr, mmio_read_32(pllxcr));
return -ETIMEDOUT;
}
}
@@ -1842,8 +1842,8 @@
/* Wait PLL stopped */
while ((mmio_read_32(pllxcr) & RCC_PLLNCR_PLLRDY) != 0U) {
if (timeout_elapsed(timeout)) {
- ERROR("PLL%u stop failed @ 0x%lx: 0x%x\n",
- pll_id, pllxcr, mmio_read_32(pllxcr));
+ EARLY_ERROR("PLL%u stop failed @ 0x%lx: 0x%x\n",
+ pll_id, pllxcr, mmio_read_32(pllxcr));
return -ETIMEDOUT;
}
}
@@ -2381,8 +2381,8 @@
usbreg_mask;
usbreg_bootrom &= usbreg_mask;
if (usbreg_bootrom != usbreg_value) {
- VERBOSE("forbidden new USB clk path\n");
- VERBOSE("vs bootrom on USB boot\n");
+ EARLY_ERROR("forbidden new USB clk path\n");
+ EARLY_ERROR("vs bootrom on USB boot\n");
return -FDT_ERR_BADVALUE;
}
}