From patchwork Fri Mar 7 10:15:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 25877 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AFA332057C for ; Fri, 7 Mar 2014 10:17:45 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf8982518pdj.7 for ; Fri, 07 Mar 2014 02:17:45 -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=F1AoOcu0EaonzELRICrCAdAJBMXgQOaQAlbObtJMB5mq3L/X2YjxdoSRz6uKzp4oyj OjBybYna3cDQ+MDjDUGbHISuYMMBCQ1sOlGho/zKnDFOJ1m/65xIz8KfRC31jbqiFx1k fRADCdUqJ1ycXUSwZMeiJu8hyYpArqIQn98Sr3X8cNqYuW9c6Upb9EBDkV/tLbFpN+FK JZ2MVCE1qwUjUcdMee0Y5KZKN0i0J0T7WB2kTEVDOKgjGzx8TrQpLGTzOUkuVKX7gKYd oL0/q0CHGsVvoyGmxGlPIlZshNHrTd3G1IR0DenFOAczA8WxaK3z9conjuCXUXTe9Ok3 UPpw== X-Gm-Message-State: ALoCoQlpOHhAMPP6Xgf+luA03STay2rZ36dhC0dZxjdo3o0LwCcb4V5Jbo5URwf077jhKcF//xxX X-Received: by 10.66.149.67 with SMTP id ty3mr7389777pab.27.1394187464956; Fri, 07 Mar 2014 02:17:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.230 with SMTP id z93ls1141078qgz.93.gmail; Fri, 07 Mar 2014 02:17:44 -0800 (PST) X-Received: by 10.52.229.133 with SMTP id sq5mr57576vdc.45.1394187464700; Fri, 07 Mar 2014 02:17:44 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id uw4si2649709vdc.79.2014.03.07.02.17.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Mar 2014 02:17:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so3416699vcb.21 for ; Fri, 07 Mar 2014 02:17:44 -0800 (PST) X-Received: by 10.220.114.135 with SMTP id e7mr9401621vcq.23.1394187464610; Fri, 07 Mar 2014 02:17:44 -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 i9csp104278vck; Fri, 7 Mar 2014 02:17:43 -0800 (PST) X-Received: by 10.66.136.103 with SMTP id pz7mr21091671pab.140.1394187462731; Fri, 07 Mar 2014 02:17:42 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qy5si7818850pab.224.2014.03.07.02.17.42; Fri, 07 Mar 2014 02:17:42 -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 S1752591AbaCGKQG (ORCPT + 26 others); Fri, 7 Mar 2014 05:16:06 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:35031 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbaCGKQB (ORCPT ); Fri, 7 Mar 2014 05:16:01 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s27AFVxm000672; Fri, 7 Mar 2014 04:15:31 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s27AFVeY031679; Fri, 7 Mar 2014 04:15:31 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 7 Mar 2014 04:15:31 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s27AF90N011753; Fri, 7 Mar 2014 04:15:27 -0600 From: Roger Quadros To: , CC: , , , , , , , , , , Benoit Cousson , Paul Walmsley Subject: [PATCH v3 5/8] ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods Date: Fri, 7 Mar 2014 12:15:05 +0200 Message-ID: <1394187308-19622-6-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394187308-19622-1-git-send-email-rogerq@ti.com> References: <1394187308-19622-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.220.176 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 Acked-by: Paul Walmsley --- 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, };