For the Layerscape PBL to correctly work in PBL we have to configure the read watermark level to 0x80 aka one full block of 512 bytes (0x80 * sizeof(u32)) With the current value of 0x10 the ESDHC will signal data available, but we are only allowed to read 0x10 words. After that we would have to wait for data being ready again, but sdhci_rx_pio() does not do that. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/mci/imx-esdhc-common.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/mci/imx-esdhc-common.c b/drivers/mci/imx-esdhc-common.c index 3c1ff98824..3d93889143 100644 --- a/drivers/mci/imx-esdhc-common.c +++ b/drivers/mci/imx-esdhc-common.c @@ -59,19 +59,14 @@ static int esdhc_setup_data(struct fsl_esdhc_host *host, struct mci_data *data, u32 wml_value; wml_value = data->blocksize / 4; + if (wml_value > 0x80) + wml_value = 0x80; - if (data->flags & MMC_DATA_READ) { - if (wml_value > 0x10) - wml_value = 0x10; - + if (data->flags & MMC_DATA_READ) esdhc_clrsetbits32(host, IMX_SDHCI_WML, WML_RD_WML_MASK, wml_value); - } else { - if (wml_value > 0x80) - wml_value = 0x80; - + else esdhc_clrsetbits32(host, IMX_SDHCI_WML, WML_WR_WML_MASK, wml_value << 16); - } host->sdhci.sdma_boundary = 0; -- 2.39.2