Root/target/linux/xburst/patches-3.2/0027-Revert-mmc-sdio-optimized-SDIO-IRQ-handling.patch

Source at commit a4f94608b1c84c9faf85a3efc10d603e09947c52 created 8 years 4 months ago.
By Xiangfu, xburst: nanonote: fix atusb compile error
1From 1e20e109415b0bcdcc08e5c4e9d912115028f8c2 Mon Sep 17 00:00:00 2001
2From: Xiangfu Liu <xiangfu@sharism.cc>
3Date: Tue, 6 Mar 2012 11:42:29 +0800
4Subject: [PATCH 27/28] Revert-mmc-sdio-optimized-SDIO-IRQ-handling
5
6---
7 drivers/mmc/core/sdio_irq.c | 33 +--------------------------------
8 include/linux/mmc/card.h | 1 -
9 2 files changed, 1 insertions(+), 33 deletions(-)
10
11diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
12index 68f81b9..90437b2 100644
13--- a/drivers/mmc/core/sdio_irq.c
14+++ b/drivers/mmc/core/sdio_irq.c
15@@ -32,17 +32,6 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
16 {
17     int i, ret, count;
18     unsigned char pending;
19- struct sdio_func *func;
20-
21- /*
22- * Optimization, if there is only 1 function interrupt registered
23- * call irq handler directly
24- */
25- func = card->sdio_single_irq;
26- if (func) {
27- func->irq_handler(func);
28- return 1;
29- }
30 
31     ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
32     if (ret) {
33@@ -54,7 +43,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
34     count = 0;
35     for (i = 1; i <= 7; i++) {
36         if (pending & (1 << i)) {
37- func = card->sdio_func[i - 1];
38+ struct sdio_func *func = card->sdio_func[i - 1];
39             if (!func) {
40                 pr_warning("%s: pending IRQ for "
41                     "non-existent function\n",
42@@ -198,24 +187,6 @@ static int sdio_card_irq_put(struct mmc_card *card)
43     return 0;
44 }
45 
46-/* If there is only 1 function registered set sdio_single_irq */
47-static void sdio_single_irq_set(struct mmc_card *card)
48-{
49- struct sdio_func *func;
50- int i;
51-
52- card->sdio_single_irq = NULL;
53- if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
54- card->host->sdio_irqs == 1)
55- for (i = 0; i < card->sdio_funcs; i++) {
56- func = card->sdio_func[i];
57- if (func && func->irq_handler) {
58- card->sdio_single_irq = func;
59- break;
60- }
61- }
62-}
63-
64 /**
65  * sdio_claim_irq - claim the IRQ for a SDIO function
66  * @func: SDIO function
67@@ -257,7 +228,6 @@ int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler)
68     ret = sdio_card_irq_get(func->card);
69     if (ret)
70         func->irq_handler = NULL;
71- sdio_single_irq_set(func->card);
72 
73     return ret;
74 }
75@@ -282,7 +252,6 @@ int sdio_release_irq(struct sdio_func *func)
76     if (func->irq_handler) {
77         func->irq_handler = NULL;
78         sdio_card_irq_put(func->card);
79- sdio_single_irq_set(func->card);
80     }
81 
82     ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, &reg);
83diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
84index c8ef9bc..db1ab97 100644
85--- a/include/linux/mmc/card.h
86+++ b/include/linux/mmc/card.h
87@@ -245,7 +245,6 @@ struct mmc_card {
88     struct sdio_cccr cccr; /* common card info */
89     struct sdio_cis cis; /* common tuple info */
90     struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */
91- struct sdio_func *sdio_single_irq; /* SDIO function when only one IRQ active */
92     unsigned num_info; /* number of info strings */
93     const char **info; /* info strings */
94     struct sdio_func_tuple *tuples; /* unknown common tuples */
95--
961.7.5.4
97
98

Archive Download this file



interactive