mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-30 07:39:24 +00:00
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:
parent
066a5958e7
commit
1483b3c3d2
3 changed files with 2 additions and 4 deletions
|
@ -24,14 +24,12 @@
|
||||||
|
|
||||||
#define DDRCTL_REG(x, y) \
|
#define DDRCTL_REG(x, y) \
|
||||||
{ \
|
{ \
|
||||||
.name = #x, \
|
|
||||||
.offset = offsetof(struct stm32mp_ddrctl, x), \
|
.offset = offsetof(struct stm32mp_ddrctl, x), \
|
||||||
.par_offset = offsetof(struct y, x) \
|
.par_offset = offsetof(struct y, x) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DDRPHY_REG(x, y) \
|
#define DDRPHY_REG(x, y) \
|
||||||
{ \
|
{ \
|
||||||
.name = #x, \
|
|
||||||
.offset = offsetof(struct stm32mp_ddrphy, x), \
|
.offset = offsetof(struct stm32mp_ddrphy, x), \
|
||||||
.par_offset = offsetof(struct y, x) \
|
.par_offset = offsetof(struct y, x) \
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
uintptr_t ptr = base_addr + desc[i].offset;
|
||||||
|
|
||||||
if (desc[i].par_offset == INVALID_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();
|
panic();
|
||||||
} else {
|
} else {
|
||||||
value = *((uint32_t *)((uintptr_t)param +
|
value = *((uint32_t *)((uintptr_t)param +
|
||||||
|
|
|
@ -26,7 +26,6 @@ enum stm32mp_ddr_reg_type {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stm32mp_ddr_reg_desc {
|
struct stm32mp_ddr_reg_desc {
|
||||||
const char *name;
|
|
||||||
uint16_t offset; /* Offset for base address */
|
uint16_t offset; /* Offset for base address */
|
||||||
uint8_t par_offset; /* Offset for parameter array */
|
uint8_t par_offset; /* Offset for parameter array */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue