From patchwork Tue Feb 12 16:28:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 219885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C7DB62C0084 for ; Wed, 13 Feb 2013 03:29:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933361Ab3BLQ32 (ORCPT ); Tue, 12 Feb 2013 11:29:28 -0500 Received: from mail.free-electrons.com ([94.23.35.102]:45802 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933360Ab3BLQ31 (ORCPT ); Tue, 12 Feb 2013 11:29:27 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 81EB183A; Tue, 12 Feb 2013 17:29:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 14767845; Tue, 12 Feb 2013 17:29:26 +0100 (CET) From: Thomas Petazzoni To: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Lior Amsalem , Andrew Lunn , Russell King - ARM Linux , Jason Cooper , Arnd Bergmann , Stephen Warren , Thierry Reding , Eran Ben-Avi , Nadav Haklai , Maen Suleiman , Shadi Ammouri , Gregory Clement , Jason Gunthorpe , Tawfik Bayouk , Mike Turquette Subject: [PATCH 08/32] clk: mvebu: create parent-child relation for PCIe clocks on Armada 370 Date: Tue, 12 Feb 2013 17:28:42 +0100 Message-Id: <1360686546-24277-9-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360686546-24277-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1360686546-24277-1-git-send-email-thomas.petazzoni@free-electrons.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The Armada 370 has two gatable clocks for each PCIe interface: pexY and pexY_en. In order for a PCIe interface to be functional, we need both of them to be enabled. Since there are no conditions in which having one clock enabled and not the other would be useful, we simply make those two clocks have a child-parent relationship. So, the pex0 clock becomes a child of pex0_en (for the PCIe interface 0), and pex1 becomes a child of pex1_en (for the PCIe interface 1). This way, the DT node for the PCIe interface 0 only needs to grab a reference to pex0, and the DT node for the PCIe interface 1 only needs to grab a reference to pex1. Signed-off-by: Thomas Petazzoni Cc: Mike Turquette --- drivers/clk/mvebu/clk-gating-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c index 8fa5408..fd52b5f 100644 --- a/drivers/clk/mvebu/clk-gating-ctrl.c +++ b/drivers/clk/mvebu/clk-gating-ctrl.c @@ -119,8 +119,8 @@ static const struct mvebu_soc_descr __initconst armada_370_gating_descr[] = { { "pex1_en", NULL, 2 }, { "ge1", NULL, 3 }, { "ge0", NULL, 4 }, - { "pex0", NULL, 5 }, - { "pex1", NULL, 9 }, + { "pex0", "pex0_en", 5 }, + { "pex1", "pex1_en", 9 }, { "sata0", NULL, 15 }, { "sdio", NULL, 17 }, { "tdm", NULL, 25 },