blob: ffba87c6f7bb5366798b6912e7a5489f49b2c563 [file] [log] [blame]
Trilok Soni8ca296e2016-08-21 23:38:25 -07001/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13static bool debug_init_done;
14
15#ifndef CONFIG_ESOC_MDM_DBG_ENG
16
17static inline bool dbg_check_cmd_mask(unsigned int cmd)
18{
19 return false;
20}
21
22static inline bool dbg_check_notify_mask(unsigned int notify)
23{
24 return false;
25}
26
Hanumant Singhb35bbc62015-08-10 21:23:16 -070027static inline int mdm_dbg_eng_init(struct esoc_drv *drv,
28 struct esoc_clink *clink)
Trilok Soni8ca296e2016-08-21 23:38:25 -070029{
30 return 0;
31}
32
33#else
34extern bool dbg_check_cmd_mask(unsigned int cmd);
35extern bool dbg_check_notify_mask(unsigned int notify);
Hanumant Singhb35bbc62015-08-10 21:23:16 -070036extern int mdm_dbg_eng_init(struct esoc_drv *drv,
37 struct esoc_clink *clink);
Trilok Soni8ca296e2016-08-21 23:38:25 -070038#endif
39
40static inline bool mdm_dbg_stall_cmd(unsigned int cmd)
41{
42 if (debug_init_done)
43 return dbg_check_cmd_mask(cmd);
44 else
45 return false;
46}
47
48static inline bool mdm_dbg_stall_notify(unsigned int notify)
49{
50 if (debug_init_done)
51 return dbg_check_notify_mask(notify);
52 else
53 return false;
54}
55
56