Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: drivers/mmc/host/sdhci.c

Issue 6489022: sdhci:Fix to restore SDIO card interrupt after resume (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel-next.git@chromeos-2.6.37
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | include/linux/mmc/sdhci.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface dr iver 2 * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface dr iver
3 * 3 *
4 * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved. 4 * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at 8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version. 9 * your option) any later version.
10 * 10 *
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) 1647 int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
1648 { 1648 {
1649 int ret = 0; 1649 int ret = 0;
1650 struct mmc_host *mmc = host->mmc; 1650 struct mmc_host *mmc = host->mmc;
1651 1651
1652 sdhci_disable_card_detection(host); 1652 sdhci_disable_card_detection(host);
1653 1653
1654 if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) 1654 if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO))
1655 ret = mmc_suspend_host(host->mmc); 1655 ret = mmc_suspend_host(host->mmc);
1656 1656
1657 /* Save the original intmask to restore later */
1658 host->save_intmask = sdhci_readl(host, SDHCI_INT_ENABLE);
1657 sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); 1659 sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK);
1658 1660
1659 if (host->vmmc) 1661 if (host->vmmc)
1660 ret = regulator_disable(host->vmmc); 1662 ret = regulator_disable(host->vmmc);
1661 1663
1662 if (host->irq) 1664 if (host->irq)
1663 disable_irq(host->irq); 1665 disable_irq(host->irq);
1664 1666
1665 return ret; 1667 return ret;
1666 } 1668 }
(...skipping 21 matching lines...) Expand all
1688 enable_irq(host->irq); 1690 enable_irq(host->irq);
1689 1691
1690 sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); 1692 sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER));
1691 mmiowb(); 1693 mmiowb();
1692 1694
1693 if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) 1695 if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO))
1694 ret = mmc_resume_host(host->mmc); 1696 ret = mmc_resume_host(host->mmc);
1695 1697
1696 sdhci_enable_card_detection(host); 1698 sdhci_enable_card_detection(host);
1697 1699
1700 /* Restore the original intmask */
1701 sdhci_unmask_irqs(host, host->save_intmask);
1702
1698 return ret; 1703 return ret;
1699 } 1704 }
1700 1705
1701 EXPORT_SYMBOL_GPL(sdhci_resume_host); 1706 EXPORT_SYMBOL_GPL(sdhci_resume_host);
1702 1707
1703 void sdhci_enable_irq_wakeups(struct sdhci_host *host) 1708 void sdhci_enable_irq_wakeups(struct sdhci_host *host)
1704 { 1709 {
1705 u8 val; 1710 u8 val;
1706 val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL); 1711 val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL);
1707 val |= SDHCI_WAKE_ON_INT; 1712 val |= SDHCI_WAKE_ON_INT;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 module_init(sdhci_drv_init); 2122 module_init(sdhci_drv_init);
2118 module_exit(sdhci_drv_exit); 2123 module_exit(sdhci_drv_exit);
2119 2124
2120 module_param(debug_quirks, uint, 0444); 2125 module_param(debug_quirks, uint, 0444);
2121 2126
2122 MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>"); 2127 MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
2123 MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver"); 2128 MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver");
2124 MODULE_LICENSE("GPL"); 2129 MODULE_LICENSE("GPL");
2125 2130
2126 MODULE_PARM_DESC(debug_quirks, "Force certain quirks."); 2131 MODULE_PARM_DESC(debug_quirks, "Force certain quirks.");
OLDNEW
« no previous file with comments | « no previous file | include/linux/mmc/sdhci.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698