From patchwork Tue Aug 4 13:25:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6939491 Return-Path: X-Original-To: patchwork-linux-sh@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 BB7D0C05AC for ; Tue, 4 Aug 2015 13:25:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D817E203FB for ; Tue, 4 Aug 2015 13:25:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02F5820389 for ; Tue, 4 Aug 2015 13:25:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933077AbbHDNZh (ORCPT ); Tue, 4 Aug 2015 09:25:37 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:40335 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933516AbbHDNZh (ORCPT ); Tue, 4 Aug 2015 09:25:37 -0400 Received: from ayla.of.borg ([84.193.93.87]) by albert.telenet-ops.be with bizsmtp id 0dRb1r01J1t5w8s06dRbWn; Tue, 04 Aug 2015 15:25:35 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZMcDn-0006bX-NV; Tue, 04 Aug 2015 15:25:35 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZMcDp-0002x5-98; Tue, 04 Aug 2015 15:25:37 +0200 From: Geert Uytterhoeven To: Simon Horman Cc: linux-sh@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 15:25:35 +0200 Message-Id: <1438694735-11313-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438691297-29235-16-git-send-email-geert+renesas@glider.be> References: <1438691297-29235-16-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 --- 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++; }