diff options
author | Ajitpal.Singh <ajitpal.singh@stericsson.com> | 2012-02-29 15:14:13 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:06:36 +0200 |
commit | 7dafd98f73a6a55a257305eeacfc8c65b085bdbe (patch) | |
tree | efc9fea4c78bb42c6bed6538ac7d4cdb56eb834c | |
parent | bd4fb12f5688a2991d78208dda9826aeba1769be (diff) |
cw1200: Remove unnecessary reads of CONTROL reg
cw1200 device implements a SDIO retry mechanism which requires
the HOST to do a read/write to any device reg after reading the QUEUE
reg.
Removed reading of CONTROL register after every RX/TX and replaced
it with a read of 1 byte of the CONFIG reg when no RX/TX is pending
in the cw1200_bh()
ST-Ericsson ID: 357764
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: Ajitpal.Singh <ajitpal.singh@stericsson.com>
Change-Id: Ib700807853883800fb2649e3b430c43c14e1e6d8
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32007
Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
Reviewed-by: QABUILD
Reviewed-by: QATEST
Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
-rw-r--r-- | drivers/staging/cw1200/bh.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/cw1200/bh.c b/drivers/staging/cw1200/bh.c index ff6b85edfb7..acc16459807 100644 --- a/drivers/staging/cw1200/bh.c +++ b/drivers/staging/cw1200/bh.c @@ -262,6 +262,7 @@ static int cw1200_bh(void *arg) int tx_allowed; int pending_tx = 0; long status; + u8 dummy; for (;;) { if (!priv->hw_bufs_used @@ -274,6 +275,12 @@ static int cw1200_bh(void *arg) else status = MAX_SCHEDULE_TIMEOUT; + /* Dummy Read for SDIO retry mechanism*/ + if (((atomic_read(&priv->bh_rx) == 0) && + (atomic_read(&priv->bh_tx) == 0))) + cw1200_reg_read(priv, ST90TDS_CONFIG_REG_ID, + &dummy, sizeof(dummy)); + status = wait_event_interruptible_timeout(priv->bh_wq, ({ rx = atomic_xchg(&priv->bh_rx, 0); tx = atomic_xchg(&priv->bh_tx, 0); @@ -499,14 +506,6 @@ tx: } } - /* HACK!!! Device tends not to send interrupt - * if this extra check is missing */ - if (!(ctrl_reg & ST90TDS_CONT_NEXT_LEN_MASK)) { - if (WARN_ON(cw1200_bh_read_ctrl_reg( - priv, &ctrl_reg))) - break; - } - if (ctrl_reg & ST90TDS_CONT_NEXT_LEN_MASK) goto rx; } |