The esoc driver was compiled statically on previous targets, this meant that no cleanup/module removal code was required. As the driver is now compiled as a module we need to have appropriate handling for error cases and module insertion and removal. This change adds the relevant callbacks and cleanup code for esoc. Change-Id: I3280d16616b0572e2319fccbc291b635cd1a745b Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
66 lines
1.2 KiB
C
66 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2015, 2018, 2020-2021, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
static bool debug_init_done;
|
|
|
|
#ifndef CONFIG_QCOM_ESOC_DBG_ENG
|
|
|
|
static inline bool dbg_check_cmd_mask(unsigned int cmd)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static inline bool dbg_check_notify_mask(unsigned int notify)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static inline int mdm_dbg_eng_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void mdm_dbg_eng_exit(void)
|
|
{
|
|
}
|
|
|
|
#else
|
|
extern bool dbg_check_cmd_mask(unsigned int cmd);
|
|
extern bool dbg_check_notify_mask(unsigned int notify);
|
|
extern int mdm_dbg_eng_init(void);
|
|
extern void mdm_dbg_eng_exit(void);
|
|
#endif
|
|
|
|
#ifndef CONFIG_QCOM_ESOC_DBG_REQ_ENG
|
|
static inline int register_dbg_req_eng(struct esoc_clink *clink)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void unregister_dbg_req_eng(struct esoc_clink *clink)
|
|
{
|
|
}
|
|
#else
|
|
extern int register_dbg_req_eng(struct esoc_clink *clink);
|
|
extern void unregister_dbg_req_eng(struct esoc_clink *clink);
|
|
#endif
|
|
|
|
static inline bool mdm_dbg_stall_cmd(unsigned int cmd)
|
|
{
|
|
if (debug_init_done)
|
|
return dbg_check_cmd_mask(cmd);
|
|
else
|
|
return false;
|
|
}
|
|
|
|
static inline bool mdm_dbg_stall_notify(unsigned int notify)
|
|
{
|
|
if (debug_init_done)
|
|
return dbg_check_notify_mask(notify);
|
|
else
|
|
return false;
|
|
}
|
|
|
|
|