[U-Boot] Possible bug in sdhci.c
Pantelis Antoniou
panto at antoniou-consulting.com
Mon Feb 23 18:57:36 CET 2015
Hi Matt,
> On Feb 19, 2015, at 20:33 , Matt Reimer <mreimer at sdgsystems.com> wrote:
>
> In sdhci_init() a writel() is used on a byte-sized register, which would clobber the adjacent registers. Below is my suggested fix. If it looks correct, I can submit a proper patch.
>
> Matt
>
>
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 82d7984..1f8917b 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -412,7 +412,7 @@ static int sdhci_init(struct mmc *mmc)
> if (host->quirks & SDHCI_QUIRK_NO_CD) {
> unsigned int status;
>
> - sdhci_writel(host, SDHCI_CTRL_CD_TEST_INS | SDHCI_CTRL_CD_TEST,
> + sdhci_writeb(host, SDHCI_CTRL_CD_TEST_INS | SDHCI_CTRL_CD_TEST,
> SDHCI_HOST_CONTROL);
>
> status = sdhci_readl(host, SDHCI_PRESENT_STATE);
>
Correct again. Please send a proper patch.
Regards
— Pantelis
More information about the U-Boot
mailing list