| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | ** |
| 3 | ** INTEL CONFIDENTIAL |
| 4 | ** Copyright 2003-2004 Intel Corporation All Rights Reserved. |
| 5 | ** |
| 6 | ** The source code contained or described herein and all documents |
| 7 | ** related to the source code (Material) are owned by Intel Corporation |
| 8 | ** or its suppliers or licensors. Title to the Material remains with |
| 9 | ** Intel Corporation or its suppliers and licensors. The Material contains |
| 10 | ** trade secrets and proprietary and confidential information of Intel |
| 11 | ** or its suppliers and licensors. The Material is protected by worldwide |
| 12 | ** copyright and trade secret laws and treaty provisions. No part of the |
| 13 | ** Material may be used, copied, reproduced, modified, published, uploaded, |
| 14 | ** posted, transmitted, distributed, or disclosed in any way without Intel's |
| 15 | ** prior express written permission. |
| 16 | ** |
| 17 | ** No license under any patent, copyright, trade secret or other intellectual |
| 18 | ** property right is granted to or conferred upon you by disclosure or |
| 19 | ** delivery of the Materials, either expressly, by implication, inducement, |
| 20 | ** estoppel or otherwise. Any license under such intellectual property rights |
| 21 | ** must be express and approved by Intel in writing. |
| 22 | ** |
| 23 | ** xllp_defs.h |
| 24 | ******************************************************************************//****************************************************************************** |
| 25 | * |
| 26 | * (C)Copyright 2005 - 2011 Marvell. All Rights Reserved. |
| 27 | * |
| 28 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL. |
| 29 | * The copyright notice above does not evidence any actual or intended |
| 30 | * publication of such source code. |
| 31 | * This Module contains Proprietary Information of Marvell and should be |
| 32 | * treated as Confidential. |
| 33 | * The information in this file is provided for the exclusive use of the |
| 34 | * licensees of Marvell. |
| 35 | * Such users have the right to use, modify, and incorporate this code into |
| 36 | * products for purposes authorized by the license agreement provided they |
| 37 | * include this notice and the associated copyright notice with any such |
| 38 | * product. |
| 39 | * The information in this file is provided "AS IS" without warranty. |
| 40 | |
| 41 | ****************************************************************************** |
| 42 | ** |
| 43 | ** FILENAME: xllp_defs.h |
| 44 | ** |
| 45 | ** PURPOSE: header file contining common XScale Low Level Primitive |
| 46 | ** (XLLP) type definitions and preprocessor macros. This as |
| 47 | ** a header file that is intended for inclusion within XLLP |
| 48 | ** library sources, and in sources that invoke XLLP library |
| 49 | ** functions. |
| 50 | ** |
| 51 | ** |
| 52 | ******************************************************************************/ |
| 53 | |
| 54 | #ifndef __XLLP_DEFS_H__ |
| 55 | #define __XLLP_DEFS_H__ |
| 56 | |
| 57 | #include "Typedef.h" |
| 58 | |
| 59 | /* Typedefs for peripheral register variables */ |
| 60 | typedef int XLLP_INT32_T, *P_XLLP_INT32_T; |
| 61 | typedef volatile XLLP_INT32_T XLLP_VINT32_T, *P_XLLP_VINT32_T; |
| 62 | typedef unsigned int XLLP_UINT32_T, *P_XLLP_UINT32_T; |
| 63 | typedef volatile XLLP_UINT32_T XLLP_VUINT32_T, *P_XLLP_VUINT32_T; |
| 64 | typedef const volatile XLLP_UINT32_T XLLP_CVUINT32_T, *P_CVUINT32_T; |
| 65 | |
| 66 | typedef int XLLP_INT_T, *P_XLLP_INT_T; |
| 67 | typedef volatile XLLP_INT_T XLLP_VINT_T, *P_XLLP_VINT_T; |
| 68 | typedef unsigned int XLLP_UINT_T, *P_XLLP_UINT_T; |
| 69 | typedef volatile XLLP_UINT_T XLLP_VUINT_T, *P_XLLP_VUINT_T; |
| 70 | typedef const volatile XLLP_UINT_T XLLP_CVUINT_T, *P_CVUINT_T; |
| 71 | |
| 72 | typedef short XLLP_INT16_T, *P_XLLP_INT16_T; |
| 73 | typedef volatile XLLP_INT16_T XLLP_VINT16_T, *P_XLLP_VINT16_T; |
| 74 | typedef unsigned short XLLP_UINT16_T, *P_XLLP_UINT16_T; |
| 75 | typedef volatile XLLP_UINT16_T XLLP_VUINT16_T, *P_XLLP_VUINT16_T; |
| 76 | typedef const volatile XLLP_UINT16_T XLLP_CVUINT16_T, *P_CVUINT16_T; |
| 77 | |
| 78 | typedef char XLLP_INT8_T, *P_XLLP_INT8_T; |
| 79 | typedef volatile XLLP_INT8_T XLLP_VINT8_T, *P_XLLP_VINT8_T; |
| 80 | typedef unsigned char XLLP_UINT8_T, *P_XLLP_UINT8_T; |
| 81 | typedef volatile XLLP_UINT8_T XLLP_VUINT8_T, *P_XLLP_VUINT8_T; |
| 82 | |
| 83 | typedef const volatile XLLP_UINT8_T XLLP_CVUINT8_T, *P_CVUINT8_T; |
| 84 | |
| 85 | #define XLLP_STATUS_T XLLP_UINT32_T |
| 86 | |
| 87 | #ifndef NULL |
| 88 | #define NULL 0 |
| 89 | #endif |
| 90 | |
| 91 | /* XLLP status codes. */ |
| 92 | typedef enum |
| 93 | { |
| 94 | /* The following status codes are common to all XLLP components: */ |
| 95 | XLLP_STATUS_SUCCESS = 0, |
| 96 | XLLP_STATUS_FAILURE, |
| 97 | XLLP_STATUS_UNSUPPORTED, |
| 98 | XLLP_STATUS_WRONG_PARAMETER, |
| 99 | XLLP_STATUS_TIME_OUT, |
| 100 | XLLP_STATUS_NO_RESOURCES, |
| 101 | XLLP_STATUS_HW_ERROR, |
| 102 | XLLP_STATUS_NO_RESPONSE, |
| 103 | XLLP_STATUS_DATA_UNDERRUN, |
| 104 | XLLP_STATUS_DATA_OVERRUN, |
| 105 | XLLP_STATUS_DATA_ERROR, |
| 106 | XLLP_STATUS_OPERATION_ABORTED, |
| 107 | XLLP_STATUS_INVALID_STATE, |
| 108 | XLLP_STATUS_RESOURCE_ALREADY_EXISTS, |
| 109 | /* The following status codes are specific to each XLLP component: */ |
| 110 | XLLP_STATUS_NO_DMA_CHANNEL_AVAILABLE, |
| 111 | XLLP_STATUS_PCCARD_FAILURE, |
| 112 | XLLP_STATUS_PCCARD_INVALID_SOCKET_NUMBER, |
| 113 | XLLP_STATUS_PCCARD_INVALID_POINTER_ALLOC, |
| 114 | XLLP_STATUS_USIM_PARITY_ERROR, |
| 115 | XLLP_STATUS_USIM_CHAR_NOT_RECEIVED_YET, |
| 116 | XLLP_STATUS_USIM_ATR_FAILURE, |
| 117 | XLLP_STATUS_USIM_ATR_NOT_CORRECT, |
| 118 | XLLP_STATUS_TOUCH_PEN_NOT_DOWN |
| 119 | }XLLP_ERROR_STATUS_T; |
| 120 | |
| 121 | /* typedefs for XLLP API */ |
| 122 | typedef enum |
| 123 | { |
| 124 | XLLP_FALSE = 0, |
| 125 | XLLP_TRUE = 1 |
| 126 | } XLLP_BOOL_T; |
| 127 | |
| 128 | typedef enum |
| 129 | { |
| 130 | XLLP_LO = 0, |
| 131 | XLLP_HI = 1 |
| 132 | }XLLP_LEVEL_T; |
| 133 | |
| 134 | typedef enum |
| 135 | { |
| 136 | XLLP_OFF = 0, |
| 137 | XLLP_ON = 1 |
| 138 | }XLLP_CONTROL_T; |
| 139 | |
| 140 | /* Bit Position Macros */ |
| 141 | #define XLLP_BIT_0 ( 1u << 0 ) |
| 142 | #define XLLP_BIT_1 ( 1u << 1 ) |
| 143 | #define XLLP_BIT_2 ( 1u << 2 ) |
| 144 | #define XLLP_BIT_3 ( 1u << 3 ) |
| 145 | #define XLLP_BIT_4 ( 1u << 4 ) |
| 146 | #define XLLP_BIT_5 ( 1u << 5 ) |
| 147 | #define XLLP_BIT_6 ( 1u << 6 ) |
| 148 | #define XLLP_BIT_7 ( 1u << 7 ) |
| 149 | #define XLLP_BIT_8 ( 1u << 8 ) |
| 150 | #define XLLP_BIT_9 ( 1u << 9 ) |
| 151 | #define XLLP_BIT_10 ( 1u << 10 ) |
| 152 | #define XLLP_BIT_11 ( 1u << 11 ) |
| 153 | #define XLLP_BIT_12 ( 1u << 12 ) |
| 154 | #define XLLP_BIT_13 ( 1u << 13 ) |
| 155 | #define XLLP_BIT_14 ( 1u << 14 ) |
| 156 | #define XLLP_BIT_15 ( 1u << 15 ) |
| 157 | #define XLLP_BIT_16 ( 1u << 16 ) |
| 158 | #define XLLP_BIT_17 ( 1u << 17 ) |
| 159 | #define XLLP_BIT_18 ( 1u << 18 ) |
| 160 | #define XLLP_BIT_19 ( 1u << 19 ) |
| 161 | #define XLLP_BIT_20 ( 1u << 20 ) |
| 162 | #define XLLP_BIT_21 ( 1u << 21 ) |
| 163 | #define XLLP_BIT_22 ( 1u << 22 ) |
| 164 | #define XLLP_BIT_23 ( 1u << 23 ) |
| 165 | #define XLLP_BIT_24 ( 1u << 24 ) |
| 166 | #define XLLP_BIT_25 ( 1u << 25 ) |
| 167 | #define XLLP_BIT_26 ( 1u << 26 ) |
| 168 | #define XLLP_BIT_27 ( 1u << 27 ) |
| 169 | #define XLLP_BIT_28 ( 1u << 28 ) |
| 170 | #define XLLP_BIT_29 ( 1u << 29 ) |
| 171 | #define XLLP_BIT_30 ( 1u << 30 ) |
| 172 | #define XLLP_BIT_31 ( 1u << 31 ) |
| 173 | |
| 174 | /* Miscellaneous Macros */ |
| 175 | #define XLLP_USEMASK XLLP_TRUE |
| 176 | #define XLLP_NOMASK XLLP_FALSE |
| 177 | #define XLLP_SET 1 |
| 178 | #define XLLP_CLEAR 0 |
| 179 | #define XLLP_ENCODED_ERROR 0xdeadc0deL |
| 180 | |
| 181 | #endif //__XLLP_DEFS_H__ |
| 182 | |
| 183 | |
| 184 | |
| 185 | |