Browse Source

Merge "fix(imx): disable DRAM retention by default on i.MX8MQ" into integration

pull/2000/merge
Madhukar Pappireddy 5 months ago
committed by TrustedFirmware Code Review
parent
commit
a681e767aa
  1. 8
      plat/imx/common/include/imx_sip_svc.h
  2. 9
      plat/imx/imx8m/imx8mm/platform.mk
  3. 9
      plat/imx/imx8m/imx8mn/platform.mk
  4. 9
      plat/imx/imx8m/imx8mp/platform.mk
  5. 9
      plat/imx/imx8m/imx8mq/platform.mk
  6. 8
      plat/imx/imx8m/include/dram.h

8
plat/imx/common/include/imx_sip_svc.h

@ -62,8 +62,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3);
int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3);
#if IMX_DRAM_RETENTION
int dram_dvfs_handler(uint32_t smc_fid, void *handle,
u_register_t x1, u_register_t x2, u_register_t x3);
#else
static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
u_register_t x1, u_register_t x2, u_register_t x3)
{
SMC_RET1(handle, SMC_UNK);
}
#endif
#endif
#if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
int dram_dvfs_handler(uint32_t smc_fid, void *handle,

9
plat/imx/imx8m/imx8mm/platform.mk

@ -54,7 +54,6 @@ BL31_SOURCES += common/desc_image_load.c \
drivers/delay_timer/delay_timer.c \
drivers/delay_timer/generic_delay_timer.c \
${XLAT_TABLES_LIB_SRCS} \
${IMX_DRAM_SOURCES} \
${IMX_GIC_SOURCES}
ifeq (${NEED_BL2},yes)
@ -155,6 +154,14 @@ ERRATA_A53_835769 := 1
ERRATA_A53_843419 := 1
ERRATA_A53_855873 := 1
IMX_DRAM_RETENTION ?= 1
$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
$(eval $(call add_define,IMX_DRAM_RETENTION))
ifeq (${IMX_DRAM_RETENTION},1)
BL31_SOURCES += ${IMX_DRAM_SOURCES}
endif
ifneq (${PRELOADED_BL33_BASE},)
$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
endif

9
plat/imx/imx8m/imx8mn/platform.mk

@ -48,7 +48,6 @@ BL31_SOURCES += common/desc_image_load.c \
drivers/arm/tzc/tzc380.c \
drivers/delay_timer/delay_timer.c \
drivers/delay_timer/generic_delay_timer.c \
${IMX_DRAM_SOURCES} \
${IMX_GIC_SOURCES} \
${XLAT_TABLES_LIB_SRCS}
@ -61,6 +60,14 @@ ERRATA_A53_835769 := 1
ERRATA_A53_843419 := 1
ERRATA_A53_855873 := 1
IMX_DRAM_RETENTION ?= 1
$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
$(eval $(call add_define,IMX_DRAM_RETENTION))
ifeq (${IMX_DRAM_RETENTION},1)
BL31_SOURCES += ${IMX_DRAM_SOURCES}
endif
ifneq (${PRELOADED_BL33_BASE},)
$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
endif

9
plat/imx/imx8m/imx8mp/platform.mk

@ -49,7 +49,6 @@ BL31_SOURCES += common/desc_image_load.c \
drivers/arm/tzc/tzc380.c \
drivers/delay_timer/delay_timer.c \
drivers/delay_timer/generic_delay_timer.c \
${IMX_DRAM_SOURCES} \
${IMX_GIC_SOURCES} \
${XLAT_TABLES_LIB_SRCS}
@ -152,6 +151,14 @@ ERRATA_A53_835769 := 1
ERRATA_A53_843419 := 1
ERRATA_A53_855873 := 1
IMX_DRAM_RETENTION ?= 1
$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
$(eval $(call add_define,IMX_DRAM_RETENTION))
ifeq (${IMX_DRAM_RETENTION},1)
BL31_SOURCES += ${IMX_DRAM_SOURCES}
endif
ifneq (${PRELOADED_BL33_BASE},)
$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
endif

9
plat/imx/imx8m/imx8mq/platform.mk

@ -43,7 +43,6 @@ BL31_SOURCES += plat/imx/common/imx8_helpers.S \
drivers/delay_timer/delay_timer.c \
drivers/delay_timer/generic_delay_timer.c \
${XLAT_TABLES_LIB_SRCS} \
${IMX_DRAM_SOURCES} \
${IMX_GIC_SOURCES}
ENABLE_PIE := 1
@ -56,6 +55,14 @@ ERRATA_A53_835769 := 1
ERRATA_A53_843419 := 1
ERRATA_A53_855873 := 1
IMX_DRAM_RETENTION ?= 0
$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
$(eval $(call add_define,IMX_DRAM_RETENTION))
ifeq (${IMX_DRAM_RETENTION},1)
BL31_SOURCES += ${IMX_DRAM_SOURCES}
endif
ifneq (${PRELOADED_BL33_BASE},)
$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
endif

8
plat/imx/imx8m/include/dram.h

@ -70,13 +70,19 @@ struct dram_info {
extern struct dram_info dram_info;
void dram_info_init(unsigned long dram_timing_base);
void dram_umctl2_init(struct dram_timing_info *timing);
void dram_phy_init(struct dram_timing_info *timing);
/* dram retention */
#if IMX_DRAM_RETENTION
void dram_info_init(unsigned long dram_timing_base);
void dram_enter_retention(void);
void dram_exit_retention(void);
#else
static inline void dram_info_init(unsigned long dram_timing_base) {}
static inline void dram_enter_retention(void) {}
static inline void dram_exit_retention(void) {}
#endif
void dram_clock_switch(unsigned int target_drate, bool bypass_mode);

Loading…
Cancel
Save