From patchwork Mon Mar 3 15:07:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 25608 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 93FAA20540 for ; Mon, 3 Mar 2014 15:08:46 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf28303239obb.3 for ; Mon, 03 Mar 2014 07:08:46 -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=xtc7550VnWRdPB4rxNu9ne2amAXWjaxKdwVKFELGuHc=; b=kIogOux/m3RAk5cFkt6ExnrrOMAkpjsV+UQuoWiVBzlIWIFFMNvBEbpU+EmXhir76B Dpa63jePPuE4lyxq/gRilNZkGQpC4Ip9Xf06R5LC1vjdRw9WFgtoCs/bmK7hpFF/ufSf e5wWS39wzvyT1X4w4kndswAR+e7jCm4mDhLga0Yde1WiyolJBG5DweeVFHw65Fe8+EjT L089v0Acrv3xYtkqt2wbCn4fODyYSJ8BBxmULkg4WgRY4bK0OQDtCCD5wkBk2ZT+MVk9 X8mIdBv8bRPxpq+8w/aSMurRmV8naR6zjl1IhKXp7yc0C9AsR5Q8UgZ+x4GV8D0kb6OQ NGpg== X-Gm-Message-State: ALoCoQl2/raeyrKUZWcBFj4DAN5WtQX1b7lDQ/b240OskmFn9Bk9JBiu1tAZI8zUyz2HC1o5MUs0 X-Received: by 10.182.74.226 with SMTP id x2mr13683801obv.1.1393859326197; Mon, 03 Mar 2014 07:08:46 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.8 with SMTP id c8ls2147818qgc.56.gmail; Mon, 03 Mar 2014 07:08:45 -0800 (PST) X-Received: by 10.52.137.143 with SMTP id qi15mr155511vdb.39.1393859325805; Mon, 03 Mar 2014 07:08:45 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id tr5si3521783vdc.104.2014.03.03.07.08.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 07:08:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.180 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.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so3638256vcb.39 for ; Mon, 03 Mar 2014 07:08:45 -0800 (PST) X-Received: by 10.220.98.204 with SMTP id r12mr214357vcn.48.1393859325695; Mon, 03 Mar 2014 07:08:45 -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.130.193 with SMTP id u1csp60348vcs; Mon, 3 Mar 2014 07:08:45 -0800 (PST) X-Received: by 10.66.142.170 with SMTP id rx10mr211059pab.117.1393859324567; Mon, 03 Mar 2014 07:08:44 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vu10si2976616pbc.219.2014.03.03.07.08.44; Mon, 03 Mar 2014 07:08:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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 S1754960AbaCCPId (ORCPT + 5 others); Mon, 3 Mar 2014 10:08:33 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:42225 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754943AbaCCPI3 (ORCPT ); Mon, 3 Mar 2014 10:08:29 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s23F85RP025737; Mon, 3 Mar 2014 09:08:05 -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 s23F852w015581; Mon, 3 Mar 2014 09:08:05 -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; Mon, 3 Mar 2014 09:08:04 -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 s23F7Z1B008921; Mon, 3 Mar 2014 09:08:01 -0600 From: Roger Quadros To: , , CC: , , , , , , , , , , Benoit Cousson , Paul Walmsley Subject: [PATCH 07/12] ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods Date: Mon, 3 Mar 2014 17:07:29 +0200 Message-ID: <1393859254-10937-8-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393859254-10937-1-git-send-email-rogerq@ti.com> References: <1393859254-10937-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.180 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, };