mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-10 08:18:17 +07:00
Merge branch 'pm-devfreq' into pm-for-linus
* pm-devfreq: PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412. PM / devfreq: separate error paths from successful path
This commit is contained in:
commit
8d274ab7d3
@ -65,4 +65,17 @@ config DEVFREQ_GOV_USERSPACE
|
|||||||
|
|
||||||
comment "DEVFREQ Drivers"
|
comment "DEVFREQ Drivers"
|
||||||
|
|
||||||
|
config ARM_EXYNOS4_BUS_DEVFREQ
|
||||||
|
bool "ARM Exynos4210/4212/4412 Memory Bus DEVFREQ Driver"
|
||||||
|
depends on CPU_EXYNOS4210 || CPU_EXYNOS4212 || CPU_EXYNOS4412
|
||||||
|
select ARCH_HAS_OPP
|
||||||
|
select DEVFREQ_GOV_SIMPLE_ONDEMAND
|
||||||
|
help
|
||||||
|
This adds the DEVFREQ driver for Exynos4210 memory bus (vdd_int)
|
||||||
|
and Exynos4212/4412 memory interface and bus (vdd_mif + vdd_int).
|
||||||
|
It reads PPMU counters of memory controllers and adjusts
|
||||||
|
the operating frequencies and voltages with OPP support.
|
||||||
|
To operate with optimal voltages, ASV support is required
|
||||||
|
(CONFIG_EXYNOS_ASV).
|
||||||
|
|
||||||
endif # PM_DEVFREQ
|
endif # PM_DEVFREQ
|
||||||
|
@ -3,3 +3,6 @@ obj-$(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) += governor_simpleondemand.o
|
|||||||
obj-$(CONFIG_DEVFREQ_GOV_PERFORMANCE) += governor_performance.o
|
obj-$(CONFIG_DEVFREQ_GOV_PERFORMANCE) += governor_performance.o
|
||||||
obj-$(CONFIG_DEVFREQ_GOV_POWERSAVE) += governor_powersave.o
|
obj-$(CONFIG_DEVFREQ_GOV_POWERSAVE) += governor_powersave.o
|
||||||
obj-$(CONFIG_DEVFREQ_GOV_USERSPACE) += governor_userspace.o
|
obj-$(CONFIG_DEVFREQ_GOV_USERSPACE) += governor_userspace.o
|
||||||
|
|
||||||
|
# DEVFREQ Drivers
|
||||||
|
obj-$(CONFIG_ARM_EXYNOS4_BUS_DEVFREQ) += exynos4_bus.o
|
||||||
|
@ -347,7 +347,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
|||||||
if (!IS_ERR(devfreq)) {
|
if (!IS_ERR(devfreq)) {
|
||||||
dev_err(dev, "%s: Unable to create devfreq for the device. It already has one.\n", __func__);
|
dev_err(dev, "%s: Unable to create devfreq for the device. It already has one.\n", __func__);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
|||||||
dev_err(dev, "%s: Unable to create devfreq for the device\n",
|
dev_err(dev, "%s: Unable to create devfreq for the device\n",
|
||||||
__func__);
|
__func__);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_init(&devfreq->lock);
|
mutex_init(&devfreq->lock);
|
||||||
@ -399,17 +399,16 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
|||||||
devfreq->next_polling);
|
devfreq->next_polling);
|
||||||
}
|
}
|
||||||
mutex_unlock(&devfreq_list_lock);
|
mutex_unlock(&devfreq_list_lock);
|
||||||
goto out;
|
out:
|
||||||
|
return devfreq;
|
||||||
|
|
||||||
err_init:
|
err_init:
|
||||||
device_unregister(&devfreq->dev);
|
device_unregister(&devfreq->dev);
|
||||||
err_dev:
|
err_dev:
|
||||||
mutex_unlock(&devfreq->lock);
|
mutex_unlock(&devfreq->lock);
|
||||||
kfree(devfreq);
|
kfree(devfreq);
|
||||||
out:
|
err_out:
|
||||||
if (err)
|
return ERR_PTR(err);
|
||||||
return ERR_PTR(err);
|
|
||||||
else
|
|
||||||
return devfreq;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
1135
drivers/devfreq/exynos4_bus.c
Normal file
1135
drivers/devfreq/exynos4_bus.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user