diff options
author | Rouven Czerwinski <r.czerwinski@pengutronix.de> | 2021-08-05 10:26:07 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-08-09 20:10:00 +0200 |
commit | 75c17bc9345d806b106925b4abe672b87d229948 (patch) | |
tree | 7c7552fd49242e3164391253feceb7ff93540f7a /drivers | |
parent | ba540e79eca794b6051effe54a2e34650c48a77a (diff) | |
download | barebox-75c17bc9345d806b106925b4abe672b87d229948.tar.gz barebox-75c17bc9345d806b106925b4abe672b87d229948.tar.xz |
mci: imx-esdhc-pbl: initialize fsl_esdhc_host
Since commit 56ca2c197e71 ("mci: sdhci: Get rid of many register ops")
the core checks whether there is an explicit write function for the
host. If the struct is not zero initialized, a bogus value is taken as
the function, resulting in an unbootable board. Zero initialize the
structs properly to let the PBL correctly load images. Fixes booting on
the i.MX8M* board, tested on i.MX8MP EVK.
Fixes: 56ca2c197e71 ("mci: sdhci: Get rid of many register ops")
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210805082607.1698733-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mci/imx-esdhc-pbl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c index d7136f5492..c9a31b5548 100644 --- a/drivers/mci/imx-esdhc-pbl.c +++ b/drivers/mci/imx-esdhc-pbl.c @@ -233,7 +233,7 @@ static int imx8m_esdhc_init(struct fsl_esdhc_host *host, int imx6_esdhc_start_image(int instance) { struct esdhc_soc_data data; - struct fsl_esdhc_host host; + struct fsl_esdhc_host host = { 0 }; switch (instance) { case 0: @@ -272,7 +272,7 @@ int imx6_esdhc_start_image(int instance) int imx7_esdhc_start_image(int instance) { struct esdhc_soc_data data; - struct fsl_esdhc_host host; + struct fsl_esdhc_host host = { 0 }; switch (instance) { case 0: @@ -309,7 +309,7 @@ int imx7_esdhc_start_image(int instance) int imx8m_esdhc_load_image(int instance, bool start) { struct esdhc_soc_data data; - struct fsl_esdhc_host host; + struct fsl_esdhc_host host = { 0 }; int ret; ret = imx8m_esdhc_init(&host, &data, instance); @@ -337,7 +337,7 @@ int imx8m_esdhc_load_image(int instance, bool start) int imx8mp_esdhc_load_image(int instance, bool start) { struct esdhc_soc_data data; - struct fsl_esdhc_host host; + struct fsl_esdhc_host host = { 0 }; int ret; ret = imx8m_esdhc_init(&host, &data, instance); |