libertas: get SD8688 rx length with one CMD52
authorBing Zhao <bzhao@marvell.com>
Wed, 20 May 2009 02:48:19 +0000 (19:48 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 May 2009 18:06:00 +0000 (14:06 -0400)
commitb136a1414c94b4bda1057b4ffde26253d2527628
tree0a534b4665d2b9478f2372473587b1d881e783e7
parente70a5ac5d27166cfe5bfbe8f63017af3b09d72ce
libertas: get SD8688 rx length with one CMD52

Usually, the 16-bit rx length is read from scratch pad registers
with two CMD52 transactions:
SD8385:  IF_SDIO_SCRATCH_OLD (0x80fe/0x80ff)
SD8686/SD8688: IF_SDIO_SCRATCH     (0x34/0x35)

Alternatively, SD8688 firmware offers an enhanced method for driver
to read an 8-bit rx length (in units) with a single CMD52:
IF_SDIO_RX_UNIT 0x43 is read one time after firmware is ready.
IF_SDIO_RX_LEN  0x42 is read every time when rx interrupt is received.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_sdio.c
drivers/net/wireless/libertas/if_sdio.h