tizen 2.4 release
[kernel/u-boot-tm1.git] / drivers / sdio / sdio_master_pal.h
1 \r
2 \r
3 #ifndef _SDIO_MASTER_PAL_H_\r
4 #define _SDIO_MASTER_PAL_H_\r
5 \r
6 /*****************************************************************************/\r
7 //  Description:  Get Card operation handle,after we get the handle ,we can get next operation way of card\r
8 //  Author: Jason.wu\r
9 //  Param\r
10 //              slotNo: slot number\r
11 //  Return:\r
12 //              Not zero: success\r
13 //              zero : fail\r
14 //  Note: \r
15 /*****************************************************************************/\r
16 CARD_SDIO_HANDLE SPRD_SDSlave_Open(int slotNo);\r
17 \r
18 /*****************************************************************************/\r
19 //  Description:  close operation handle of card. afer we free it ,other \r
20 //  application can operate on this card\r
21 //  Author: Jason.wu\r
22 //  Param\r
23 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
24 //  Return:\r
25 //              NONE\r
26 //  Note: \r
27 /*****************************************************************************/\r
28 void SPRD_SDSlave_Close(CARD_SDIO_HANDLE cardHandle);\r
29 /*****************************************************************************/\r
30 //  Description:  close operation handle of card. afer we free it ,other \r
31 //  application can operate on this card\r
32 //  Author: Jason.wu\r
33 //  Param\r
34 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
35 //  Return:\r
36 //              NONE\r
37 //  Note: \r
38 /*****************************************************************************/\r
39 void SPRD_SDSlave_PwrCtl(CARD_SDIO_HANDLE cardHandle,int switchCtl);\r
40 /*****************************************************************************/\r
41 //  Description:  close operation handle of card. afer we free it ,other \r
42 //  application can operate on this card\r
43 //  Author: Jason.wu\r
44 //  Param\r
45 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
46 //  Return:\r
47 //              NONE\r
48 //  Note: \r
49 /*****************************************************************************/\r
50 void CARD_SDIO_SlotSelect(int slotNo);\r
51 \r
52 int SDIO_SetBusClock(CARD_SDIO_HANDLE cardHandle,int clock);\r
53 //-----------------------------------------------------------------------------------\r
54 //      Set data bus width of card\r
55 //-----------------------------------------------------------------------------------\r
56 int SDIO_SetBusWidth(CARD_SDIO_HANDLE cardHandle,SDIO_CARD_PAL_BUFWIDTH_E width);\r
57 \r
58 /*****************************************************************************/\r
59 //  Description:  close operation handle of card. afer we free it ,other \r
60 //  application can operate on this card\r
61 //  Author: Jason.wu\r
62 //  Param\r
63 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
64 //  Return:\r
65 //              NONE\r
66 //  Note: \r
67 /*****************************************************************************/\r
68 int SDIO_SetBlockLength(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int length);\r
69 \r
70 /*****************************************************************************/\r
71 //  Description:  close operation handle of card. afer we free it ,other \r
72 //  application can operate on this card\r
73 //  Author: Jason.wu\r
74 //  Param\r
75 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
76 //  Return:\r
77 //              NONE\r
78 //  Note: \r
79 /*****************************************************************************/\r
80 int SPRD_SDSlave_InitCard(CARD_SDIO_HANDLE cardHandle);\r
81 /*****************************************************************************/\r
82 //  Description:  close operation handle of card. afer we free it ,other \r
83 //  application can operate on this card\r
84 //  Author: Jason.wu\r
85 //  Param\r
86 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
87 //  Return:\r
88 //              NONE\r
89 //  Note: \r
90 /*****************************************************************************/\r
91 int SDIO_ReadBytes(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);\r
92 /*****************************************************************************/\r
93 //  Description:  close operation handle of card. afer we free it ,other \r
94 //  application can operate on this card\r
95 //  Author: Jason.wu\r
96 //  Param\r
97 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
98 //  Return:\r
99 //              NONE\r
100 //  Note: \r
101 /*****************************************************************************/\r
102 int SDIO_ReadBlocks(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);\r
103 /*****************************************************************************/\r
104 //  Description:  close operation handle of card. afer we free it ,other \r
105 //  application can operate on this card\r
106 //  Author: Jason.wu\r
107 //  Param\r
108 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
109 //  Return:\r
110 //              NONE\r
111 //  Note: \r
112 /*****************************************************************************/int SDIO_WriteBytes(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);\r
113 /*****************************************************************************/\r
114 //  Description:  close operation handle of card. afer we free it ,other \r
115 //  application can operate on this card\r
116 //  Author: Jason.wu\r
117 //  Param\r
118 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
119 //  Return:\r
120 //              NONE\r
121 //  Note: \r
122 /*****************************************************************************/int SDIO_WriteBlocks(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);\r
123 /*****************************************************************************/\r
124 //  Description:  close operation handle of card. afer we free it ,other \r
125 //  application can operate on this card\r
126 //  Author: Jason.wu\r
127 //  Param\r
128 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
129 //  Return:\r
130 //              NONE\r
131 //  Note: \r
132 /*****************************************************************************/\r
133 int SDIO_ReadByte(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned char* buf);\r
134 /*****************************************************************************/\r
135 //  Description:  close operation handle of card. afer we free it ,other \r
136 //  application can operate on this card\r
137 //  Author: Jason.wu\r
138 //  Param\r
139 //              cardHandle: the handle returned by SPRD_SDSlave_Open\r
140 //  Return:\r
141 //              NONE\r
142 //  Note: \r
143 /*****************************************************************************/\r
144 int SDIO_WriteByte(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned char* wbuf,unsigned char* rbuf);\r
145 #endif//__SDIO_MASTER_H__\r
146 \r
147 \r
148 \r
149 \r
150 \r