]> git.sur5r.net Git - u-boot/blob - drivers/mmc/bfin_sdh.h
OMAP3: Fix SDRC init
[u-boot] / drivers / mmc / bfin_sdh.h
1 /*
2  * Copyright (C) 2008 Analog Device Inc.
3  *
4  * See file CREDITS for list of people who contributed to this
5  * project.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307 USA
21  */
22 #ifndef __BLACKFIN_SDH_H__
23 #define __BLACKFIN_SDH_H__
24
25 #define MMC_RSP_PRESENT (1 << 0)
26 #define MMC_RSP_136     (1 << 1)                /* 136 bit response */
27 #define MMC_RSP_CRC     (1 << 2)                /* expect valid crc */
28 #define MMC_RSP_BUSY    (1 << 3)                /* card may send busy */
29 #define MMC_RSP_OPCODE  (1 << 4)                /* response contains opcode */
30
31 #define MMC_CMD_MASK    (3 << 5)                /* non-SPI command type */
32 #define MMC_CMD_AC      (0 << 5)
33 #define MMC_CMD_ADTC    (1 << 5)
34 #define MMC_CMD_BC      (2 << 5)
35 #define MMC_CMD_BCR     (3 << 5)
36
37 #define MMC_RSP_SPI_S1  (1 << 7)                /* one status byte */
38 #define MMC_RSP_SPI_S2  (1 << 8)                /* second byte */
39 #define MMC_RSP_SPI_B4  (1 << 9)                /* four data bytes */
40 #define MMC_RSP_SPI_BUSY (1 << 10)              /* card may send busy */
41
42 /*
43  * These are the native response types, and correspond to valid bit
44  * patterns of the above flags.  One additional valid pattern
45  * is all zeros, which means we don't expect a response.
46  */
47 #define MMC_RSP_NONE    (0)
48 #define MMC_RSP_R1      (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
49 #define MMC_RSP_R1B     (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
50 #define MMC_RSP_R2      (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
51 #define MMC_RSP_R3      (MMC_RSP_PRESENT)
52 #define MMC_RSP_R4      (MMC_RSP_PRESENT)
53 #define MMC_RSP_R5      (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
54 #define MMC_RSP_R6      (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
55 #define MMC_RSP_R7      (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
56 #define ILLEGAL_COMMAND  (1 << 22)
57 #define APP_CMD          (1 << 5)
58
59 #endif