clk: msm: clock-osm: support MEM-ACC threshold voltage for Silver cluster
Add support for configuring the memory accelerator (MEM-ACC) threshold voltage for the Silver cluster. This threshold voltage is used to resolve the MEM-ACC crossover virtual corner number required by the OSM sequence to program MEM-ACC settings based on a voltage threshold. CRs-Fixed: 1113780 Change-Id: Iba58a23ae0d30429da629afa9d5f9cb34e025543 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
This commit is contained in:
parent
1f1d944084
commit
89ae37eba0
2 changed files with 23 additions and 3 deletions
|
@ -281,6 +281,16 @@ Properties:
|
||||||
performance mode with a total of 4 tuples corresponding
|
performance mode with a total of 4 tuples corresponding
|
||||||
to each supported performance mode.
|
to each supported performance mode.
|
||||||
|
|
||||||
|
- qcom,pwrcl-apcs-mem-acc-threshold-voltage
|
||||||
|
Usage: optional
|
||||||
|
Value type: <u32>
|
||||||
|
Definition: Specifies the highest MEM ACC threshold voltage in
|
||||||
|
microvolts for the Power cluster. This voltage is
|
||||||
|
used to determine which MEM ACC setting is used for the
|
||||||
|
highest frequencies. If specified, the voltage must match
|
||||||
|
the MEM ACC threshold voltage specified for the
|
||||||
|
corresponding CPRh device.
|
||||||
|
|
||||||
- qcom,perfcl-apcs-mem-acc-val
|
- qcom,perfcl-apcs-mem-acc-val
|
||||||
Usage: required if qcom,osm-no-tz is specified
|
Usage: required if qcom,osm-no-tz is specified
|
||||||
Value type: <prop-encoded-array>
|
Value type: <prop-encoded-array>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -83,6 +83,7 @@ enum clk_osm_trace_packet_id {
|
||||||
#define VERSION_REG 0x0
|
#define VERSION_REG 0x0
|
||||||
|
|
||||||
#define OSM_TABLE_SIZE 40
|
#define OSM_TABLE_SIZE 40
|
||||||
|
#define MAX_VIRTUAL_CORNER (OSM_TABLE_SIZE - 1)
|
||||||
#define MAX_CLUSTER_CNT 2
|
#define MAX_CLUSTER_CNT 2
|
||||||
#define CORE_COUNT_VAL(val) ((val & GENMASK(18, 16)) >> 16)
|
#define CORE_COUNT_VAL(val) ((val & GENMASK(18, 16)) >> 16)
|
||||||
#define SINGLE_CORE 1
|
#define SINGLE_CORE 1
|
||||||
|
@ -1662,6 +1663,14 @@ static int clk_osm_resolve_crossover_corners(struct clk_osm *c,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This assumes the OSM table uses corners
|
||||||
|
* 0 to MAX_VIRTUAL_CORNER - 1.
|
||||||
|
*/
|
||||||
|
if (!c->mem_acc_threshold_vc)
|
||||||
|
c->mem_acc_threshold_vc =
|
||||||
|
MAX_VIRTUAL_CORNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3232,9 +3241,10 @@ static int cpu_clock_osm_driver_probe(struct platform_device *pdev)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = clk_osm_resolve_crossover_corners(&pwrcl_clk, pdev, NULL);
|
rc = clk_osm_resolve_crossover_corners(&pwrcl_clk, pdev,
|
||||||
|
"qcom,pwrcl-apcs-mem-acc-threshold-voltage");
|
||||||
if (rc)
|
if (rc)
|
||||||
dev_info(&pdev->dev, "No APM crossover corner programmed\n");
|
dev_info(&pdev->dev, "No MEM-ACC crossover corner programmed\n");
|
||||||
|
|
||||||
rc = clk_osm_resolve_crossover_corners(&perfcl_clk, pdev,
|
rc = clk_osm_resolve_crossover_corners(&perfcl_clk, pdev,
|
||||||
"qcom,perfcl-apcs-mem-acc-threshold-voltage");
|
"qcom,perfcl-apcs-mem-acc-threshold-voltage");
|
||||||
|
|
Loading…
Add table
Reference in a new issue