Loading drivers/platform/msm/gsi/gsi.c +23 −0 Original line number Diff line number Diff line Loading @@ -1012,6 +1012,29 @@ int gsi_unmap_base(void) } EXPORT_SYMBOL(gsi_unmap_base); int gsi_is_mcs_enabled(void) { uint32_t mcs_enable = 0; if (!gsi_ctx) { pr_err("%s:%d gsi context not allocated\n", __func__, __LINE__); return GSI_STATUS_NODEV; } if (!gsi_ctx->base) { GSIERR("GSI base is not mapped\n"); return -GSI_STATUS_NODEV; } mcs_enable = gsi_readl(gsi_ctx->base + GSI_GSI_MCS_CFG_OFFS); pr_info("%s:%d MCS enabled:%x\n", __func__, __LINE__, mcs_enable); return (mcs_enable & GSI_GSI_MCS_CFG_MCS_ENABLE_BMSK); } EXPORT_SYMBOL(gsi_is_mcs_enabled); int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl) { int res; Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +1 −1 Original line number Diff line number Diff line Loading @@ -8415,7 +8415,7 @@ int ipa3_plat_drv_probe(struct platform_device *pdev_p, cb->dev = dev; smmu_info.present[IPA_SMMU_CB_UC] = true; if (ipa3_ctx->use_xbl_boot) { if (ipa3_ctx->use_xbl_boot && (gsi_is_mcs_enabled() == 1)) { /* Ensure uC probe is the last. */ if (!smmu_info.present[IPA_SMMU_CB_AP] || !smmu_info.present[IPA_SMMU_CB_WLAN]) { Loading include/linux/msm_gsi.h +14 −0 Original line number Diff line number Diff line Loading @@ -1168,6 +1168,15 @@ struct gsi_chan_info { */ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl); /** * gsi_is_mcs_enabled - Peripheral should call this function to * check if MCS is already loaded. * * @Return -GSI_STATUS_NODEV if node is already created. * other error codes for failure */ int gsi_is_mcs_enabled(void); /** * gsi_complete_clk_grant - Peripheral should call this function to * grant the clock resource requested by GSI previously that could not Loading Loading @@ -1822,6 +1831,11 @@ static inline int gsi_register_device(struct gsi_per_props *props, return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_is_mcs_enabled(void) { return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_complete_clk_grant(unsigned long dev_hdl) { return -GSI_STATUS_UNSUPPORTED_OP; Loading Loading
drivers/platform/msm/gsi/gsi.c +23 −0 Original line number Diff line number Diff line Loading @@ -1012,6 +1012,29 @@ int gsi_unmap_base(void) } EXPORT_SYMBOL(gsi_unmap_base); int gsi_is_mcs_enabled(void) { uint32_t mcs_enable = 0; if (!gsi_ctx) { pr_err("%s:%d gsi context not allocated\n", __func__, __LINE__); return GSI_STATUS_NODEV; } if (!gsi_ctx->base) { GSIERR("GSI base is not mapped\n"); return -GSI_STATUS_NODEV; } mcs_enable = gsi_readl(gsi_ctx->base + GSI_GSI_MCS_CFG_OFFS); pr_info("%s:%d MCS enabled:%x\n", __func__, __LINE__, mcs_enable); return (mcs_enable & GSI_GSI_MCS_CFG_MCS_ENABLE_BMSK); } EXPORT_SYMBOL(gsi_is_mcs_enabled); int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl) { int res; Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +1 −1 Original line number Diff line number Diff line Loading @@ -8415,7 +8415,7 @@ int ipa3_plat_drv_probe(struct platform_device *pdev_p, cb->dev = dev; smmu_info.present[IPA_SMMU_CB_UC] = true; if (ipa3_ctx->use_xbl_boot) { if (ipa3_ctx->use_xbl_boot && (gsi_is_mcs_enabled() == 1)) { /* Ensure uC probe is the last. */ if (!smmu_info.present[IPA_SMMU_CB_AP] || !smmu_info.present[IPA_SMMU_CB_WLAN]) { Loading
include/linux/msm_gsi.h +14 −0 Original line number Diff line number Diff line Loading @@ -1168,6 +1168,15 @@ struct gsi_chan_info { */ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl); /** * gsi_is_mcs_enabled - Peripheral should call this function to * check if MCS is already loaded. * * @Return -GSI_STATUS_NODEV if node is already created. * other error codes for failure */ int gsi_is_mcs_enabled(void); /** * gsi_complete_clk_grant - Peripheral should call this function to * grant the clock resource requested by GSI previously that could not Loading Loading @@ -1822,6 +1831,11 @@ static inline int gsi_register_device(struct gsi_per_props *props, return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_is_mcs_enabled(void) { return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_complete_clk_grant(unsigned long dev_hdl) { return -GSI_STATUS_UNSUPPORTED_OP; Loading