/* A fake interrupt could be created when we poll SDIO_CCCR_INTx *registerwithaMarvellSD8797card.AdummyCMD52readto *function0register0xffcanavoidthis.
*/
mmc_io_rw_direct(card, 0, 0, 0xff, 0, &dummy);
}
pr_debug("%s: IRQ thread started (poll period = %lu jiffies)\n",
mmc_hostname(host), period);
do { /* *Weclaimthehosthereondriversbehalfforacouple *reasons: * *1)itisalreadyneededtoretrievetheCCCR_INTx; *2)wewantthedriver(s)tocleartheIRQconditionASAP; *3)weneedtocontroltheabortconditionlocally. * *JustliketraditionalhardIRQhandlers,weexpectSDIO *IRQhandlerstobequickandtothepoint,sothatthe *holdingofthehostlockdoesnotcovertoomuchwork *thatdoesn'trequirethatlocktobeheld.
*/
ret = __mmc_claim_host(host, NULL,
&host->sdio_irq_thread_abort); if (ret) break;
ret = process_sdio_pending_irqs(host);
mmc_release_host(host);
/* *Giveotherthreadsachancetoruninthepresenceof *errors.
*/ if (ret < 0) {
set_current_state(TASK_INTERRUPTIBLE); if (!kthread_should_stop())
schedule_timeout(HZ);
set_current_state(TASK_RUNNING);
}
/* *Adaptivepollingfrequencybasedontheassumption *thataninterruptwillbecloselyfollowedbymore. *Thishasasubstantialbenefitfornetworkdevices.
*/ if (!(host->caps & MMC_CAP_SDIO_IRQ)) { if (ret > 0)
period /= 2; else {
period++; if (period > idle_period)
period = idle_period;
}
}
set_current_state(TASK_INTERRUPTIBLE); if (host->caps & MMC_CAP_SDIO_IRQ)
host->ops->enable_sdio_irq(host, 1); if (!kthread_should_stop())
schedule_timeout(period);
set_current_state(TASK_RUNNING);
} while (!kthread_should_stop());
if (host->caps & MMC_CAP_SDIO_IRQ)
host->ops->enable_sdio_irq(host, 0);
pr_debug("%s: IRQ thread exiting with code %d\n",
mmc_hostname(host), ret);
/* If there is only 1 function registered set sdio_single_irq */ staticvoid sdio_single_irq_set(struct mmc_card *card)
{ struct sdio_func *func; int i;
card->sdio_single_irq = NULL; if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
card->host->sdio_irqs == 1) { for (i = 0; i < card->sdio_funcs; i++) {
func = card->sdio_func[i]; if (func && func->irq_handler) {
card->sdio_single_irq = func; break;
}
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.