[PATCH 1/1] Zynq: add support to chainload another barebox

Michael Tretter m.tretter at pengutronix.de
Mon May 17 09:23:32 BST 2021


On Wed, 05 May 2021 09:40:29 +0000, Michael Graichen wrote:
[...]
> I'm currently booting from SDcard and i have not realised any problems with
> the FAT support so far. But with the arasan-sdhci driver when writing, see
> my patch below which fixes it for me but I haven't dived into the drivers
> very deeply yet.
> 
> best regards
> Michael
> 
> 
>  drivers/mci/arasan-sdhci.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
> index 520bf30ff..669675369 100644
> --- a/drivers/mci/arasan-sdhci.c
> +++ b/drivers/mci/arasan-sdhci.c
> @@ -265,7 +265,7 @@ static int arasan_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,
>  	if (cmd->cmdidx != MMC_CMD_STOP_TRANSMISSION)
>  		mask |= SDHCI_CMD_INHIBIT_DATA;
>  
> -	ret = wait_on_timeout(10 * MSECOND,
> +	ret = wait_on_timeout(100 * MSECOND,
>  			!(sdhci_read32(&host->sdhci, SDHCI_PRESENT_STATE) & mask));
>  
>  	if (ret) {
> @@ -277,8 +277,6 @@ static int arasan_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,
>  	sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, ~0);
>  
>  	mask = SDHCI_INT_CMD_COMPLETE;
> -	if (data)
> -		mask |= SDHCI_INT_DATA_AVAIL;

This looks familiar. I have a similar patch that sets SDHCI_INT_DATA_AVAIL
only if the command is a READ, but I didn't yet have time to verify, that this
is the correct fix.

Michael

>  
>  	sdhci_set_cmd_xfer_mode(&host->sdhci, cmd, data, false, &command, &xfer);



More information about the barebox mailing list