From patchwork Thu Mar 6 14:38:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 25820 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E365F203C3 for ; Thu, 6 Mar 2014 14:40:35 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf10058362ieb.9 for ; Thu, 06 Mar 2014 06:40:35 -0800 (PST) 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=qV1B8agzAZKSLwt7jBfGGzu/NvfeEFK1qkWyO/j9H0Y=; b=F/QijHePdsIewtF/ATqLTWUebEoDsbKFe6vBDQ1gwlMP3bWzT7ozpf6fyz7lGE37w3 GwaPOasiAcZzGbcJhUgU3YXLS7q6PWcAx5LYY7EvVSruao7FzKE+rUJ43H/A9uN6ol2m SJU1qZSDL733YtgfY5c8tCe8Z+TzvOXX3neOestiB5tnlhnkvn7uwIcs63kesFWhqWnN HEELPSiQkGuKaCi5D7uT5HosgNeC7HiW/U7tCrA5c5XlWnu896UXLJcGFDU1i1lXgVhk SEID02dZYBfnLxNETgEmxcoE1aCP2F/Ue1LC2Q3E+LMUAxho3bPISQHW+sUXXmlSE1EN E/mA== X-Gm-Message-State: ALoCoQkD7DbxEON5Wbpy96Eb00iQWYU9ehXRhLjPPxxzL6C0bD0rx91oxU5CdjBG3+BUlTLKReMu X-Received: by 10.182.28.67 with SMTP id z3mr5512508obg.12.1394116835372; Thu, 06 Mar 2014 06:40:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.7 with SMTP id 7ls749064qgm.46.gmail; Thu, 06 Mar 2014 06:40:35 -0800 (PST) X-Received: by 10.52.139.49 with SMTP id qv17mr1351532vdb.33.1394116835163; Thu, 06 Mar 2014 06:40:35 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id of4si1134652vcb.142.2014.03.06.06.40.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Mar 2014 06:40:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so2679872veb.14 for ; Thu, 06 Mar 2014 06:40:35 -0800 (PST) X-Received: by 10.58.178.238 with SMTP id db14mr1795521vec.25.1394116835044; Thu, 06 Mar 2014 06:40:35 -0800 (PST) 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.78.9 with SMTP id i9csp43308vck; Thu, 6 Mar 2014 06:40:34 -0800 (PST) X-Received: by 10.68.143.34 with SMTP id sb2mr14622043pbb.135.1394116834258; Thu, 06 Mar 2014 06:40:34 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qy5si5091864pab.311.2014.03.06.06.40.33; Thu, 06 Mar 2014 06:40:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbaCFOj6 (ORCPT + 26 others); Thu, 6 Mar 2014 09:39:58 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:58872 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbaCFOjz (ORCPT ); Thu, 6 Mar 2014 09:39:55 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s26EdUfB013729; Thu, 6 Mar 2014 08:39:30 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s26EdT96002180; Thu, 6 Mar 2014 08:39:30 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Thu, 6 Mar 2014 08:39:29 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s26EcoCX026929; Thu, 6 Mar 2014 08:39:26 -0600 From: Roger Quadros To: , , CC: , , , , , , , , , , Benoit Cousson , Paul Walmsley Subject: [PATCH v2 10/13] ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods Date: Thu, 6 Mar 2014 16:38:46 +0200 Message-ID: <1394116729-28811-11-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394116729-28811-1-git-send-email-rogerq@ti.com> References: <1394116729-28811-1-git-send-email-rogerq@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: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: Keshava Munegowda Create hwmods for ocp2scp3 and sata modules. [Roger Q] Clean up. CC: Benoit Cousson CC: Paul Walmsley CC: Tony Lindgren Signed-off-by: Balaji T K Signed-off-by: Roger Quadros --- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 73 ++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index e297d62..227a69f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c @@ -1726,6 +1726,77 @@ static struct omap_hwmod omap54xx_wd_timer2_hwmod = { }, }; +/* + * 'ocp2scp' class + * bridge to transform ocp interface protocol to scp (serial control port) + * protocol + */ +/* ocp2scp3 */ +static struct omap_hwmod omap54xx_ocp2scp3_hwmod; +/* l4_cfg -> ocp2scp3 */ +static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp3 = { + .master = &omap54xx_l4_cfg_hwmod, + .slave = &omap54xx_ocp2scp3_hwmod, + .clk = "l4_root_clk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +static struct omap_hwmod omap54xx_ocp2scp3_hwmod = { + .name = "ocp2scp3", + .class = &omap54xx_ocp2scp_hwmod_class, + .clkdm_name = "l3init_clkdm", + .prcm = { + .omap4 = { + .clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET, + .context_offs = OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET, + .modulemode = MODULEMODE_HWCTRL, + }, + }, +}; + +/* + * 'sata' class + * sata: serial ata interface gen2 compliant ( 1 rx/ 1 tx) + */ + +static struct omap_hwmod_class_sysconfig omap54xx_sata_sysc = { + .sysc_offs = 0x0000, + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | + MSTANDBY_SMART | MSTANDBY_SMART_WKUP), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class omap54xx_sata_hwmod_class = { + .name = "sata", + .sysc = &omap54xx_sata_sysc, +}; + +/* sata */ +static struct omap_hwmod omap54xx_sata_hwmod = { + .name = "sata", + .class = &omap54xx_sata_hwmod_class, + .clkdm_name = "l3init_clkdm", + .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, + .main_clk = "func_48m_fclk", + .mpu_rt_idx = 1, + .prcm = { + .omap4 = { + .clkctrl_offs = OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET, + .context_offs = OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* l4_cfg -> sata */ +static struct omap_hwmod_ocp_if omap54xx_l4_cfg__sata = { + .master = &omap54xx_l4_cfg_hwmod, + .slave = &omap54xx_sata_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; /* * Interfaces @@ -2399,6 +2470,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = { &omap54xx_l4_cfg__usb_tll_hs, &omap54xx_l4_cfg__usb_otg_ss, &omap54xx_l4_wkup__wd_timer2, + &omap54xx_l4_cfg__ocp2scp3, + &omap54xx_l4_cfg__sata, NULL, };