From patchwork Fri May 23 10:31:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30696 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8EACE20369 for ; Fri, 23 May 2014 10:33:31 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf17303594pbc.3 for ; Fri, 23 May 2014 03:33:30 -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=T2lcuXv41sPjYA1wh8oCUXFc+XPtqNG66myFLu4/zYg=; b=UGkF4i3sbb8khecOc6p6GqUo/9ajztcuUu2iDI1jCb32VMGpEc7p71ESEO6Pr4e4MU cVrl9I8ZklKMX5DKY1RxcB+5kE3HN4pU8ezqtoGL8Dt2jwBRPAR4lb0zp71SPcRIgdXU mRRJBXkuuOrareOz1HaPhhaLMYUkKeYlcLPvDcIBZwjAf+BZ3edBXLkug2FA85Uub6ld c1BMmQLAQesJBkb398JZgFM28nsFftTVerRKACsmNO/snWzGxKN7Zc0Qvi6rMAyie5mX l2ubHKjKH3eb6+mGi+dfl1Vrr9LPs4+BDYLce4TKMCLzpZMRzsjDfCsmp9NeG0mtEa75 UPlg== X-Gm-Message-State: ALoCoQmU8SnnBWp4x4hmA++Yb29mTf/ktxruXuOCKpX973UT4fyiB7qD40E4npTYvbUA4N4ko8FB X-Received: by 10.66.158.6 with SMTP id wq6mr1732648pab.39.1400841210891; Fri, 23 May 2014 03:33:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.72 with SMTP id j66ls1804687qge.99.gmail; Fri, 23 May 2014 03:33:30 -0700 (PDT) X-Received: by 10.52.96.8 with SMTP id do8mr1754152vdb.4.1400841210780; Fri, 23 May 2014 03:33:30 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id tf2si1375931vcb.77.2014.05.23.03.33.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:33:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hq11so199005vcb.22 for ; Fri, 23 May 2014 03:33:30 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr2913691vdb.18.1400841210723; Fri, 23 May 2014 03:33:30 -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 ib8csp19852vcb; Fri, 23 May 2014 03:33:30 -0700 (PDT) X-Received: by 10.68.201.97 with SMTP id jz1mr4847605pbc.26.1400841209972; Fri, 23 May 2014 03:33:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kh4si3193982pbc.255.2014.05.23.03.33.29 for ; Fri, 23 May 2014 03:33:29 -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 S1753091AbaEWKcr (ORCPT + 27 others); Fri, 23 May 2014 06:32:47 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:39116 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752953AbaEWKci (ORCPT ); Fri, 23 May 2014 06:32:38 -0400 Received: by mail-wg0-f44.google.com with SMTP id a1so4540071wgh.15 for ; Fri, 23 May 2014 03:32:37 -0700 (PDT) X-Received: by 10.194.6.166 with SMTP id c6mr2117826wja.64.1400841157415; Fri, 23 May 2014 03:32:37 -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.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:36 -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 50/71] clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case Date: Fri, 23 May 2014 12:31:30 +0200 Message-Id: <1400841111-6683-50-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.220.177 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_mtu2 driver gets the MTU2 functional clock using a connection ID of "mtu2_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "mtu2_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 Tested-by: Wolfram Sang --- drivers/clocksource/sh_mtu2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 7cc6d942..3a37857 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c @@ -465,7 +465,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu, } /* Get hold of clock. */ - mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck"); + mtu->clk = clk_get(&mtu->pdev->dev, mtu->legacy ? "mtu2_fck" : "fck"); if (IS_ERR(mtu->clk)) { dev_err(&mtu->pdev->dev, "cannot get clock\n"); return PTR_ERR(mtu->clk);