@@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/module.h>
+#include <linux/clk.h>
#include <mach/map.h>
@@ -79,6 +80,7 @@ struct busfreq_data {
struct regulator *vdd_mif; /* Exynos4412/4212 only */
struct busfreq_opp_info curr_oppinfo;
struct busfreq_ppmu_data ppmu_data;
+ struct clk *clk_ppmu[PPMU_END];
struct notifier_block pm_notifier;
struct mutex lock;
@@ -955,6 +957,28 @@ static int exynos4_busfreq_probe(struct platform_device *pdev)
}
}
+ data->clk_ppmu[PPMU_DMC0] = devm_clk_get(dev, "ppmudmc0");
+ if (IS_ERR(data->clk_ppmu[PPMU_DMC0])) {
+ dev_warn(dev, "Cannot get ppmudmc0 clock\n");
+ } else {
+ err = clk_prepare_enable(data->clk_ppmu[PPMU_DMC0]);
+ if (err) {
+ dev_err(dev, "Cannot enable ppmudmc0 clock\n");
+ return err;
+ }
+ }
+
+ data->clk_ppmu[PPMU_DMC1] = devm_clk_get(dev, "ppmudmc1");
+ if (IS_ERR(data->clk_ppmu[PPMU_DMC1])) {
+ dev_warn(dev, "Cannot get ppmudmc1 clock\n");
+ } else {
+ err = clk_prepare_enable(data->clk_ppmu[PPMU_DMC1]);
+ if (err) {
+ dev_err(dev, "Cannot enable ppmudmc0 clock\n");
+ return err;
+ }
+ }
+
rcu_read_lock();
opp = dev_pm_opp_find_freq_floor(dev,
&exynos4_devfreq_profile.initial_freq);
@@ -1001,6 +1025,10 @@ static int exynos4_busfreq_probe(struct platform_device *pdev)
static int exynos4_busfreq_remove(struct platform_device *pdev)
{
struct busfreq_data *data = platform_get_drvdata(pdev);
+ int i;
+
+ for (i = 0; i < PPMU_END; i++)
+ clk_disable_unprepare(data->clk_ppmu[i]);
/* Unregister all of notifier chain */
unregister_pm_notifier(&data->pm_notifier);