sdhci.c (2a63303d9b87cfc3f08144e54daab718a8173e15) | sdhci.c (2ee4f6200597bda9713e28a9c1e65a392615b4b5) |
---|---|
1/* 2 * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface driver 3 * 4 * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved. 5 * 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 8 * the Free Software Foundation; either version 2 of the License, or (at --- 2393 unchanged lines hidden (view full) --- 2402static void sdhci_tasklet_finish(unsigned long param) 2403{ 2404 struct sdhci_host *host = (struct sdhci_host *)param; 2405 2406 while (!sdhci_request_done(host)) 2407 ; 2408} 2409 | 1/* 2 * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface driver 3 * 4 * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved. 5 * 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 8 * the Free Software Foundation; either version 2 of the License, or (at --- 2393 unchanged lines hidden (view full) --- 2402static void sdhci_tasklet_finish(unsigned long param) 2403{ 2404 struct sdhci_host *host = (struct sdhci_host *)param; 2405 2406 while (!sdhci_request_done(host)) 2407 ; 2408} 2409 |
2410static void sdhci_timeout_timer(unsigned long data) | 2410static void sdhci_timeout_timer(struct timer_list *t) |
2411{ 2412 struct sdhci_host *host; 2413 unsigned long flags; 2414 | 2411{ 2412 struct sdhci_host *host; 2413 unsigned long flags; 2414 |
2415 host = (struct sdhci_host*)data; | 2415 host = from_timer(host, t, timer); |
2416 2417 spin_lock_irqsave(&host->lock, flags); 2418 2419 if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { 2420 pr_err("%s: Timeout waiting for hardware cmd interrupt.\n", 2421 mmc_hostname(host->mmc)); 2422 sdhci_dumpregs(host); 2423 2424 host->cmd->error = -ETIMEDOUT; 2425 sdhci_finish_mrq(host, host->cmd->mrq); 2426 } 2427 2428 mmiowb(); 2429 spin_unlock_irqrestore(&host->lock, flags); 2430} 2431 | 2416 2417 spin_lock_irqsave(&host->lock, flags); 2418 2419 if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { 2420 pr_err("%s: Timeout waiting for hardware cmd interrupt.\n", 2421 mmc_hostname(host->mmc)); 2422 sdhci_dumpregs(host); 2423 2424 host->cmd->error = -ETIMEDOUT; 2425 sdhci_finish_mrq(host, host->cmd->mrq); 2426 } 2427 2428 mmiowb(); 2429 spin_unlock_irqrestore(&host->lock, flags); 2430} 2431 |
2432static void sdhci_timeout_data_timer(unsigned long data) | 2432static void sdhci_timeout_data_timer(struct timer_list *t) |
2433{ 2434 struct sdhci_host *host; 2435 unsigned long flags; 2436 | 2433{ 2434 struct sdhci_host *host; 2435 unsigned long flags; 2436 |
2437 host = (struct sdhci_host *)data; | 2437 host = from_timer(host, t, data_timer); |
2438 2439 spin_lock_irqsave(&host->lock, flags); 2440 2441 if (host->data || host->data_cmd || 2442 (host->cmd && sdhci_data_line_cmd(host->cmd))) { 2443 pr_err("%s: Timeout waiting for hardware interrupt.\n", 2444 mmc_hostname(host->mmc)); 2445 sdhci_dumpregs(host); --- 1298 unchanged lines hidden (view full) --- 3744 int ret; 3745 3746 /* 3747 * Init tasklets. 3748 */ 3749 tasklet_init(&host->finish_tasklet, 3750 sdhci_tasklet_finish, (unsigned long)host); 3751 | 2438 2439 spin_lock_irqsave(&host->lock, flags); 2440 2441 if (host->data || host->data_cmd || 2442 (host->cmd && sdhci_data_line_cmd(host->cmd))) { 2443 pr_err("%s: Timeout waiting for hardware interrupt.\n", 2444 mmc_hostname(host->mmc)); 2445 sdhci_dumpregs(host); --- 1298 unchanged lines hidden (view full) --- 3744 int ret; 3745 3746 /* 3747 * Init tasklets. 3748 */ 3749 tasklet_init(&host->finish_tasklet, 3750 sdhci_tasklet_finish, (unsigned long)host); 3751 |
3752 setup_timer(&host->timer, sdhci_timeout_timer, (unsigned long)host); 3753 setup_timer(&host->data_timer, sdhci_timeout_data_timer, 3754 (unsigned long)host); | 3752 timer_setup(&host->timer, sdhci_timeout_timer, 0); 3753 timer_setup(&host->data_timer, sdhci_timeout_data_timer, 0); |
3755 3756 init_waitqueue_head(&host->buf_ready_int); 3757 3758 sdhci_init(host, 0); 3759 3760 ret = request_threaded_irq(host->irq, sdhci_irq, sdhci_thread_irq, 3761 IRQF_SHARED, mmc_hostname(mmc), host); 3762 if (ret) { --- 152 unchanged lines hidden --- | 3754 3755 init_waitqueue_head(&host->buf_ready_int); 3756 3757 sdhci_init(host, 0); 3758 3759 ret = request_threaded_irq(host->irq, sdhci_irq, sdhci_thread_irq, 3760 IRQF_SHARED, mmc_hostname(mmc), host); 3761 if (ret) { --- 152 unchanged lines hidden --- |