xref: /openbmc/estoraged/include/linux/mmc/mmc.h (revision da5aa614090fbd22399db85ec8866353c4c22d9c)
1 /*
2  * Header for MultiMediaCard (MMC)
3  *
4  * Copyright 2002 Hewlett-Packard Company
5  *
6  * Use consistent with the GNU GPL is permitted,
7  * provided that this copyright notice is
8  * preserved in its entirety in all copies and derived works.
9  *
10  * HEWLETT-PACKARD COMPANY MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
11  * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
12  * FITNESS FOR ANY PARTICULAR PURPOSE.
13  *
14  * Many thanks to Alessandro Rubini and Jonathan Corbet!
15  *
16  * Based strongly on code by:
17  *
18  * Author: Yong-iL Joh <tolkien@mizi.com>
19  *
20  * Author:  Andrew Christian
21  *          15 May 2002
22  */
23 
24 // clang-format off
25 #ifndef LINUX_MMC_MMC_H
26 #define LINUX_MMC_MMC_H
27 
28 #include <linux/types.h>
29 
30 /* Standard MMC commands (4.1)           type  argument     response */
31    /* class 1 */
32 #define MMC_SWITCH                6   /* ac   [31:0] See below   R1b */
33 #define MMC_SEND_EXT_CSD          8   /* adtc                    R1  */
34 
35 /*
36  * EXT_CSD fields
37  */
38 
39 #define EXT_CSD_BKOPS_EN		163	/* R/W */
40 #define EXT_CSD_BKOPS_START		164	/* W */
41 #define EXT_CSD_BKOPS_STATUS		246	/* RO */
42 #define EXT_CSD_BKOPS_SUPPORT		502	/* RO */
43 
44 /*
45  * EXT_CSD field definitions
46  */
47 
48 #define EXT_CSD_CMD_SET_NORMAL		(1<<0)
49 
50 /*
51  * BKOPS modes
52  */
53 #define EXT_CSD_MANUAL_BKOPS_MASK	0x01
54 #define EXT_CSD_AUTO_BKOPS_MASK		0x02
55 
56 /*
57  * MMC_SWITCH access modes
58  */
59 #define MMC_SWITCH_MODE_WRITE_BYTE	0x03	/* Set target to value */
60 
61 #endif /* LINUX_MMC_MMC_H */
62 // clang-format on
63