From patchwork Mon May 27 07:39:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar K X-Patchwork-Id: 2617741 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3E1D4DF215 for ; Mon, 27 May 2013 07:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756653Ab3E0HPN (ORCPT ); Mon, 27 May 2013 03:15:13 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:10190 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753852Ab3E0HPM (ORCPT ); Mon, 27 May 2013 03:15:12 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNG002JI455BW70@mailout4.samsung.com> for linux-media@vger.kernel.org; Mon, 27 May 2013 16:15:10 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.126]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 79.A1.03969.EF703A15; Mon, 27 May 2013 16:15:10 +0900 (KST) X-AuditID: cbfee68f-b7f436d000000f81-3f-51a307fe8437 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D8.68.21068.DF703A15; Mon, 27 May 2013 16:15:10 +0900 (KST) Received: from chromeserver-PowerEdge-T410.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNG00BPS456KVZ0@mmp1.samsung.com>; Mon, 27 May 2013 16:15:09 +0900 (KST) From: Arun Kumar K To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, jtp.park@samsung.com, s.nawrocki@samsung.com, arunkk.samsung@gmail.com Subject: [PATCH] [media] s5p-mfc: Remove special clock usage in driver Date: Mon, 27 May 2013 13:09:29 +0530 Message-id: <1369640369-19785-1-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.10.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsWyRsSkTvcf++JAg/ktfBYvNt5itziy9iqT xY/XF9gsejZsZbU4/Kad1YHVY+esu+wefVtWMXp83iQXwBzFZZOSmpNZllqkb5fAlXHr0g/W gusSFat2JDYwXhLpYuTkkBAwkbg4dRMLhC0mceHeerYuRi4OIYGljBJ/9zcxwxRt3r2IHSKx iFFi5e/TzBDObCaJE0vfM4FUsQloSNw78ZgVxBYRkJd40nuDDcRmFkiSaOubxw5iCwu4Sfxs nw5WzyKgKrFs7lOg1RwcvALOEr++SEAsU5TofjYB7AoJgcdsEmcuNzNC1AtIfJt8CKxeQkBW YtMBqOMkJQ6uuMEygVFwASPDKkbR1ILkguKk9CJjveLE3OLSvHS95PzcTYzAYDz971n/Dsa7 B6wPMSYDjZvILCWanA8M5rySeENjMyMLUxNTYyNzSzPShJXEedVarAOFBNITS1KzU1MLUovi i0pzUosPMTJxcEo1MCpx79+8WOBX2ONHy/iyDxVpNbbs1X7Yo71v8/wew80/6pY1HtSfei+R +4P6xsg8r6cZM4/ulWdT2jn5qYILG7fU+xkXL3+x/F0uFvnyz0Oz3Gl3xDiYr0WqlH/2LbAx vOukIfxE6djXf/W58xr/mjxy2Pfw4f4SIcPembvPL28SvrFoT+4VpgIlluKMREMt5qLiRADn jOzDXAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsVy+t9jAd1/7IsDDS53slu82HiL3eLI2qtM Fj9eX2Cz6NmwldXi8Jt2VgdWj52z7rJ79G1ZxejxeZNcAHNUA6NNRmpiSmqRQmpecn5KZl66 rZJ3cLxzvKmZgaGuoaWFuZJCXmJuqq2Si0+ArltmDtBOJYWyxJxSoFBAYnGxkr4dpgmhIW66 FjCNEbq+IUFwPUYGaCBhDWPGrUs/WAuuS1Ss2pHYwHhJpIuRk0NCwERi8+5F7BC2mMSFe+vZ uhi5OIQEFjFKrPx9mhnCmc0kcWLpeyaQKjYBDYl7Jx6zgtgiAvIST3pvsIHYzAJJEm1988Am CQu4Sfxsnw5WzyKgKrFs7lOWLkYODl4BZ4lfXyQglilKdD+bwDaBkXsBI8MqRtHUguSC4qT0 XCO94sTc4tK8dL3k/NxNjOBQfya9g3FVg8UhRgEORiUe3gUzFgUKsSaWFVfmHmKU4GBWEuFN iAYK8aYkVlalFuXHF5XmpBYfYkwGWj6RWUo0OR8Yh3kl8YbGJuamxqaWJhYmZpakCSuJ8x5s tQ4UEkhPLEnNTk0tSC2C2cLEwSnVwCi2rnpv2Q6GjkURhy4Iz3L5ciak7Mo//tgr+4senbos mKw678aWneK8vizlnLIXNO9aOtjKbS6zexrz3z03UIhZtcLcns0qviZ88lyXa3UOi7Q4Jh5S y71f6xy0KEPtVf5LjuC7iySNlv4yumHincgyY4mtcpH0o1Pl8zQWnT0TY6BwuNLATomlOCPR UIu5qDgRAIeU43+5AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org MFC uses two clocks - MFC gate clock and special clock which is named as "sclk_mfc" in exynos4 and "aclk_333" in exynos5 SoC. The driver was doing just a clk_prepare on this special clock without a clk_enable call. As this sclk is the parent of gate clock, it gets prepared and enabled along with the gate clock. So there is no need for the driver to use this sclk. This patch removes the sclk usage from driver. Signed-off-by: Arun Kumar K --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 -- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 1 - drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 19 ------------------- 3 files changed, 22 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 01f9ae0..5635eff 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1362,7 +1362,6 @@ static struct s5p_mfc_variant mfc_drvdata_v5 = { .port_num = MFC_NUM_PORTS, .buf_size = &buf_size_v5, .buf_align = &mfc_buf_align_v5, - .mclk_name = "sclk_mfc", .fw_name = "s5p-mfc.fw", }; @@ -1389,7 +1388,6 @@ static struct s5p_mfc_variant mfc_drvdata_v6 = { .port_num = MFC_NUM_PORTS_V6, .buf_size = &buf_size_v6, .buf_align = &mfc_buf_align_v6, - .mclk_name = "aclk_333", .fw_name = "s5p-mfc-v6.fw", }; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 202d1d7..4a08c1a 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -231,7 +231,6 @@ struct s5p_mfc_variant { unsigned int port_num; struct s5p_mfc_buf_size *buf_size; struct s5p_mfc_buf_align *buf_align; - char *mclk_name; char *fw_name; }; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 6aa38a5..cab6e0b 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -50,19 +50,6 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) goto err_p_ip_clk; } - pm->clock = clk_get(&dev->plat_dev->dev, dev->variant->mclk_name); - if (IS_ERR(pm->clock)) { - mfc_err("Failed to get MFC clock\n"); - ret = PTR_ERR(pm->clock); - goto err_g_ip_clk_2; - } - - ret = clk_prepare(pm->clock); - if (ret) { - mfc_err("Failed to prepare MFC clock\n"); - goto err_p_ip_clk_2; - } - atomic_set(&pm->power, 0); #ifdef CONFIG_PM_RUNTIME pm->device = &dev->plat_dev->dev; @@ -72,10 +59,6 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) atomic_set(&clk_ref, 0); #endif return 0; -err_p_ip_clk_2: - clk_put(pm->clock); -err_g_ip_clk_2: - clk_unprepare(pm->clock_gate); err_p_ip_clk: clk_put(pm->clock_gate); err_g_ip_clk: @@ -86,8 +69,6 @@ void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) { clk_unprepare(pm->clock_gate); clk_put(pm->clock_gate); - clk_unprepare(pm->clock); - clk_put(pm->clock); #ifdef CONFIG_PM_RUNTIME pm_runtime_disable(pm->device); #endif