refactor(st-ddr): remove name from stm32mp_ddr_reg_desc

It was only used for an error trace, with little added value. This
allows some gains in DDR driver data size.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I02e2fc75efd90ff188e62f39850b9bd4c3af1649
This commit is contained in:
Yann Gautier 2024-05-29 15:41:58 +02:00 committed by Maxime Méré
parent 066a5958e7
commit 1483b3c3d2
3 changed files with 2 additions and 4 deletions
drivers/st/ddr
include/drivers/st

View file

@ -24,14 +24,12 @@
#define DDRCTL_REG(x, y) \
{ \
.name = #x, \
.offset = offsetof(struct stm32mp_ddrctl, x), \
.par_offset = offsetof(struct y, x) \
}
#define DDRPHY_REG(x, y) \
{ \
.name = #x, \
.offset = offsetof(struct stm32mp_ddrphy, x), \
.par_offset = offsetof(struct y, x) \
}

View file

@ -37,7 +37,8 @@ void stm32mp_ddr_set_reg(const struct stm32mp_ddr_priv *priv, enum stm32mp_ddr_r
uintptr_t ptr = base_addr + desc[i].offset;
if (desc[i].par_offset == INVALID_OFFSET) {
ERROR("invalid parameter offset for %s", desc[i].name);
ERROR("invalid parameter offset for %s - index %u",
ddr_registers[type].name, i);
panic();
} else {
value = *((uint32_t *)((uintptr_t)param +

View file

@ -26,7 +26,6 @@ enum stm32mp_ddr_reg_type {
};
struct stm32mp_ddr_reg_desc {
const char *name;
uint16_t offset; /* Offset for base address */
uint8_t par_offset; /* Offset for parameter array */
};