aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonela Voinescu <ionela.voinescu@arm.com>2017-08-15 14:29:57 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2017-11-01 11:37:11 +0000
commitd5291a3c7964bc4397f45d983604a90d78af10d5 (patch)
tree8a279ffa4b69a4b556ba7ae3a81be8e73b0c6bf9
parent635b7a95db2270807cd0ba662e9c864920deb9c8 (diff)
Revision 1 of the DSU supports power off of the full cache. Therefore the minimum number of portions supported becomes 0. This is also the default behaviour for any variant different from R0. Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
-rw-r--r--drivers/devfreq/dsu-pctrl-devfreq.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/devfreq/dsu-pctrl-devfreq.c b/drivers/devfreq/dsu-pctrl-devfreq.c
index 46e455514ced..07f9866ec854 100644
--- a/drivers/devfreq/dsu-pctrl-devfreq.c
+++ b/drivers/devfreq/dsu-pctrl-devfreq.c
@@ -164,6 +164,7 @@ do { \
enum arm_dsu_version {
ARM_DSU_R0 = 0,
+ ARM_DSU_R1,
ARM_DSU_END
};
@@ -219,6 +220,7 @@ static atomic_t dsu_pctrl_device_id = ATOMIC_INIT(0);
static const struct dsu_pctrl_data device_data[] = {
{.dsu_version = ARM_DSU_R0, .portion_min = 1, .portion_max = 2},
+ {.dsu_version = ARM_DSU_R1, .portion_min = 0, .portion_max = 2},
};
static const struct of_device_id dsu_pctrl_devfreq_id[] = {
@@ -647,13 +649,13 @@ static int dsu_pctrl_setup(struct platform_device *pdev)
variant &= CLUSTERIDR_VARIANT_MASK;
variant = variant >> CLUSTERIDR_VARIANT_BASE;
- /* Set implementation specific min and max limits */
- if (variant < ARM_DSU_END) {
- dsu->dsu_data = (struct dsu_pctrl_data *)&device_data[variant];
- } else {
- dev_err(&pdev->dev, "Invalid hardware variant found.\n");
- return -EINVAL;
- }
+ /*
+ * Set implementation specific min and max limits:
+ * Variant R0 will match behaviour for ARM_DSU_R0
+ * All other variants will match behaviour for ARM_DSU_R1
+ */
+ variant = !!variant;
+ dsu->dsu_data = (struct dsu_pctrl_data *)&device_data[variant];
dsu->update_wq = create_workqueue("arm_dsu_pctrl_wq");
if (IS_ERR(dsu->update_wq)) {