kernel-ark/drivers/net/wireless/libertas/if_sdio.h
Bing Zhao b136a1414c 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>
2009-05-22 14:06:00 -04:00

55 lines
1.3 KiB
C

/*
* linux/drivers/net/wireless/libertas/if_sdio.h
*
* Copyright 2007 Pierre Ossman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#ifndef _LBS_IF_SDIO_H
#define _LBS_IF_SDIO_H
#define IF_SDIO_MODEL_8385 0x04
#define IF_SDIO_MODEL_8686 0x0b
#define IF_SDIO_MODEL_8688 0x10
#define IF_SDIO_IOPORT 0x00
#define IF_SDIO_H_INT_MASK 0x04
#define IF_SDIO_H_INT_OFLOW 0x08
#define IF_SDIO_H_INT_UFLOW 0x04
#define IF_SDIO_H_INT_DNLD 0x02
#define IF_SDIO_H_INT_UPLD 0x01
#define IF_SDIO_H_INT_STATUS 0x05
#define IF_SDIO_H_INT_RSR 0x06
#define IF_SDIO_H_INT_STATUS2 0x07
#define IF_SDIO_RD_BASE 0x10
#define IF_SDIO_STATUS 0x20
#define IF_SDIO_IO_RDY 0x08
#define IF_SDIO_CIS_RDY 0x04
#define IF_SDIO_UL_RDY 0x02
#define IF_SDIO_DL_RDY 0x01
#define IF_SDIO_C_INT_MASK 0x24
#define IF_SDIO_C_INT_STATUS 0x28
#define IF_SDIO_C_INT_RSR 0x2C
#define IF_SDIO_SCRATCH 0x34
#define IF_SDIO_SCRATCH_OLD 0x80fe
#define IF_SDIO_FIRMWARE_OK 0xfedc
#define IF_SDIO_RX_LEN 0x42
#define IF_SDIO_RX_UNIT 0x43
#define IF_SDIO_EVENT 0x80fc
#define IF_SDIO_BLOCK_SIZE 256
#endif