xref: /utopia/UTPA2-700.0.x/modules/msos/utopia_core/linux_kernel/utopia_str.c (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 #include "MsTypes.h"
2 #include "utopia.h"
3 
UtopiaStrWaitCondition(const char * u8ModuleName,MS_U32 u32Mode,MS_U32 u32Stage)4 MS_U32 UtopiaStrWaitCondition(const char* u8ModuleName, MS_U32 u32Mode, MS_U32 u32Stage)
5 {
6 #if CONFIG_MSTAR_UTOPIA2K_STR
7     extern int mdrv_utopia2k_str_wait_condition(const char* u8ModuleName, MS_U32 u32Mode, MS_U32 u32Stage);
8     int ret = mdrv_utopia2k_str_wait_condition(u8ModuleName, u32Mode, u32Stage);
9     if (ret < 0)
10     {
11         return UTOPIA_STATUS_FAIL;
12     }
13     else
14     {
15         return UTOPIA_STATUS_SUCCESS;
16     }
17 #else
18     return UTOPIA_STATUS_FAIL;
19 #endif
20 }
21 
UtopiaStrSendCondition(const char * u8ModuleName,MS_U32 u32Mode,MS_U32 u32Stage)22 MS_U32 UtopiaStrSendCondition(const char* u8ModuleName, MS_U32 u32Mode, MS_U32 u32Stage)
23 {
24 #if CONFIG_MSTAR_UTOPIA2K_STR
25     extern int mdrv_utopia2k_str_send_condition(const char* u8ModuleName, MS_U32 u32Mode, MS_U32 u32Stage);
26     int ret = mdrv_utopia2k_str_send_condition(u8ModuleName, u32Mode, u32Stage);
27     if (ret < 0)
28     {
29         return UTOPIA_STATUS_FAIL;
30     }
31     else
32     {
33         return UTOPIA_STATUS_SUCCESS;
34     }
35 #else
36     return UTOPIA_STATUS_FAIL;
37 #endif
38 }
39 
UtopiaStrSetData(char * key,char * value)40 MS_U32 UtopiaStrSetData(char *key, char *value)
41 {
42 #if CONFIG_MSTAR_UTOPIA2K_STR
43     extern int mdrv_utopia2k_str_set_data(char *key, char *value);
44     int ret = mdrv_utopia2k_str_set_data(key, value);
45     if (ret < 0)
46     {
47         return UTOPIA_STATUS_FAIL;
48     }
49     else
50     {
51         return UTOPIA_STATUS_SUCCESS;
52     }
53 #else
54     return UTOPIA_STATUS_FAIL;
55 #endif
56 }
57 
UtopiaStrGetData(char * key,char * value)58 MS_U32 UtopiaStrGetData(char *key, char *value)
59 {
60 #if CONFIG_MSTAR_UTOPIA2K_STR
61     extern int mdrv_utopia2k_str_get_data(char *key, char *value);
62     int ret = mdrv_utopia2k_str_get_data(key, value);
63     if (ret < 0)
64     {
65         return UTOPIA_STATUS_FAIL;
66     }
67     else
68     {
69         return UTOPIA_STATUS_SUCCESS;
70     }
71 #else
72     return UTOPIA_STATUS_FAIL;
73 #endif
74 }
75