Skip to contentSkip to conversation

imx8: 'struct dram_timing_info' incompatibilities

DISCUSSION Enrico Scholz 2 participants 2 messages Apr 29, 2024

lore
Share & tools
lore
#0 lore raw

Hi,

commit e6234f90 ("ddr: Initial i.MX9 support") adds unconditionally fields to the dram timing info object (include/soc/imx/ddr.h):

|  struct dram_timing_info {
|       ...
| +	/* fsp config */
| +	struct dram_fsp_cfg *fsp_cfg;
| +	unsigned int fsp_cfg_num;

However, the iMX8 ATF ([1]) does not have this field and DRAM related SMC calls like

| arm_smccc_smc(FSL_SIP_DDR_DVFS, 0x11, i, 0, 0, 0, 0, 0, &res);

in the NXP busfreq-imx8mq.c driver will fail [2].

Am I missing something here or should the dram_timing_info table somehow translated between these architectures (e.g. in dram_config_save())?

Enrico

Footnotes:
[1] https://github.com/nxp-imx/imx-atf/blob/lf_v2.8/plat/imx/imx8m/include/dram.h

[2] typical message: "imx_busfreq: probe of busfreq failed with error -22"

#1 lore raw

Hello Enrico,

Quoted 15 lines · Enrico Scholz

Hi,

commit e6234f90 ("ddr: Initial i.MX9 support") adds unconditionally fields to the dram timing info object (include/soc/imx/ddr.h):

|  struct dram_timing_info {
|       ...
| +	/* fsp config */
| +	struct dram_fsp_cfg *fsp_cfg;
| +	unsigned int fsp_cfg_num;

However, the iMX8 ATF ([1]) does not have this field and DRAM related SMC calls like

Quoted 7 lines

| arm_smccc_smc(FSL_SIP_DDR_DVFS, 0x11, i, 0, 0, 0, 0, 0, &res);

in the NXP busfreq-imx8mq.c driver will fail [2].

Am I missing something here or should the dram_timing_info table somehow translated between these architectures (e.g. in dram_config_save())?

No, you are right. See the patch I shortly before:
https://lore.barebox.org/barebox/[email protected]/T/#u

Cheers,
Ahmad

Quoted 11 lines

Enrico

Footnotes:
[1] https://github.com/nxp-imx/imx-atf/blob/lf_v2.8/plat/imx/imx8m/include/dram.h

[2] typical message: "imx_busfreq: probe of busfreq failed with error -22"

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |