Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ufs.h
Go to the documentation of this file.
1 /*
2  * Universal Flash Storage Host controller driver
3  *
4  * This code is based on drivers/scsi/ufs/ufs.h
5  * Copyright (C) 2011-2012 Samsung India Software Operations
6  *
7  * Santosh Yaraganavi <[email protected]>
8  * Vinayak Holikatti <[email protected]>
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * NO WARRANTY
21  * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
22  * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
23  * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
24  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
25  * solely responsible for determining the appropriateness of using and
26  * distributing the Program and assumes all risks associated with its
27  * exercise of rights under this Agreement, including but not limited to
28  * the risks and costs of program errors, damage to or loss of data,
29  * programs or equipment, and unavailability or interruption of operations.
30 
31  * DISCLAIMER OF LIABILITY
32  * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
33  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34  * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
35  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
36  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
37  * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
38  * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
39 
40  * You should have received a copy of the GNU General Public License
41  * along with this program; if not, write to the Free Software
42  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
43  * USA.
44  */
45 
46 #ifndef _UFS_H
47 #define _UFS_H
48 
49 #define MAX_CDB_SIZE 16
50 
51 #define UPIU_HEADER_DWORD(byte3, byte2, byte1, byte0)\
52  ((byte3 << 24) | (byte2 << 16) |\
53  (byte1 << 8) | (byte0))
54 
55 /*
56  * UFS Protocol Information Unit related definitions
57  */
58 
59 /* Task management functions */
60 enum {
67 };
68 
69 /* UTP UPIU Transaction Codes Initiator to Target */
70 enum {
76 };
77 
78 /* UTP UPIU Transaction Codes Target to Initiator */
79 enum {
86 };
87 
88 /* UPIU Read/Write flags */
89 enum {
93 };
94 
95 /* UPIU Task Attributes */
96 enum {
101 };
102 
103 /* UTP QUERY Transaction Specific Fields OpCode */
104 enum {
114 };
115 
116 /* UTP Transfer Request Command Type (CT) */
117 enum {
121 };
122 
123 enum {
127 };
128 
129 /* Task management service response */
130 enum {
136 };
147 };
148 
155 struct utp_upiu_cmd {
159 };
160 
169 struct utp_upiu_rsp {
175 };
176 
191 };
192 
205 };
206 
207 #endif /* End of Header */