From patchwork Wed Sep 26 21:45:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 1511011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 972E9DF238 for ; Wed, 26 Sep 2012 21:47:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGzQ8-000427-Ha; Wed, 26 Sep 2012 21:45:28 +0000 Received: from mail-bk0-f49.google.com ([209.85.214.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGzQ3-00040W-5p for linux-arm-kernel@lists.infradead.org; Wed, 26 Sep 2012 21:45:24 +0000 Received: by bkwj4 with SMTP id j4so673833bkw.36 for ; Wed, 26 Sep 2012 14:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vWWNfsYnorNYESEJ3p9fLLktI1VbHn1QogBR9778R+A=; b=1Buyf+qgbAz7ELxLEGUalJDQXNQbwasfjTQGQlVtwz4lfWZ+apVTqZzgcbIaTUOPAz lCJD78mzHO0DycqRfwNG1IlseIxU4NZGpvG48S5Y5ABASVfa/86wauCQr9Og+Xy9Rjbh jw3NjqhPdspJyXAik/QFoh4BATbk3jlVwRCEhPt9DRqJK7s24viZr+p3bil+/tQWdu/n 585vsKMMvojQj9mueMusjP920hLRnDaKWrDrSmFfGRslgwPFTmQPrX+SDLkkrO0YZYQi pB0M9Q606nyBAAqZGuXTNz8hn1rTvmO0gFgatF5m9DtSttcBbSuEXxNQezD5weCnW7NJ GpLw== Received: by 10.204.129.211 with SMTP id p19mr1331147bks.94.1348695920929; Wed, 26 Sep 2012 14:45:20 -0700 (PDT) Received: from [192.168.1.110] (031011252076.warszawa.vectranet.pl. [31.11.252.76]) by mx.google.com with ESMTPS id n17sm3314410bks.6.2012.09.26.14.45.19 (version=SSLv3 cipher=OTHER); Wed, 26 Sep 2012 14:45:20 -0700 (PDT) Message-ID: <5063776D.4030609@gmail.com> Date: Wed, 26 Sep 2012 23:45:17 +0200 From: Sylwester Nawrocki User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: In-Bae Jeong Subject: Re: [PATCH] samsung: clock: Modify for the case with the only parent References: <1348123859-13842-1-git-send-email-kukyakya@gmail.com> In-Reply-To: <1348123859-13842-1-git-send-email-kukyakya@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sylvester.nawrocki[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 09/20/2012 08:50 AM, In-Bae Jeong wrote: > 'camera' clock has the only parent and thus has no reg_src. > It has a parent clock but it prints 'No parent clock specified' message. > This patch is to deal with the case with the only parent clock. Please make sure there is your Signed-off-by tag when submitting patches. I think we could avoid your changes as below, which would have added some additional overhead at the clock API and would have affected all Samsung SoCs. I think 'No parent clock specified' message really means what it says. AFAIU for cases where there is only one parent clock we need to define the parent statically. Then s3c_set_clksrc() should just return doing nothing, since the parent is already set. void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk, bool announce) { ... if (!clk->reg_src.reg) { if (!clk->clk.parent) printk(KERN_ERR "%s: no parent clock specified\n", clk->clk.name); return; } In our case clk->reg_src.reg == NULL, so when clk->clk.parent is set the printk() will be skipped and the mux control register (non-existent in our case) will not be touched. Could you try and see if the patch below helps in your case ? 8<----------------------------------------------------------------------- From c287280672565895b627c51ca8865cf43b37af28 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Wed, 26 Sep 2012 23:28:10 +0200 Subject: [PATCH] ARM: S3C64XX: Statically define parent clock of the "camera" clock The "camera" clock defined in arch/arm/mach-s3c64xx/clock.c has null clock source mux control register as it can have only one parent clock. In such cases there is a need to configure the parent clock statically, otherwise s3c_set_clksrc() bails out with an error message "no parent clock specified" leaving the parent clock not configured. Define statically the parent clock so it is possible to get or set rate of the "camera" clock. Reported-by: In-Bae Jeong Signed-off-by: Sylwester Nawrocki --- arch/arm/mach-s3c64xx/clock.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 28041e8..85b9cf1 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c @@ -744,6 +744,7 @@ static struct clksrc_clk clksrcs[] = { .name = "camera", .ctrlbit = S3C_CLKCON_SCLK_CAM, .enable = s3c64xx_sclk_ctrl, + .parent = &clk_h2, }, .reg_div = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4 }, .reg_src = { .reg = NULL, .shift = 0, .size = 0 },