From a85378d25d0a2e9a1fca2941604c50e39e7c66ee Mon Sep 17 00:00:00 2001 From: Bojun Pan Date: Fri, 27 Dec 2019 13:45:00 -0800 Subject: [PATCH] msm: ipa4: capture the unclock gsi IPA register access Add more protect on the unclock gsi IPA register access. In case this is a valid access, assert before disabling the IPA clock. Change-Id: If2cc5a9942a5e457bbd8badaabde78138f676176 Signed-off-by: Bojun Pan --- include/linux/msm_gsi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/msm_gsi.h b/include/linux/msm_gsi.h index 796e430f26d2..d38f1e55ea95 100644 --- a/include/linux/msm_gsi.h +++ b/include/linux/msm_gsi.h @@ -1383,6 +1383,16 @@ int gsi_read_channel_scratch(unsigned long chan_hdl, int gsi_read_wdi3_channel_scratch2_reg(unsigned long chan_hdl, union __packed gsi_wdi3_channel_scratch2_reg *val); +/* + * gsi_pending_irq_type - Peripheral should call this function to + * check if there is any pending irq + * + * This function can sleep + * + * @Return gsi_irq_type + */ +int gsi_pending_irq_type(void); + /** * gsi_update_mhi_channel_scratch - MHI Peripheral should call this * function to update the scratch area of the channel context. Updating @@ -1857,6 +1867,11 @@ static inline int gsi_read_channel_scratch(unsigned long chan_hdl, return -GSI_STATUS_UNSUPPORTED_OP; } +static inline int gsi_pending_irq_type(void) +{ + return -GSI_STATUS_UNSUPPORTED_OP; +} + static inline int gsi_update_mhi_channel_scratch(unsigned long chan_hdl, struct __packed gsi_mhi_channel_scratch mscr) {