Skip to content

Commit b7ceeb6

Browse files
committed
mmc: sdhci-of-at91: perform a hardware reset at probe time
For eMMC, it may happen that the memory is left by the bootloader in a bad state. We need to perform a hardware reset by asserting/deasserting the RSTN line. This will ensure the memory comes out in a clean state. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
1 parent 4a82261 commit b7ceeb6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/mmc/host/sdhci-of-at91.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ static int sdhci_at91_probe(struct platform_device *pdev)
421421

422422
/* Perform a software reset before using the IP */
423423
sdhci_at91_reset(host, SDHCI_RESET_ALL);
424+
/* Perform a hardware reset before using the IP */
425+
sdhci_at91_hw_reset(host);
424426

425427
priv->mainck = devm_clk_get(&pdev->dev, "baseclk");
426428
if (IS_ERR(priv->mainck)) {

0 commit comments

Comments
 (0)