From patchwork Tue Aug 4 12:28:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6938531 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EAC979F6E2 for ; Tue, 4 Aug 2015 12:29:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 136A2204E3 for ; Tue, 4 Aug 2015 12:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 737E6204D9 for ; Tue, 4 Aug 2015 12:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756261AbbHDM3r (ORCPT ); Tue, 4 Aug 2015 08:29:47 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:37194 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933185AbbHDM2b (ORCPT ); Tue, 4 Aug 2015 08:28:31 -0400 Received: from ayla.of.borg ([84.193.93.87]) by michel.telenet-ops.be with bizsmtp id 0cUL1r00l1t5w8s06cULHz; Tue, 04 Aug 2015 14:28:30 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZMbKO-0006SG-Cc; Tue, 04 Aug 2015 14:28:20 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZMbKP-0007da-U1; Tue, 04 Aug 2015 14:28:21 +0200 From: Geert Uytterhoeven To: Simon Horman , Magnus Damm , Michael Turquette , Stephen Boyd , Laurent Pinchart , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v4 15/16] clk: shmobile: mstp: Consider "zb_clk" suitable for power management Date: Tue, 4 Aug 2015 14:28:16 +0200 Message-Id: <1438691297-29235-16-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438691297-29235-1-git-send-email-geert+renesas@glider.be> References: <1438691297-29235-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Currently the CPG/MSTP Clock Domain code looks for MSTP clocks to power manage a device. Unfortunately, on R-Mobile APE6 (r8a73a4) and SH-Mobile AG5 (sh73a0), the Bus State Controller (BSC) is not power-managed by an MSTP clock, but by a plain CPG clock (zb_clk). Add a special case to handle this, so the clock is properly managed, and devices connected to the BSC work as expected. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulf Hansson Acked-by: Stephen Boyd --- v4: - Add Reviewed-by, v3: - Use "CPG/MSTP Clock Domain" instead of "CPG Clock Domain", v2: - New. --- drivers/clk/shmobile/clk-mstp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c index b1df7b2f1e970adb..a117c3f0f257b5e1 100644 --- a/drivers/clk/shmobile/clk-mstp.c +++ b/drivers/clk/shmobile/clk-mstp.c @@ -259,6 +259,10 @@ int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev) "renesas,cpg-mstp-clocks")) goto found; + /* BSC on r8a73a4/sh73a0 uses zb_clk instead of an mstp clock*/ + if (!strcmp(clkspec.np->name, "zb_clk")) + goto found; + of_node_put(clkspec.np); i++; }