Trilok Soni | 8ca296e | 2016-08-21 23:38:25 -0700 | [diff] [blame] | 1 | /* 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 | |
| 13 | static bool debug_init_done; |
| 14 | |
| 15 | #ifndef CONFIG_ESOC_MDM_DBG_ENG |
| 16 | |
| 17 | static inline bool dbg_check_cmd_mask(unsigned int cmd) |
| 18 | { |
| 19 | return false; |
| 20 | } |
| 21 | |
| 22 | static inline bool dbg_check_notify_mask(unsigned int notify) |
| 23 | { |
| 24 | return false; |
| 25 | } |
| 26 | |
Hanumant Singh | b35bbc6 | 2015-08-10 21:23:16 -0700 | [diff] [blame] | 27 | static inline int mdm_dbg_eng_init(struct esoc_drv *drv, |
| 28 | struct esoc_clink *clink) |
Trilok Soni | 8ca296e | 2016-08-21 23:38:25 -0700 | [diff] [blame] | 29 | { |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | #else |
| 34 | extern bool dbg_check_cmd_mask(unsigned int cmd); |
| 35 | extern bool dbg_check_notify_mask(unsigned int notify); |
Hanumant Singh | b35bbc6 | 2015-08-10 21:23:16 -0700 | [diff] [blame] | 36 | extern int mdm_dbg_eng_init(struct esoc_drv *drv, |
| 37 | struct esoc_clink *clink); |
Trilok Soni | 8ca296e | 2016-08-21 23:38:25 -0700 | [diff] [blame] | 38 | #endif |
| 39 | |
| 40 | static 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 | |
| 48 | static 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 | |