drivers/mmc/host/wbsd.h

Source file repositories/reference/linux-study-clean/drivers/mmc/host/wbsd.h

File Facts

System
Linux kernel
Corpus path
drivers/mmc/host/wbsd.h
Extension
.h
Size
4594 bytes
Lines
182
Domain
Driver Families
Bucket
drivers/mmc
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#define LOCK_CODE		0xAA

#define WBSD_CONF_SWRST		0x02
#define WBSD_CONF_DEVICE	0x07
#define WBSD_CONF_ID_HI		0x20
#define WBSD_CONF_ID_LO		0x21
#define WBSD_CONF_POWER		0x22
#define WBSD_CONF_PME		0x23
#define WBSD_CONF_PMES		0x24

#define WBSD_CONF_ENABLE	0x30
#define WBSD_CONF_PORT_HI	0x60
#define WBSD_CONF_PORT_LO	0x61
#define WBSD_CONF_IRQ		0x70
#define WBSD_CONF_DRQ		0x74

#define WBSD_CONF_PINS		0xF0

#define DEVICE_SD		0x03

#define WBSD_PINS_DAT3_HI	0x20
#define WBSD_PINS_DAT3_OUT	0x10
#define WBSD_PINS_GP11_HI	0x04
#define WBSD_PINS_DETECT_GP11	0x02
#define WBSD_PINS_DETECT_DAT3	0x01

#define WBSD_CMDR		0x00
#define WBSD_DFR		0x01
#define WBSD_EIR		0x02
#define WBSD_ISR		0x03
#define WBSD_FSR		0x04
#define WBSD_IDXR		0x05
#define WBSD_DATAR		0x06
#define WBSD_CSR		0x07

#define WBSD_EINT_CARD		0x40
#define WBSD_EINT_FIFO_THRE	0x20
#define WBSD_EINT_CRC		0x10
#define WBSD_EINT_TIMEOUT	0x08
#define WBSD_EINT_PROGEND	0x04
#define WBSD_EINT_BUSYEND	0x02
#define WBSD_EINT_TC		0x01

#define WBSD_INT_PENDING	0x80
#define WBSD_INT_CARD		0x40
#define WBSD_INT_FIFO_THRE	0x20
#define WBSD_INT_CRC		0x10
#define WBSD_INT_TIMEOUT	0x08
#define WBSD_INT_PROGEND	0x04
#define WBSD_INT_BUSYEND	0x02
#define WBSD_INT_TC		0x01

#define WBSD_FIFO_EMPTY		0x80
#define WBSD_FIFO_FULL		0x40
#define WBSD_FIFO_EMTHRE	0x20
#define WBSD_FIFO_FUTHRE	0x10
#define WBSD_FIFO_SZMASK	0x0F

#define WBSD_MSLED		0x20
#define WBSD_POWER_N		0x10
#define WBSD_WRPT		0x04
#define WBSD_CARDPRESENT	0x01

#define WBSD_IDX_CLK		0x01
#define WBSD_IDX_PBSMSB		0x02
#define WBSD_IDX_TAAC		0x03
#define WBSD_IDX_NSAC		0x04
#define WBSD_IDX_PBSLSB		0x05
#define WBSD_IDX_SETUP		0x06
#define WBSD_IDX_DMA		0x07
#define WBSD_IDX_FIFOEN		0x08
#define WBSD_IDX_STATUS		0x10
#define WBSD_IDX_RSPLEN		0x1E
#define WBSD_IDX_RESP0		0x1F
#define WBSD_IDX_RESP1		0x20
#define WBSD_IDX_RESP2		0x21
#define WBSD_IDX_RESP3		0x22
#define WBSD_IDX_RESP4		0x23
#define WBSD_IDX_RESP5		0x24
#define WBSD_IDX_RESP6		0x25
#define WBSD_IDX_RESP7		0x26
#define WBSD_IDX_RESP8		0x27
#define WBSD_IDX_RESP9		0x28
#define WBSD_IDX_RESP10		0x29
#define WBSD_IDX_RESP11		0x2A
#define WBSD_IDX_RESP12		0x2B
#define WBSD_IDX_RESP13		0x2C
#define WBSD_IDX_RESP14		0x2D
#define WBSD_IDX_RESP15		0x2E
#define WBSD_IDX_RESP16		0x2F

Annotation

Implementation Notes