From patchwork Fri May 23 10:31:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30753 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 779D72066E for ; Fri, 23 May 2014 10:45:35 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id z6sf18139846yhz.5 for ; Fri, 23 May 2014 03:45:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=owDij7N2iibrJzlrIxo1hbyr8HYUGIx/Ysz0oXWwf34=; b=TruhUthvdPIUqgQ2nLACtX4TPLDLsfJo8589ybwmKG0UiDHZQp4Mrg2UoILWuKap55 mcl0Otj/1lYMxBcn0HbZNE0pENFKHW1VaNNeBmmMSK1Sd0//tYirQDlO/LlHpyLC8fQF jP30AwDmW0oq1mcR/AqXncrasMfoVjCvXBz5B0YoYAPJQ+NoWFdZH/t1lcr1/D7Nj/kp IDig+lgvfvO6mbZ+NRHKcGA3WGzV/SNp0vtmCIUkQ7iB/GGAusqS3bCF9ThsO3vOCRqY b7GcKnUzVWlEbxupBmh9TZ+A4QZVyhmfXe5CSxWoJfmTZtgExPd6kN83FVtqOvHhSb1U lP1g== X-Gm-Message-State: ALoCoQlNZrFBexc3e8dSHifhLXlWd1JGJmFjeP8P2lvKXIMA1K2qGDAk81s+GcHRL7YtdwPUFpqG X-Received: by 10.58.187.107 with SMTP id fr11mr1895011vec.34.1400841935282; Fri, 23 May 2014 03:45:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.5 with SMTP id s5ls1698420qgd.75.gmail; Fri, 23 May 2014 03:45:35 -0700 (PDT) X-Received: by 10.220.133.197 with SMTP id g5mr3475999vct.20.1400841935202; Fri, 23 May 2014 03:45:35 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id ru1si1403421vdb.3.2014.05.23.03.45.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz11so6018704veb.17 for ; Fri, 23 May 2014 03:45:35 -0700 (PDT) X-Received: by 10.58.196.231 with SMTP id ip7mr6344vec.47.1400841935107; Fri, 23 May 2014 03:45:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp20588vcb; Fri, 23 May 2014 03:45:34 -0700 (PDT) X-Received: by 10.66.136.103 with SMTP id pz7mr4817124pab.140.1400841934404; Fri, 23 May 2014 03:45:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ek4si3345979pbc.5.2014.05.23.03.45.33 for ; Fri, 23 May 2014 03:45:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753695AbaEWKpX (ORCPT + 27 others); Fri, 23 May 2014 06:45:23 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:33677 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbaEWKcS (ORCPT ); Fri, 23 May 2014 06:32:18 -0400 Received: by mail-we0-f170.google.com with SMTP id u57so4789648wes.15 for ; Fri, 23 May 2014 03:32:16 -0700 (PDT) X-Received: by 10.194.82.70 with SMTP id g6mr1134102wjy.79.1400841136693; Fri, 23 May 2014 03:32:16 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:15 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 33/71] clocksource: sh_tmu: Rename clock to "fck" in the non-legacy case Date: Fri, 23 May 2014 12:31:13 +0200 Message-Id: <1400841111-6683-33-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Laurent Pinchart The sh_tmu driver gets the TMU functional clock using a connection ID of "tmu_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "tmu_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart --- drivers/clocksource/sh_tmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 0306d31..cf07797 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -568,7 +568,8 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev) tmu->model = id->driver_data; /* Get hold of clock. */ - tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck"); + tmu->clk = clk_get(&tmu->pdev->dev, + tmu->model == SH_TMU_LEGACY ? "tmu_fck" : "fck"); if (IS_ERR(tmu->clk)) { dev_err(&tmu->pdev->dev, "cannot get clock\n"); return PTR_ERR(tmu->clk);