import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / masp / asf / asf_inc / sec_typedef.h
1 #ifndef SEC_PAL_H
2 #define SEC_PAL_H
3
4 #include "sec_osal_light.h"
5 #include <mach/sec_osal.h>
6
7 #ifndef FALSE
8 #define FALSE 0
9 #endif
10 #ifndef TRUE
11 #define TRUE 1
12 #endif
13
14 typedef unsigned int uint32;
15 typedef unsigned char uchar;
16
17 /******************************************************************************
18 * DEBUG
19 ******************************************************************************/
20 /* Debug message event */
21 #define DBG_EVT_NONE (0) /* No event */
22 #define DBG_EVT_CMD (1 << 0) /* SEC CMD related event */
23 #define DBG_EVT_FUNC (1 << 1) /* SEC function event */
24 #define DBG_EVT_INFO (1 << 2) /* SEC information event */
25 #define DBG_EVT_WRN (1 << 30) /* Warning event */
26 #define DBG_EVT_ERR (1 << 31) /* Error event */
27 #define DBG_EVT_ALL (0xffffffff)
28
29 #define DBG_EVT_MASK (DBG_EVT_ALL)
30
31 #ifdef SEC_DEBUG
32 #define MSG(evt, fmt, args...) \
33 do { \
34 if ((DBG_EVT_##evt) & DBG_EVT_MASK) { \
35 printk(fmt, ##args); \
36 } \
37 } while(0)
38 #else
39 #define MSG(evt, fmt, args...) do{}while(0)
40 #endif
41
42 #define MSG_FUNC(mod) MSG(FUNC, "[%s] %s\n", mod, __FUNCTION__)
43
44 /******************************************************************************
45 * EXPORT FUNCTION
46 ******************************************************************************/
47 extern void *mcpy(void *dest, const void *src, int count);
48 extern int mcmp (const void *cs, const void *ct, int count);
49 extern void dump_buf(unsigned char* buf, unsigned int len);
50
51 #endif /* end of SEC_LIB_H */