diff options
author | Donghwa Lee <dh09.lee@samsung.com> | 2014-03-31 11:13:09 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:47:24 +0900 |
commit | a92f8f0b3d2a747f7b15e1c75806a8c720e7df2c (patch) | |
tree | 8cb199a4ec967722d6ed3c0a62216736a84f4899 /drivers | |
parent | 1a3326f3fd4f5642433b3e3620396ac3a8866aed (diff) | |
download | linux-3.10-a92f8f0b3d2a747f7b15e1c75806a8c720e7df2c.tar.gz linux-3.10-a92f8f0b3d2a747f7b15e1c75806a8c720e7df2c.tar.bz2 linux-3.10-a92f8f0b3d2a747f7b15e1c75806a8c720e7df2c.zip |
media: s5p-mfc: add to set clock rate
from: Seung-Woo Kim <sw0312.kim@samsung.com>
MFC needs 200MHz for sclk_mfc clock to work properly. The clock
rate setting was missed, so this patch adds it.
Change-Id: Ica696a5fda2babe81e885945fa5affd0b09ff5ba
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 9e238528141..657be1bc793 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -21,6 +21,8 @@ #include "s5p_mfc_pm.h" #define MFC_GATE_CLK_NAME "mfc" +#define MFC_CLK_NAME "sclk_mfc" +#define MFC_CLK_RATE (200 * 1000000) #define CLK_DEBUG @@ -50,6 +52,14 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) goto err_p_ip_clk; } + pm->clock = clk_get(&dev->plat_dev->dev, MFC_CLK_NAME); + if (IS_ERR(pm->clock)) { + mfc_err("Failed to get gating clock control\n"); + ret = PTR_ERR(pm->clock); + goto err_g_clk; + } + clk_set_rate(pm->clock, MFC_CLK_RATE); + atomic_set(&pm->power, 0); #ifdef CONFIG_PM_RUNTIME pm->device = &dev->plat_dev->dev; @@ -59,6 +69,8 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) atomic_set(&clk_ref, 0); #endif return 0; +err_g_clk: + clk_disable_unprepare(pm->clock_gate); err_p_ip_clk: clk_put(pm->clock_gate); err_g_ip_clk: @@ -67,6 +79,7 @@ err_g_ip_clk: void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) { + clk_put(pm->clock); clk_unprepare(pm->clock_gate); clk_put(pm->clock_gate); #ifdef CONFIG_PM_RUNTIME |