From patchwork Tue Oct 20 09:22:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 7444891 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B09D4BFD59 for ; Tue, 20 Oct 2015 09:23:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2F872084D for ; Tue, 20 Oct 2015 09:23:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D40B52086A for ; Tue, 20 Oct 2015 09:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753482AbbJTJXa (ORCPT ); Tue, 20 Oct 2015 05:23:30 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:41102 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753086AbbJTJXX (ORCPT ); Tue, 20 Oct 2015 05:23:23 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWI00MDDI2XT300@mailout4.w1.samsung.com>; Tue, 20 Oct 2015 10:23:21 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-b4-562608080208 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 40.09.04846.80806265; Tue, 20 Oct 2015 10:23:20 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NWI005XRI2JNJ70@eusync3.samsung.com>; Tue, 20 Oct 2015 10:23:20 +0100 (BST) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Kyungmin Park , dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, Kukjin Kim , Krzysztof Kozlowski , Sylwester Nawrocki , Hyungwon Hwang Subject: [PATCH 03/10] drm/exynos/decon5433: add PCLK clock Date: Tue, 20 Oct 2015 11:22:34 +0200 Message-id: <1445332961-25419-4-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1445332961-25419-1-git-send-email-a.hajda@samsung.com> References: <1445332961-25419-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsVy+t/xq7ocHGphBpvO6FjcWneO1WLjjPWs FvOPAFlXvr5ns1g6o4/VYtL9CSwWr18YWvQ/fs1scbbpDbvFx557rBYzzu9jslh75C67xeE3 7awOvB6bVnWyedzvPs7k0bdlFaPH501yASxRXDYpqTmZZalF+nYJXBm9XRPZCrp5Klo/7WJv YPzL2cXIySEhYCKxfN0VdghbTOLCvfVsXYxcHEICSxkldu+6zArhNDFJ/Pu5iA2kik1AU+Lv 5ptgtoiAssSqfe3sIEXMAk+ZJebe3QCWEBawlrj0+gATiM0ioCox+dZ/MJtXwFlizfIfzBDr 5CROHpvMCmJzCrhIbJlwnRHEFgKqWX5iOeMERt4FjAyrGEVTS5MLipPScw31ihNzi0vz0vWS 83M3MUIC8csOxsXHrA4xCnAwKvHwasSohgmxJpYVV+YeYpTgYFYS4dVjUwsT4k1JrKxKLcqP LyrNSS0+xCjNwaIkzjt31/sQIYH0xJLU7NTUgtQimCwTB6dUAyMfh3/nFA13U/dzvak7IhfN +rmn8vrV6y+3Hg2pr+fsq79dpf9S9EGay70Xk2z73mQWNWiwHtmXP++hatJPoYuSDx17rgRq HamYx7LGafubROunh4LUT7aXRMxK/Ge2efGWST1KHD923qhU8At4GOp3MnWizr9jvGac4UIM keufZnZ537fV91RiKc5INNRiLipOBABwR3JFQAIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PCLK clock is used by DECON IP. The patch also replaces magic number with number of clocks in array definition. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 1ea26dbb..b25d764 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -27,13 +27,23 @@ #define CURSOR_WIN 2 #define MIN_FB_WIDTH_FOR_16WORD_BURST 128 +static const char * const decon_clks_name[] = { + "pclk", + "aclk_decon", + "aclk_smmu_decon0x", + "aclk_xiu_decon0x", + "pclk_smmu_decon0x", + "sclk_decon_vclk", + "sclk_decon_eclk", +}; + struct decon_context { struct device *dev; struct drm_device *drm_dev; struct exynos_drm_crtc *crtc; struct exynos_drm_plane planes[WINDOWS_NR]; void __iomem *addr; - struct clk *clks[6]; + struct clk *clks[ARRAY_SIZE(decon_clks_name)]; unsigned long irq_flags; int pipe; bool suspended; @@ -45,15 +55,6 @@ struct decon_context { atomic_t win_updated; }; -static const char * const decon_clks_name[] = { - "aclk_decon", - "aclk_smmu_decon0x", - "aclk_xiu_decon0x", - "pclk_smmu_decon0x", - "sclk_decon_vclk", - "sclk_decon_eclk", -}; - static const uint32_t decon_formats[] = { DRM_FORMAT_XRGB1555, DRM_FORMAT_RGB565,