arm: imx: fix board_mmc_init for google coral
PATCH 1/1 arm: imx: fix board_mmc_init for google coral
This fixes a typo in the mxc_get_clock function preventing SPL from initializing USDHC1 and USDHC2.
---
board/google/imx8mq_phanbell/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/google/imx8mq_phanbell/spl.c +2 -2
@@ -101,7 +101,7 @@ int board_mmc_init(struct bd_info *bis)switch (i) {case 0 :init_clk_usdhc (0 ); - usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (USDHC1_CLK_ROOT ); + usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); usdhc_cfg[0 ].max_bus_width =8 ;imx_iomux_v3_setup_multiple_pads (usdhc1_pads,ARRAY_SIZE (usdhc1_pads));
@@ -112,7 +112,7 @@ int board_mmc_init(struct bd_info *bis)break ;case 1 :init_clk_usdhc (1 ); - usdhc_cfg[1 ].sdhc_clk =mxc_get_clock (USDHC2_CLK_ROOT ); + usdhc_cfg[1 ].sdhc_clk =mxc_get_clock (MXC_ESDHC2_CLK ); usdhc_cfg[1 ].max_bus_width =4 ;imx_iomux_v3_setup_multiple_pads (usdhc2_pads,ARRAY_SIZE (usdhc2_pads));
Signature · 1 line
2.34.1
Fabio Estevam
reviewerHi Connor,
Quoted 3 lines · Connor Rigby
This fixes a typo in the
mxc_get_clockfunction preventing SPL from initializing USDHC1 and USDHC2.
I am not able to reproduce the problem with the top of tree U-Boot:
U-Boot SPL 2024.10-rc4-00034-ga7b83ade98e0 (Sep 19 2024 - 12:24:44 -0300) Normal Boot
Trying to boot from MMC2
U-Boot 2024.10-rc4-00034-ga7b83ade98e0 (Sep 19 2024 - 12:24:44 -0300)
CPU: Freescale i.MX8MQ rev2.0 at 1000 MHz Reset cause: POR Model: Google i.MX8MQ Phanbell DRAM: 1 GiB Core: 67 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... Reading from MMC(1)... OK In: serial@30860000 Out: serial@30860000 Err: serial@30860000 Net: eth0: ethernet@30be0000 Hit any key to stop autoboot: 0
=> saveenv
Saving Environment to MMC... Writing to MMC(1)... OK =>
imx8mq_evk also uses the same mxc_get_clock() parameter and also boot.
Which TF-A version you are using?
A message that is not in the archive (sent off-list or not yet received): CABT61E519kNCDyCXh_kY9vLib+fEsR+JiHqKKaRvfZh0YbSXAQ@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CABT61E4kB6vdfSG4Hm2C7fGFqnpCuo-AfJ1QZb_HmYObBK96Og@mail.gmail.com
Fabio Estevam
reviewerHi Connor,
(Adding the list bak on Cc)
Quoted 11 lines · Connor Rigby
Looks like latest does in fact work as you say. Sorry for the noise, should have checked this first!
U-Boot 2024.10-rc5 (Aug 30 2024 - 18:42:43 +0000)
CPU: Freescale i.MX8MQ rev2.0 at 1000 MHz Reset cause: POR Model: Google i.MX8MQ Phanbell DRAM: 1 GiB Core: 67 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1
Ok, great. I'm glad it is working.