From patchwork Wed Jul 9 09:02:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 33267 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1B50A208CF for ; Wed, 9 Jul 2014 09:04:05 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id nu7sf58304obb.7 for ; Wed, 09 Jul 2014 02:04:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=HLuxZ8hLDtvwlfXNbw3WG0zemx6UvC69KE+RUqXvnXs=; b=PF8vV5Mkxpa9zPGvwXTQ8n3b9aKLD93U+OtJ4uRnyjldkg90r/ym+pKqE62xpriutT Cv3LCUCeR4oPON/MUiH6443qfTcHTkNTa170hKvGcLQTgTfb4T+qiP3DiZyUwBKYTwrY dHLYk/U99xr87Ok7Sdo3Vxbw04HCt7XRS+cAxueOkZJVxcEGd6G3K3/MDWiqapWVQpdZ 70DGuSnI+f3SW7NgjRTT2rG+Fs4mISwjs6K4PiPK4azp5RN/QdE/LzmfAVEtXQHLLJwx pGnDb8sFdwekxeihB078cA0oDBLuO5OIhKITNkPyBnKEs4/YEJG+Ki/r3PV93dJaCs8/ Grpw== X-Gm-Message-State: ALoCoQmzPy1yT+9mVRG8j3iC/BCySQRXZ6D/sjLzye+jyVlUw2ZykS1VjkFMB4LncduCmbwbOcUP X-Received: by 10.182.63.80 with SMTP id e16mr5424510obs.33.1404896644607; Wed, 09 Jul 2014 02:04:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.228 with SMTP id s91ls2512282qga.58.gmail; Wed, 09 Jul 2014 02:04:04 -0700 (PDT) X-Received: by 10.52.121.112 with SMTP id lj16mr32184103vdb.29.1404896644479; Wed, 09 Jul 2014 02:04:04 -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 m2si21254602vek.107.2014.07.09.02.04.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 02:04:04 -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 ij19so6527241vcb.36 for ; Wed, 09 Jul 2014 02:04:04 -0700 (PDT) X-Received: by 10.52.69.172 with SMTP id f12mr32250087vdu.26.1404896644379; Wed, 09 Jul 2014 02:04:04 -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.221.37.5 with SMTP id tc5csp29184vcb; Wed, 9 Jul 2014 02:04:03 -0700 (PDT) X-Received: by 10.68.133.40 with SMTP id oz8mr475793pbb.132.1404896642318; Wed, 09 Jul 2014 02:04:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si3978384pdj.437.2014.07.09.02.04.01; Wed, 09 Jul 2014 02:04:01 -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 S1755144AbaGIJDv (ORCPT + 28 others); Wed, 9 Jul 2014 05:03:51 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:35518 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbaGIJDs (ORCPT ); Wed, 9 Jul 2014 05:03:48 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6993HBS006163; Wed, 9 Jul 2014 04:03:17 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6993HDD012892; Wed, 9 Jul 2014 04:03:17 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Jul 2014 04:03:17 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6993DY3010904; Wed, 9 Jul 2014 04:03:14 -0500 From: Kishon Vijay Abraham I To: , , , , , , , , CC: Subject: [PATCH v2] arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems Date: Wed, 9 Jul 2014 14:32:47 +0530 Message-ID: <1404896567-32204-1-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403719366-9656-3-git-send-email-kishon@ti.com> References: <1403719366-9656-3-git-send-email-kishon@ti.com> MIME-Version: 1.0 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: kishon@ti.com 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: , Added hwmod data for pcie1 and pcie2 subsystem present in DRA7xx SOC. Cc: Tony Lindgren Cc: Russell King Cc: Paul Walmsley Signed-off-by: Kishon Vijay Abraham I Tested-by: Kishon Vijay Abraham I Reviewed-by: Rajendra Nayak --- Changes from v1: * changed the clock domain to "pcie_clkdm" * Added PCIe as a slave port for l3_main. Boot log for dra7xx can be found at http://paste.ubuntu.com/7769402/ arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 73 +++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 6ff40a6..2f37ca8 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -1290,6 +1290,43 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = { }; /* + * 'PCIE' class + * + */ + +static struct omap_hwmod_class dra7xx_pcie_hwmod_class = { + .name = "pcie", +}; + +/* pcie1 */ +static struct omap_hwmod dra7xx_pcie1_hwmod = { + .name = "pcie1", + .class = &dra7xx_pcie_hwmod_class, + .clkdm_name = "pcie_clkdm", + .main_clk = "l4_root_clk_div", + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* pcie2 */ +static struct omap_hwmod dra7xx_pcie2_hwmod = { + .name = "pcie2", + .class = &dra7xx_pcie_hwmod_class, + .clkdm_name = "pcie_clkdm", + .main_clk = "l4_root_clk_div", + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* * 'PCIE PHY' class * */ @@ -2448,6 +2485,38 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l3_main_1 -> pcie1 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_pcie1_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l4_cfg -> pcie1 */ +static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = { + .master = &dra7xx_l4_cfg_hwmod, + .slave = &dra7xx_pcie1_hwmod, + .clk = "l4_root_clk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l3_main_1 -> pcie2 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_pcie2_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l4_cfg -> pcie2 */ +static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = { + .master = &dra7xx_l4_cfg_hwmod, + .slave = &dra7xx_pcie2_hwmod, + .clk = "l4_root_clk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l4_cfg -> pcie1 phy */ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = { .master = &dra7xx_l4_cfg_hwmod, @@ -2813,6 +2882,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_cfg__mpu, &dra7xx_l4_cfg__ocp2scp1, &dra7xx_l4_cfg__ocp2scp3, + &dra7xx_l3_main_1__pcie1, + &dra7xx_l4_cfg__pcie1, + &dra7xx_l3_main_1__pcie2, + &dra7xx_l4_cfg__pcie2, &dra7xx_l4_cfg__pcie1_phy, &dra7xx_l4_cfg__pcie2_phy, &dra7xx_l3_main_1__qspi,