cca853ad0e05569e39694b9ce3737e926faeea01
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / staging / csr / sdioemb / slot_pxa27x.h
1 /*
2  * PXA27x MMC/SD controller definitions.
3  *
4  * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5  *
6  * Refer to LICENSE.txt included with this source code for details on
7  * the license terms.
8  */
9 #ifndef _SLOT_PXA27X_H
10 #define _SLOT_PXA27X_H
11
12 #define PXA27X_MMC_MMCLK_BASE_FREQ 19500000
13 #define PXA27X_MMC_FIFO_SIZE 32
14
15 #define STOP_CLOCK              (1 << 0)
16 #define START_CLOCK             (2 << 0)
17
18 #define STAT_END_CMD_RES                (1 << 13)
19 #define STAT_PRG_DONE                   (1 << 12)
20 #define STAT_DATA_TRAN_DONE             (1 << 11)
21 #define STAT_CLK_EN                     (1 << 8)
22 #define STAT_RECV_FIFO_FULL             (1 << 7)
23 #define STAT_XMIT_FIFO_EMPTY            (1 << 6)
24 #define STAT_RES_CRC_ERR                (1 << 5)
25 #define STAT_SPI_READ_ERROR_TOKEN       (1 << 4)
26 #define STAT_CRC_READ_ERROR             (1 << 3)
27 #define STAT_CRC_WRITE_ERROR            (1 << 2)
28 #define STAT_TIME_OUT_RESPONSE          (1 << 1)
29 #define STAT_READ_TIME_OUT              (1 << 0)
30
31 #define SPI_CS_ADDRESS          (1 << 3)
32 #define SPI_CS_EN               (1 << 2)
33 #define CRC_ON                  (1 << 1)
34 #define SPI_EN                  (1 << 0)
35
36 #define CMDAT_SDIO_INT_EN       (1 << 11)
37 #define CMDAT_STOP_TRAN         (1 << 10)
38 #define CMDAT_SD_4DAT           (1 << 8)
39 #define CMDAT_DMAEN             (1 << 7)
40 #define CMDAT_INIT              (1 << 6)
41 #define CMDAT_BUSY              (1 << 5)
42 #define CMDAT_STREAM            (1 << 4)        /* 1 = stream */
43 #define CMDAT_WRITE             (1 << 3)        /* 1 = write */
44 #define CMDAT_DATAEN            (1 << 2)
45 #define CMDAT_RESP_NONE         (0 << 0)
46 #define CMDAT_RESP_SHORT        (1 << 0)
47 #define CMDAT_RESP_R2           (2 << 0)
48 #define CMDAT_RESP_R3           (3 << 0)
49
50 #define RDTO_MAX                0xffff
51
52 #define BUF_PART_FULL           (1 << 0)
53
54 #define SDIO_SUSPEND_ACK        (1 << 12)
55 #define SDIO_INT                (1 << 11)
56 #define RD_STALLED              (1 << 10)
57 #define RES_ERR                 (1 << 9)
58 #define DAT_ERR                 (1 << 8)
59 #define TINT                    (1 << 7)
60 #define TXFIFO_WR_REQ           (1 << 6)
61 #define RXFIFO_RD_REQ           (1 << 5)
62 #define CLK_IS_OFF              (1 << 4)
63 #define STOP_CMD                (1 << 3)
64 #define END_CMD_RES             (1 << 2)
65 #define PRG_DONE                (1 << 1)
66 #define DATA_TRAN_DONE          (1 << 0)
67
68 #define MMC_I_MASK_ALL          0x00001fff
69
70 #endif /* #ifndef _SLOT_PXA27X_H */