mmc: detect SDIO cards
Really basic init sequence for SDIO cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
@@ -67,6 +67,7 @@ struct mmc_card {
|
||||
unsigned int type; /* card type */
|
||||
#define MMC_TYPE_MMC 0 /* MMC card */
|
||||
#define MMC_TYPE_SD 1 /* SD card */
|
||||
#define MMC_TYPE_SDIO 2 /* SDIO card */
|
||||
unsigned int state; /* (our) card state */
|
||||
#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */
|
||||
#define MMC_STATE_READONLY (1<<1) /* card is read-only */
|
||||
@@ -84,6 +85,7 @@ struct mmc_card {
|
||||
|
||||
#define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC)
|
||||
#define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD)
|
||||
#define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO)
|
||||
|
||||
#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
|
||||
#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
|
||||
|
@@ -41,6 +41,7 @@ struct mmc_command {
|
||||
#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
|
||||
#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
|
||||
#define MMC_RSP_R3 (MMC_RSP_PRESENT)
|
||||
#define MMC_RSP_R4 (MMC_RSP_PRESENT)
|
||||
#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
|
||||
#define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
|
||||
|
||||
|
19
include/linux/mmc/sdio.h
Normal file
19
include/linux/mmc/sdio.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* include/linux/mmc/sdio.h
|
||||
*
|
||||
* Copyright 2006-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 MMC_SDIO_H
|
||||
#define MMC_SDIO_H
|
||||
|
||||
/* SDIO commands type argument response */
|
||||
#define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user