Loading Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ Optional properties: - qcom,edge: GLINK logical name of the remote subsystem - qcom,pil-force-shutdown: Boolean. If set, the SSR framework will not trigger graceful shutdown on behalf of the subsystem driver. - qcom,pil-mss-memsetup: Boolean - True if TZ need to be informed of modem start address and size. - qcom,pas-id: pas_id of the subsystem. - qcom,qdsp6v56-1-8: Boolean- Present if the qdsp version is v56 1.8 - qcom,qdsp6v56-1-8-inrush-current: Boolean- Present if the qdsp version is V56 1.8 and has in-rush current issue. Loading drivers/soc/qcom/pil-msa.c +42 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ #define MSS_RESTART_ID 0xA #define MSS_MAGIC 0XAABADEAD enum scm_cmd { PAS_MEM_SETUP_CMD = 2, }; static int pbl_mba_boot_timeout_ms = 1000; module_param(pbl_mba_boot_timeout_ms, int, S_IRUGO | S_IWUSR); Loading Loading @@ -395,6 +398,44 @@ void pil_mss_remove_proxy_votes(struct pil_desc *pil) regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); } static int pil_mss_mem_setup(struct pil_desc *pil, phys_addr_t addr, size_t size) { struct modem_data *md = dev_get_drvdata(pil->dev); struct pas_init_image_req { u32 proc; u32 start_addr; u32 len; } request; u32 scm_ret = 0; int ret; struct scm_desc desc = {0}; if (!md->subsys_desc.pil_mss_memsetup) return 0; request.proc = md->pas_id; request.start_addr = addr; request.len = size; if (!is_scm_armv8()) { ret = scm_call(SCM_SVC_PIL, PAS_MEM_SETUP_CMD, &request, sizeof(request), &scm_ret, sizeof(scm_ret)); } else { desc.args[0] = md->pas_id; desc.args[1] = addr; desc.args[2] = size; desc.arginfo = SCM_ARGS(3); ret = scm_call2(SCM_SIP_FNID(SCM_SVC_PIL, PAS_MEM_SETUP_CMD), &desc); scm_ret = desc.ret[0]; } if (ret) return ret; return scm_ret; } static int pil_mss_reset(struct pil_desc *pil) { struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); Loading Loading @@ -771,6 +812,7 @@ struct pil_reset_ops pil_msa_mss_ops_selfauth = { .init_image = pil_msa_mss_reset_mba_load_auth_mdt, .proxy_vote = pil_mss_make_proxy_votes, .proxy_unvote = pil_mss_remove_proxy_votes, .mem_setup = pil_mss_mem_setup, .verify_blob = pil_msa_mba_verify_blob, .auth_and_reset = pil_msa_mba_auth, .deinit_image = pil_mss_deinit_image, Loading drivers/soc/qcom/pil-msa.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -25,6 +25,7 @@ struct modem_data { struct subsys_desc subsys_desc; void *ramdump_dev; bool crash_shutdown; u32 pas_id; bool ignore_errors; struct completion stop_ack; void __iomem *rmb_base; Loading drivers/soc/qcom/pil-q6v5-mss.c +9 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -327,6 +327,14 @@ static int pil_mss_loadable_init(struct modem_data *drv, if (IS_ERR(q6->rom_clk)) return PTR_ERR(q6->rom_clk); ret = of_property_read_u32(pdev->dev.of_node, "qcom,pas-id", &drv->pas_id); if (ret) dev_warn(&pdev->dev, "Failed to find the pas_id.\n"); drv->subsys_desc.pil_mss_memsetup = of_property_read_bool(pdev->dev.of_node, "qcom,pil-mss-memsetup"); /* Optional. */ if (of_property_match_string(pdev->dev.of_node, "qcom,active-clock-names", "gpll0_mss_clk") >= 0) Loading include/soc/qcom/subsystem_restart.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -79,6 +79,7 @@ struct subsys_desc { int shutdown_ack_gpio; int ramdump_disable; bool no_auth; bool pil_mss_memsetup; int ssctl_instance_id; u32 sysmon_pid; int sysmon_shutdown_ret; Loading Loading
Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ Optional properties: - qcom,edge: GLINK logical name of the remote subsystem - qcom,pil-force-shutdown: Boolean. If set, the SSR framework will not trigger graceful shutdown on behalf of the subsystem driver. - qcom,pil-mss-memsetup: Boolean - True if TZ need to be informed of modem start address and size. - qcom,pas-id: pas_id of the subsystem. - qcom,qdsp6v56-1-8: Boolean- Present if the qdsp version is v56 1.8 - qcom,qdsp6v56-1-8-inrush-current: Boolean- Present if the qdsp version is V56 1.8 and has in-rush current issue. Loading
drivers/soc/qcom/pil-msa.c +42 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ #define MSS_RESTART_ID 0xA #define MSS_MAGIC 0XAABADEAD enum scm_cmd { PAS_MEM_SETUP_CMD = 2, }; static int pbl_mba_boot_timeout_ms = 1000; module_param(pbl_mba_boot_timeout_ms, int, S_IRUGO | S_IWUSR); Loading Loading @@ -395,6 +398,44 @@ void pil_mss_remove_proxy_votes(struct pil_desc *pil) regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); } static int pil_mss_mem_setup(struct pil_desc *pil, phys_addr_t addr, size_t size) { struct modem_data *md = dev_get_drvdata(pil->dev); struct pas_init_image_req { u32 proc; u32 start_addr; u32 len; } request; u32 scm_ret = 0; int ret; struct scm_desc desc = {0}; if (!md->subsys_desc.pil_mss_memsetup) return 0; request.proc = md->pas_id; request.start_addr = addr; request.len = size; if (!is_scm_armv8()) { ret = scm_call(SCM_SVC_PIL, PAS_MEM_SETUP_CMD, &request, sizeof(request), &scm_ret, sizeof(scm_ret)); } else { desc.args[0] = md->pas_id; desc.args[1] = addr; desc.args[2] = size; desc.arginfo = SCM_ARGS(3); ret = scm_call2(SCM_SIP_FNID(SCM_SVC_PIL, PAS_MEM_SETUP_CMD), &desc); scm_ret = desc.ret[0]; } if (ret) return ret; return scm_ret; } static int pil_mss_reset(struct pil_desc *pil) { struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); Loading Loading @@ -771,6 +812,7 @@ struct pil_reset_ops pil_msa_mss_ops_selfauth = { .init_image = pil_msa_mss_reset_mba_load_auth_mdt, .proxy_vote = pil_mss_make_proxy_votes, .proxy_unvote = pil_mss_remove_proxy_votes, .mem_setup = pil_mss_mem_setup, .verify_blob = pil_msa_mba_verify_blob, .auth_and_reset = pil_msa_mba_auth, .deinit_image = pil_mss_deinit_image, Loading
drivers/soc/qcom/pil-msa.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -25,6 +25,7 @@ struct modem_data { struct subsys_desc subsys_desc; void *ramdump_dev; bool crash_shutdown; u32 pas_id; bool ignore_errors; struct completion stop_ack; void __iomem *rmb_base; Loading
drivers/soc/qcom/pil-q6v5-mss.c +9 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -327,6 +327,14 @@ static int pil_mss_loadable_init(struct modem_data *drv, if (IS_ERR(q6->rom_clk)) return PTR_ERR(q6->rom_clk); ret = of_property_read_u32(pdev->dev.of_node, "qcom,pas-id", &drv->pas_id); if (ret) dev_warn(&pdev->dev, "Failed to find the pas_id.\n"); drv->subsys_desc.pil_mss_memsetup = of_property_read_bool(pdev->dev.of_node, "qcom,pil-mss-memsetup"); /* Optional. */ if (of_property_match_string(pdev->dev.of_node, "qcom,active-clock-names", "gpll0_mss_clk") >= 0) Loading
include/soc/qcom/subsystem_restart.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -79,6 +79,7 @@ struct subsys_desc { int shutdown_ack_gpio; int ramdump_disable; bool no_auth; bool pil_mss_memsetup; int ssctl_instance_id; u32 sysmon_pid; int sysmon_shutdown_ret; Loading