dev_freq: devfreq_spdm: make cci_clk optional indicator
Enable dev_freq SPDM support in order to increase BIMC vote based on bus rejection rate. Make cci_clk an optional property as it's not always a relevant indicator of cpu performance. CRs-Fixed: 1025515 Change-Id: I713cc396c8d563735981547e0dc18a63f6f15180 Signed-off-by: David Dai <daidavid1@codeaurora.org>
This commit is contained in:
parent
7da300d6a3
commit
47335704fb
3 changed files with 13 additions and 8 deletions
|
@ -6,9 +6,6 @@ hardware to measure the traffic status of configured master ports on the bus.
|
|||
|
||||
Required properties:
|
||||
-compatible: Must be "qcom,devfreq_spdm"
|
||||
-clock-names: Clocks used to measure current bus frequency.
|
||||
Expected names are "cci_clk"
|
||||
-clocks: References to named clocks
|
||||
-qcom,spdm-client: Client id of the port being monitored
|
||||
-qcom,bw-upstep: Initial up vote size in MB/s
|
||||
-qcom,bw-dwnstep: Initial down vote size in MB/s
|
||||
|
@ -31,6 +28,11 @@ Required properties:
|
|||
-qcom,up-step-multp: used to increase rate of growth on up votes
|
||||
-qcom,spdm-interval: down-vote polling interval
|
||||
|
||||
Optional properties:
|
||||
-clock-names: Clocks used to measure current bus frequency.
|
||||
Expected names are "cci_clk"
|
||||
-clocks: References to named clocks
|
||||
|
||||
Example:
|
||||
devfreq_spdm_cpu {
|
||||
compatible = "qcom,devfreq_spdm";
|
||||
|
|
|
@ -70,7 +70,12 @@ static int change_bw(struct device *dev, unsigned long *freq, u32 flags)
|
|||
update_thresholds:
|
||||
desc.arg[0] = SPDM_CMD_ENABLE;
|
||||
desc.arg[1] = data->spdm_client;
|
||||
desc.arg[2] = (clk_get_rate(data->cci_clk)) / 1000;
|
||||
|
||||
if (data->cci_clk)
|
||||
desc.arg[2] = (clk_get_rate(data->cci_clk)) / 1000;
|
||||
else
|
||||
desc.arg[2] = 0;
|
||||
|
||||
ext_status = spdm_ext_call(&desc, 3);
|
||||
if (ext_status)
|
||||
pr_err("External command %u failed with error %u",
|
||||
|
@ -339,8 +344,7 @@ static int probe(struct platform_device *pdev)
|
|||
|
||||
data->cci_clk = clk_get(&pdev->dev, "cci_clk");
|
||||
if (IS_ERR(data->cci_clk)) {
|
||||
ret = PTR_ERR(data->cci_clk);
|
||||
goto no_clock;
|
||||
data->cci_clk = NULL;
|
||||
}
|
||||
|
||||
data->profile =
|
||||
|
@ -376,7 +380,6 @@ static int probe(struct platform_device *pdev)
|
|||
no_spdm_device:
|
||||
devm_kfree(&pdev->dev, data->profile);
|
||||
no_profile:
|
||||
no_clock:
|
||||
msm_bus_scale_unregister_client(data->bus_scale_client_id);
|
||||
no_bus_scaling:
|
||||
devm_kfree(&pdev->dev, data->config_data.ports);
|
||||
|
|
|
@ -361,7 +361,7 @@ static int probe(struct platform_device *pdev)
|
|||
|
||||
*irq = platform_get_irq_byname(pdev, "spdm-irq");
|
||||
ret = request_threaded_irq(*irq, isr, threaded_isr,
|
||||
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
|
||||
IRQF_ONESHOT,
|
||||
spdm_hyp_gov.name, pdev);
|
||||
if (ret)
|
||||
goto no_irq;
|
||||
|
|
Loading…
Add table
Reference in a new issue