Loading drivers/soc/qcom/rpmh-internal.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ struct rsc_drv { int irq; }; extern bool rpmh_standalone; int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg); int rpmh_rsc_write_ctrl_data(struct rsc_drv *drv, const struct tcs_request *msg); Loading drivers/soc/qcom/rpmh-rsc.c +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ #define RSC_PDC_DRV_DATA 0x38 #define RSC_PDC_DATA_OFFSET 0x08 bool rpmh_standalone; static u32 read_tcs_reg(struct rsc_drv *drv, int reg, int tcs_id, int cmd_id) { return readl_relaxed(drv->tcs_base + reg + RSC_DRV_TCS_OFFSET * tcs_id + Loading Loading @@ -808,6 +810,8 @@ static int rpmh_rsc_probe(struct platform_device *pdev) return ret; } rpmh_standalone = (cmd_db_is_standalone() == 1); drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); if (!drv) return -ENOMEM; Loading drivers/soc/qcom/rpmh.c +18 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,9 @@ int rpmh_write_async(const struct device *dev, enum rpmh_state state, struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -319,6 +322,9 @@ int rpmh_write(const struct device *dev, enum rpmh_state state, if (!cmd || !n || n > MAX_RPMH_PAYLOAD) return -EINVAL; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -416,6 +422,9 @@ int rpmh_write_batch(const struct device *dev, enum rpmh_state state, if (!cmd || !n) return -EINVAL; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -496,6 +505,9 @@ int rpmh_write_pdc_data(const struct device *dev, if (!n || n > MAX_RPMH_PAYLOAD) return -EINVAL; if (rpmh_standalone) return 0; memcpy(rpm_msg.cmd, cmd, n * sizeof(*cmd)); rpm_msg.msg.num_cmds = n; rpm_msg.msg.wait_for_compl = false; Loading Loading @@ -544,6 +556,9 @@ int rpmh_flush(const struct device *dev) struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; if (!ctrlr->dirty) { pr_debug("Skipping flush, TCS has latest data.\n"); return 0; Loading Loading @@ -592,6 +607,9 @@ int rpmh_invalidate(const struct device *dev) struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; invalidate_batch(ctrlr); ctrlr->dirty = true; Loading Loading
drivers/soc/qcom/rpmh-internal.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ struct rsc_drv { int irq; }; extern bool rpmh_standalone; int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg); int rpmh_rsc_write_ctrl_data(struct rsc_drv *drv, const struct tcs_request *msg); Loading
drivers/soc/qcom/rpmh-rsc.c +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ #define RSC_PDC_DRV_DATA 0x38 #define RSC_PDC_DATA_OFFSET 0x08 bool rpmh_standalone; static u32 read_tcs_reg(struct rsc_drv *drv, int reg, int tcs_id, int cmd_id) { return readl_relaxed(drv->tcs_base + reg + RSC_DRV_TCS_OFFSET * tcs_id + Loading Loading @@ -808,6 +810,8 @@ static int rpmh_rsc_probe(struct platform_device *pdev) return ret; } rpmh_standalone = (cmd_db_is_standalone() == 1); drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); if (!drv) return -ENOMEM; Loading
drivers/soc/qcom/rpmh.c +18 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,9 @@ int rpmh_write_async(const struct device *dev, enum rpmh_state state, struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -319,6 +322,9 @@ int rpmh_write(const struct device *dev, enum rpmh_state state, if (!cmd || !n || n > MAX_RPMH_PAYLOAD) return -EINVAL; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -416,6 +422,9 @@ int rpmh_write_batch(const struct device *dev, enum rpmh_state state, if (!cmd || !n) return -EINVAL; if (rpmh_standalone) return 0; ret = check_ctrlr_state(ctrlr, state); if (ret) return ret; Loading Loading @@ -496,6 +505,9 @@ int rpmh_write_pdc_data(const struct device *dev, if (!n || n > MAX_RPMH_PAYLOAD) return -EINVAL; if (rpmh_standalone) return 0; memcpy(rpm_msg.cmd, cmd, n * sizeof(*cmd)); rpm_msg.msg.num_cmds = n; rpm_msg.msg.wait_for_compl = false; Loading Loading @@ -544,6 +556,9 @@ int rpmh_flush(const struct device *dev) struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; if (!ctrlr->dirty) { pr_debug("Skipping flush, TCS has latest data.\n"); return 0; Loading Loading @@ -592,6 +607,9 @@ int rpmh_invalidate(const struct device *dev) struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev); int ret; if (rpmh_standalone) return 0; invalidate_batch(ctrlr); ctrlr->dirty = true; Loading