Reset sdio slot when a device requests disconnect/reconnect.

This allows the mwifiex driver to try to recover from errors.
Note: hostapd may need to be restarted after this, if it's buggy.

b/16846245

(cherry picked from commit 7534549980fbc3319e27f88c08b065671ce02a6b)

Change-Id: Id0df87f3ffcb3fbe415590ac0629ec86e484ca86
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index cdc17cf..29f06a7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -210,6 +210,13 @@
 
 static void sdhci_reinit(struct sdhci_host *host)
 {
+	uint32_t addr = 0x10409804 | KSEG1, v;
+	printk("xx %s - resetting sdhci\n", __func__);
+	v = ioread32(addr);
+	iowrite32(v & (~0x100000), addr);
+	mdelay(5);
+	iowrite32(v | 0x100000, addr);
+
 	sdhci_init(host, 0);
 	sdhci_enable_card_detection(host);
 }