remoteproc: qcom: Add support of mss rproc for msm8996.
Subsystems (5)
v5 cover remoteproc: qcom: Add support of mss rproc for msm8996.
This is patchset v5 having modifications as per comment on patchset v4. Major changes w.r.t. patchset v4 are as below.
1- Compatible string and private struct naming according to platform. 2- Separation of regulator and clock init.
3- Regulator Init implementation change.
4- Regulator and clock disable interface and implementation change. 5- Reorganization of reset sequence.
6- Other Minor comments related changes.
Avaneesh Kumar Dwivedi (7):
remoteproc: qcom: Add private resource struct and new compatible.
remoteproc: qcom: Add and initialize proxy and active clocks.
remoteproc: qcom: Add and initialize proxy and active regulators.
remoteproc: qcom: Modify regulator enable and disable interface.
remoteproc: qcom: Modify clock enable and disable interface.
remoteproc: qcom: Implement Hexagon core specific changes.
clk: qcom: Add GCC_MSS_RESET support
.../devicetree/bindings/remoteproc/qcom,q6v5.txt | 5 +- drivers/clk/qcom/gcc-msm8996.c | 1 + drivers/remoteproc/qcom_q6v5_pil.c | 562 ++++++++++++++++----- include/dt-bindings/clock/qcom,gcc-msm8996.h | 1 + 4 files changed, 452 insertions(+), 117 deletions(-)
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 1/7 remoteproc: qcom: Add private resource struct and new compatible.
Make provison for private resource specific to each compatible, so a private resource struct is introduced which will house clock, regulator etc. related info corresponding to each compatible to use later to initialize hardware. Also add new compatible in documentation.
--- .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 4 +++- drivers/remoteproc/qcom_q6v5_pil.c | 24 +++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt +3 -1
@@ -7,7 +7,9 @@ on the Qualcomm Hexagon core. Usage: required Value type: <string> Definition: must be one of: - "qcom,q6v5-pil" + "qcom,q6v5-pil" + "qcom,msm8916-mss-pil" + "qcom,msm8974-mss-pil" - reg: Usage: required
drivers/remoteproc/qcom_q6v5_pil.c +21 -3
@@ -30,13 +30,13 @@#include <linux/reset.h> #include <linux/soc/qcom/smem.h> #include <linux/soc/qcom/smem_state.h> +#include <linux/of_device.h> #include "remoteproc_internal.h" #include "qcom_mdt_loader.h" #include <linux/qcom_scm.h> -#define MBA_FIRMWARE_NAME "mba.b00"#define MPSS_FIRMWARE_NAME "modem.mdt"#define MPSS_CRASH_REASON_SMEM 421
@@ -93,6 +93,10 @@#define QDSS_BHS_ON BIT(21)#define QDSS_LDO_BYP BIT(22) +struct rproc_hexagon_res { +const char *hexagon_mba_image; +}; +struct q6v5 {struct device *dev;struct rproc *rproc;
@@ -805,12 +809,17 @@ static int q6v5_alloc_memory_region(struct q6v5 *qproc)static int q6v5_probe (struct platform_device *pdev) { +const struct rproc_hexagon_res *desc;struct q6v5 *qproc;struct rproc *rproc;int ret; + desc =of_device_get_match_data (&pdev->dev); +if (!desc) +return -EINVAL ; + rproc =rproc_alloc (&pdev->dev, pdev->name, &q6v5_ops, -MBA_FIRMWARE_NAME ,sizeof (*qproc)); + desc->hexagon_mba_image,sizeof (*qproc));if (!rproc) {dev_err (&pdev->dev,"failed to allocate rproc\n" );return -ENOMEM ;
@@ -890,8 +899,17 @@ static int q6v5_remove(struct platform_device *pdev)return 0 ; } +static const struct rproc_hexagon_res msm8916_mss = { + .hexagon_mba_image ="mba.mbn" , +}; + +static const struct rproc_hexagon_res msm8974_mss = { + .hexagon_mba_image ="mba.b00" , +};static const struct of_device_id q6v5_of_match[] = { - { .compatible ="qcom,q6v5-pil" , }, + { .compatible ="qcom,q6v5-pil" , .data = &msm8916_mss}, + { .compatible ="qcom,msm8916-mss-pil" , .data = &msm8916_mss}, + { .compatible ="qcom,msm8974-mss-pil" , .data = &msm8974_mss}, { }, };
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 2/7 remoteproc: qcom: Add and initialize proxy and active clocks.
In reply to Avaneesh Kumar DwivediCertain regulators and clocks need voting by rproc on behalf of hexagon only during restart operation but certain clocks and voltage need to be voted till hexagon is up, these regulators and clocks are identified as proxy and active resource respectively, whose handle is being obtained by supplying proxy and active clock name string.
--- drivers/remoteproc/qcom_q6v5_pil.c | 65 +++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 18 deletions(-)
drivers/remoteproc/qcom_q6v5_pil.c +47 -18
@@ -95,6 +95,8 @@struct rproc_hexagon_res {const char *hexagon_mba_image; +char **proxy_clk_string; +char **active_clk_string; };struct q6v5 {
@@ -114,6 +116,11 @@ struct q6v5 {struct qcom_smem_state *state;unsigned stop_bit; +struct clk *active_clks[8 ]; +struct clk *proxy_clks[4 ]; +int active_clk_count; +int proxy_clk_count; +struct regulator_bulk_data supply[4 ];struct clk *ahb_clk;
@@ -706,27 +713,33 @@ static int q6v5_init_mem(struct q6v5 *qproc, struct platform_device *pdev)return 0 ; } -static int q6v5_init_clocks (struct q6v5 *qproc) +static int q6v5_init_clocks (struct device *dev,struct clk **clks, +char **clk_str) { - qproc->ahb_clk =devm_clk_get (qproc->dev,"iface" ); -if (IS_ERR (qproc->ahb_clk)) { -dev_err (qproc->dev,"failed to get iface clock\n" ); -return PTR_ERR (qproc->ahb_clk); - } +int count =0 ; +int i; - qproc->axi_clk =devm_clk_get (qproc->dev,"bus" ); -if (IS_ERR (qproc->axi_clk)) { -dev_err (qproc->dev,"failed to get bus clock\n" ); -return PTR_ERR (qproc->axi_clk); - } +if (!clk_str) +return 0 ; + +while (clk_str[count]) + count++; + +for (i =0 ; i < count; i++) { + clks[i] =devm_clk_get (dev, clk_str[i]); +if (IS_ERR (clks[i])) { + +int rc =PTR_ERR (clks[i]); + +if (rc != -EPROBE_DEFER ) +dev_err (dev,"Failed to get %s clock\n" , + clk_str[i]); +return rc; + } - qproc->rom_clk =devm_clk_get (qproc->dev,"mem" ); -if (IS_ERR (qproc->rom_clk)) { -dev_err (qproc->dev,"failed to get mem clock\n" ); -return PTR_ERR (qproc->rom_clk); } -return 0 ; +return count; }static int q6v5_init_reset (struct q6v5 *qproc)
@@ -843,9 +856,21 @@ static int q6v5_probe(struct platform_device *pdev)if (ret) goto free_rproc; - ret =q6v5_init_clocks (qproc); -if (ret) + ret =q6v5_init_clocks (&pdev->dev, qproc->proxy_clks, + desc->proxy_clk_string); +if (ret <0 ) { +dev_err (&pdev->dev,"Failed to setup proxy clocks.\n" ); + goto free_rproc; + } + qproc->proxy_clk_count = ret; + + ret =q6v5_init_clocks (&pdev->dev, qproc->active_clks, + desc->active_clk_string); +if (ret <0 ) { +dev_err (&pdev->dev,"Failed to setup active clocks.\n" ); goto free_rproc; + } + qproc->active_clk_count = ret; ret =q6v5_regulator_init (qproc);if (ret)
@@ -901,10 +926,14 @@ static int q6v5_remove(struct platform_device *pdev)static const struct rproc_hexagon_res msm8916_mss = { .hexagon_mba_image ="mba.mbn" , + .proxy_clk_string = (char *[]){"xo" ,NULL }, + .active_clk_string = (char *[]){"iface" ,"bus" ,"mem" ,NULL }, };static const struct rproc_hexagon_res msm8974_mss = { .hexagon_mba_image ="mba.b00" , + .proxy_clk_string = (char *[]){"xo" ,NULL }, + .active_clk_string = (char *[]){"iface" ,"bus" ,"mem" ,NULL }, };static const struct of_device_id q6v5_of_match[] = { { .compatible ="qcom,q6v5-pil" , .data = &msm8916_mss},
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 3/7 remoteproc: qcom: Add and initialize proxy and active regulators.
In reply to Avaneesh Kumar DwivediCertain regulators and clocks need voting by rproc on behalf of hexagon only during restart operation but certain clocks and voltage need to be voted till hexagon is up, these regulators and clocks are identified as proxy and active resource respectively, whose handle is being obtained by supplying proxy and active regulator string name.
--- drivers/remoteproc/qcom_q6v5_pil.c | 118 +++++++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 18 deletions(-)
drivers/remoteproc/qcom_q6v5_pil.c +100 -18
@@ -93,8 +93,22 @@#define QDSS_BHS_ON BIT(21)#define QDSS_LDO_BYP BIT(22) +struct reg_info { +struct regulator *reg; +int uV; +int uA; +}; + +struct qcom_mss_reg_res { +const char *supply; +int uV; +int uA; +}; +struct rproc_hexagon_res {const char *hexagon_mba_image; +struct qcom_mss_reg_res proxy_supply[4 ]; +struct qcom_mss_reg_res active_supply[2 ];char **proxy_clk_string;char **active_clk_string; };
@@ -121,6 +135,11 @@ struct q6v5 {int active_clk_count;int proxy_clk_count; +struct reg_info active_regs[1 ]; +struct reg_info proxy_regs[3 ]; +int active_reg_count; +int proxy_reg_count; +struct regulator_bulk_data supply[4 ];struct clk *ahb_clk;
@@ -148,29 +167,34 @@ enum { Q6V5_SUPPLY_PLL, }; -static int q6v5_regulator_init (struct q6v5 *qproc) +static int q6v5_regulator_init (struct device *dev,struct reg_info *regs, +const struct qcom_mss_reg_res *reg_res) { -int ret; +int count =0 ; +int rc; +int i; - qproc->supply[Q6V5_SUPPLY_CX ].supply ="cx" ; - qproc->supply[Q6V5_SUPPLY_MX ].supply ="mx" ; - qproc->supply[Q6V5_SUPPLY_MSS ].supply ="mss" ; - qproc->supply[Q6V5_SUPPLY_PLL ].supply ="pll" ; +while (reg_res[count].supply) + count++; - ret =devm_regulator_bulk_get (qproc->dev, -ARRAY_SIZE (qproc->supply), qproc->supply); -if (ret <0 ) { -dev_err (qproc->dev,"failed to get supplies\n" ); -return ret; - } +for (i =0 ; i < count; i++) { + regs[i].reg =devm_regulator_get (dev, reg_res[i].supply); +if (IS_ERR (regs[i].reg)) { + rc =PTR_ERR (regs[i].reg); +if (rc != -EPROBE_DEFER ) +dev_err (dev,"Failed to get %s\n regulator" , + reg_res[i].supply); +return rc; + } -regulator_set_load (qproc->supply[Q6V5_SUPPLY_CX ].consumer,100000 ); -regulator_set_load (qproc->supply[Q6V5_SUPPLY_MSS ].consumer,100000 ); -regulator_set_load (qproc->supply[Q6V5_SUPPLY_PLL ].consumer,10000 ); + regs[i].uV = reg_res[i].uV; + regs[i].uA = reg_res[i].uA; + } -return 0 ; +return count; } +static int q6v5_regulator_enable (struct q6v5 *qproc) {struct regulator *mss = qproc->supply[Q6V5_SUPPLY_MSS ].consumer;
@@ -872,9 +896,21 @@ static int q6v5_probe(struct platform_device *pdev) } qproc->active_clk_count = ret; - ret =q6v5_regulator_init (qproc); -if (ret) + ret =q6v5_regulator_init (&pdev->dev, qproc->proxy_regs, + desc->proxy_supply); +if (ret <0 ) { +dev_err (&pdev->dev,"Failed to setup proxy regulators.\n" ); goto free_rproc; + } + qproc->proxy_reg_count = ret; + + ret =q6v5_regulator_init (&pdev->dev, qproc->active_regs, + desc->active_supply); +if (ret <0 ) { +dev_err (&pdev->dev,"Failed to setup active regulators.\n" ); + goto free_rproc; + } + qproc->active_reg_count = ret; ret =q6v5_init_reset (qproc);if (ret)
@@ -926,12 +962,58 @@ static int q6v5_remove(struct platform_device *pdev)static const struct rproc_hexagon_res msm8916_mss = { .hexagon_mba_image ="mba.mbn" , + .proxy_supply = (struct qcom_mss_reg_res []) { + { + .supply ="mx" , + .uV =1050000 , + }, + { + .supply ="cx" , + .uA =100000 , + }, + { + .supply ="pll" , + .uA =100000 , + }, + {NULL } + }, + .active_supply = (struct qcom_mss_reg_res []) { + { + .supply ="mss" , + .uV =1050000 , + .uA =100000 , + }, + {NULL } + }, .proxy_clk_string = (char *[]){"xo" ,NULL }, .active_clk_string = (char *[]){"iface" ,"bus" ,"mem" ,NULL }, };static const struct rproc_hexagon_res msm8974_mss = { .hexagon_mba_image ="mba.b00" , + .proxy_supply = (struct qcom_mss_reg_res []) { + { + .supply ="mx" , + .uV =1050000 , + }, + { + .supply ="cx" , + .uA =100000 , + }, + { + .supply ="pll" , + .uA =100000 , + }, + {NULL } + }, + .active_supply = (struct qcom_mss_reg_res []) { + { + .supply ="mss" , + .uV =1050000 , + .uA =100000 , + }, + {NULL } + }, .proxy_clk_string = (char *[]){"xo" ,NULL }, .active_clk_string = (char *[]){"iface" ,"bus" ,"mem" ,NULL }, };
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 4/7 remoteproc: qcom: Modify regulator enable and disable interface.
In reply to Avaneesh Kumar DwivediRegulator enable/disable routine will get additional input parameter of regulator info and count, It will read regulator info and will do appropriate voltage and load configuration before turning them up/down.
--- drivers/remoteproc/qcom_q6v5_pil.c | 100 ++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 30 deletions(-)
drivers/remoteproc/qcom_q6v5_pil.c +70 -30
@@ -140,7 +140,6 @@ struct q6v5 {int active_reg_count;int proxy_reg_count; -struct regulator_bulk_data supply[4 ];struct clk *ahb_clk;struct clk *axi_clk;
@@ -160,12 +159,6 @@ struct q6v5 {size_t mpss_size; }; -enum { -Q6V5_SUPPLY_CX , -Q6V5_SUPPLY_MX , -Q6V5_SUPPLY_MSS , -Q6V5_SUPPLY_PLL , -};static int q6v5_regulator_init (struct device *dev,struct reg_info *regs,const struct qcom_mss_reg_res *reg_res)
@@ -194,34 +187,69 @@ static int q6v5_regulator_init(struct device *dev, struct reg_info *regs,return count; } - -static int q6v5_regulator_enable (struct q6v5 *qproc) +static int q6v5_regulator_enable (struct q6v5 *qproc, +struct reg_info *regs,int count) { -struct regulator *mss = qproc->supply[Q6V5_SUPPLY_MSS ].consumer; -struct regulator *mx = qproc->supply[Q6V5_SUPPLY_MX ].consumer;int ret; +int i; -/* TODO: Q6V5_SUPPLY_CX is supposed to be set to super-turbo here */ +for (i =0 ; i < count; i++) { +if (regs[i].uV >0 ) { + ret =regulator_set_voltage (regs[i].reg, + regs[i].uV,INT_MAX ); +if (ret) { +dev_err (qproc->dev, +"Failed to request voltage for %d.\n" , + i); + goto err; + } + } - ret =regulator_set_voltage (mx,1050000 ,INT_MAX ); -if (ret) -return ret; +if (regs[i].uA >0 ) { + ret =regulator_set_load (regs[i].reg, + regs[i].uA); +if (ret <0 ) { +dev_err (qproc->dev,"Failed to set regulator mode\n" ); + goto err; + } + } + + ret =regulator_enable (regs[i].reg); +if (ret) { +dev_err (qproc->dev,"Regulator enable failed\n" ); + goto err; + } + } + +return 0 ; +err: +for (; i >=0 ; i--) { +if (regs[i].uV >0 ) +regulator_set_voltage (regs[i].reg,0 ,INT_MAX ); -regulator_set_voltage (mss,1000000 ,1150000 ); +if (regs[i].uA >0 ) +regulator_set_load (regs[i].reg,0 ); -return regulator_bulk_enable (ARRAY_SIZE (qproc->supply), qproc->supply); +regulator_disable (regs[i].reg); + } + +return ret; } -static void q6v5_regulator_disable (struct q6v5 *qproc) +static void q6v5_regulator_disable (struct q6v5 *qproc, +struct reg_info *regs,int count) { -struct regulator *mss = qproc->supply[Q6V5_SUPPLY_MSS ].consumer; -struct regulator *mx = qproc->supply[Q6V5_SUPPLY_MX ].consumer; +int i; -/* TODO: Q6V5_SUPPLY_CX corner votes should be released */ +for (i =0 ; i < count; i++) { +if (regs[i].uV >0 ) +regulator_set_voltage (regs[i].reg,0 ,INT_MAX ); + +if (regs[i].uA >0 ) +regulator_set_load (regs[i].reg,0 ); -regulator_bulk_disable (ARRAY_SIZE (qproc->supply), qproc->supply); -regulator_set_voltage (mx,0 ,INT_MAX ); -regulator_set_voltage (mss,0 ,1150000 ); +regulator_disable (regs[i].reg); + } }static int q6v5_load (struct rproc *rproc,const struct firmware *fw)
@@ -513,12 +541,19 @@ static int q6v5_start(struct rproc *rproc)struct q6v5 *qproc = (struct q6v5 *)rproc->priv;int ret; - ret =q6v5_regulator_enable (qproc); + ret =q6v5_regulator_enable (qproc, qproc->proxy_regs, + qproc->proxy_reg_count);if (ret) { -dev_err (qproc->dev,"failed to enable supplies\n" ); +dev_err (qproc->dev,"failed to enable proxy supplies\n" );return ret; } + ret =q6v5_regulator_enable (qproc, qproc->active_regs, + qproc->active_reg_count); +if (ret) { +dev_err (qproc->dev,"failed to enable supplies\n" ); + goto disable_proxy_reg; + } ret =reset_control_deassert (qproc->mss_restart);if (ret) {dev_err (qproc->dev,"failed to deassert mss restart\n" );
@@ -587,8 +622,11 @@ static int q6v5_start(struct rproc *rproc) assert_reset:reset_control_assert (qproc->mss_restart); disable_vdd: -q6v5_regulator_disable (qproc); - +q6v5_regulator_disable (qproc, qproc->active_regs, + qproc->active_reg_count); +disable_proxy_reg: +q6v5_regulator_disable (qproc, qproc->proxy_regs, + qproc->proxy_reg_count);return ret; }
@@ -617,8 +655,10 @@ static int q6v5_stop(struct rproc *rproc)clk_disable_unprepare (qproc->rom_clk);clk_disable_unprepare (qproc->axi_clk);clk_disable_unprepare (qproc->ahb_clk); -q6v5_regulator_disable (qproc); - +q6v5_regulator_disable (qproc, qproc->active_regs, + qproc->active_reg_count); +q6v5_regulator_disable (qproc, qproc->proxy_regs, + qproc->proxy_reg_count);return 0 ; }
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 5/7 remoteproc: qcom: Modify clock enable and disable interface.
In reply to Avaneesh Kumar DwivediClock enable/disable routine will get additional input parameter of pointer of array of clock struct's and clock count, it will use these pre initialized values to turn them up/down.
--- drivers/remoteproc/qcom_q6v5_pil.c | 85 ++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 27 deletions(-)
drivers/remoteproc/qcom_q6v5_pil.c +58 -27
@@ -140,11 +140,6 @@ struct q6v5 {int active_reg_count;int proxy_reg_count; - -struct clk *ahb_clk; -struct clk *axi_clk; -struct clk *rom_clk; -struct completion start_done;struct completion stop_done;bool running;
@@ -252,6 +247,38 @@ static void q6v5_regulator_disable(struct q6v5 *qproc, } } + +static int q6v5_clk_enable (struct device *dev, +struct clk **clks,int count) +{ +int rc; +int i; + +for (i =0 ; i < count; i++) { + rc =clk_prepare_enable (clks[i]); +if (rc) { +dev_err (dev,"Clock enable failed\n" ); + goto err; + } + } + +return 0 ; +err: +for (i--; i >=0 ; i--) +clk_disable_unprepare (clks[i]); + +return rc; +} + +static void q6v5_clk_disable (struct device *dev, +struct clk **clks,int count) +{ +int i; + +for (i =0 ; i < count; i++) +clk_disable_unprepare (clks[i]); +} +static int q6v5_load (struct rproc *rproc,const struct firmware *fw) {struct q6v5 *qproc = rproc->priv;
@@ -548,11 +575,18 @@ static int q6v5_start(struct rproc *rproc)return ret; } + ret =q6v5_clk_enable (qproc->dev, qproc->proxy_clks, + qproc->proxy_clk_count); +if (ret) { +dev_err (qproc->dev,"failed to enable proxy clocks\n" ); + goto disable_proxy_reg; + } + ret =q6v5_regulator_enable (qproc, qproc->active_regs, qproc->active_reg_count);if (ret) {dev_err (qproc->dev,"failed to enable supplies\n" ); - goto disable_proxy_reg; + goto disable_proxy_clk; } ret =reset_control_deassert (qproc->mss_restart);if (ret) {
@@ -560,17 +594,12 @@ static int q6v5_start(struct rproc *rproc) goto disable_vdd; } - ret =clk_prepare_enable (qproc->ahb_clk); -if (ret) + ret =q6v5_clk_enable (qproc->dev, qproc->active_clks, + qproc->active_clk_count); +if (ret) { +dev_err (qproc->dev,"failed to enable clocks\n" ); goto assert_reset; - - ret =clk_prepare_enable (qproc->axi_clk); -if (ret) - goto disable_ahb_clk; - - ret =clk_prepare_enable (qproc->rom_clk); -if (ret) - goto disable_axi_clk; + }writel (qproc->mba_phys, qproc->rmb_base +RMB_MBA_IMAGE_REG );
@@ -605,25 +634,26 @@ static int q6v5_start(struct rproc *rproc) qproc->running = true; -/* TODO: All done, release the handover resources */ - +q6v5_clk_disable (qproc->dev, qproc->proxy_clks, + qproc->proxy_clk_count); +q6v5_regulator_disable (qproc, qproc->proxy_regs, + qproc->proxy_reg_count);return 0 ; halt_axi_ports:q6v5proc_halt_axi_port (qproc, qproc->halt_map, qproc->halt_q6);q6v5proc_halt_axi_port (qproc, qproc->halt_map, qproc->halt_modem);q6v5proc_halt_axi_port (qproc, qproc->halt_map, qproc->halt_nc); - -clk_disable_unprepare (qproc->rom_clk); -disable_axi_clk: -clk_disable_unprepare (qproc->axi_clk); -disable_ahb_clk: -clk_disable_unprepare (qproc->ahb_clk); +q6v5_clk_disable (qproc->dev, qproc->active_clks, + qproc->active_clk_count); assert_reset:reset_control_assert (qproc->mss_restart); disable_vdd:q6v5_regulator_disable (qproc, qproc->active_regs, qproc->active_reg_count); +disable_proxy_clk: +q6v5_clk_disable (qproc->dev, qproc->proxy_clks, + qproc->proxy_clk_count); disable_proxy_reg:q6v5_regulator_disable (qproc, qproc->proxy_regs, qproc->proxy_reg_count);
@@ -652,9 +682,10 @@ static int q6v5_stop(struct rproc *rproc)q6v5proc_halt_axi_port (qproc, qproc->halt_map, qproc->halt_nc);reset_control_assert (qproc->mss_restart); -clk_disable_unprepare (qproc->rom_clk); -clk_disable_unprepare (qproc->axi_clk); -clk_disable_unprepare (qproc->ahb_clk); +q6v5_clk_disable (qproc->dev, qproc->active_clks, + qproc->active_clk_count); +q6v5_clk_disable (qproc->dev, qproc->proxy_clks, + qproc->proxy_clk_count);q6v5_regulator_disable (qproc, qproc->active_regs, qproc->active_reg_count); q6v5_regulator_disable(qproc, qproc->proxy_regs,
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 6/7 remoteproc: qcom: Implement Hexagon core specific changes.
In reply to Avaneesh Kumar DwivediThis change introduces appropriate additional steps in reset sequence and stop routine corresponding to hexagon v56 1.5.0 on mss for msm8996.
--- .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 1 + drivers/remoteproc/qcom_q6v5_pil.c | 180 ++++++++++++++++++--- 2 files changed, 156 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt +1 -0
@@ -10,6 +10,7 @@ on the Qualcomm Hexagon core. "qcom,q6v5-pil" "qcom,msm8916-mss-pil" "qcom,msm8974-mss-pil" + "qcom,msm8996-mss-pil" - reg: Usage: required
drivers/remoteproc/qcom_q6v5_pil.c +155 -25
269 lines not on this page · raw message
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 7/7 clk: qcom: Add GCC_MSS_RESET support
In reply to Avaneesh Kumar DwivediAdd support to use reset control framework for resetting MSS with hexagon v56 1.5.0.
--- drivers/clk/qcom/gcc-msm8996.c | 1 + include/dt-bindings/clock/qcom,gcc-msm8996.h | 1 + 2 files changed, 2 insertions(+)
drivers/clk/qcom/gcc-msm8996.c +1 -0
@@ -3423,6 +3423,7 @@ enum { [GCC_MSMPU_BCR] = { 0x8d000 }, [GCC_MSS_Q6_BCR] = { 0x8e000 }, [GCC_QREFS_VBG_CAL_BCR] = { 0x88020 }, + [GCC_MSS_RESTART] = { 0x8f008 }, };static const struct regmap_config gcc_msm8996_regmap_config = {
include/dt-bindings/clock/qcom,gcc-msm8996.h +1 -0
@@ -339,6 +339,7 @@#define GCC_PCIE_PHY_COM_NOCSR_BCR 102#define GCC_USB3_PHY_BCR 103#define GCC_USB3PHY_PHY_BCR 104 +#define GCC_MSS_RESTART 105/* Indexes for GDSCs */
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.