From patchwork Thu Oct 12 19:27:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Parrot X-Patchwork-Id: 10002649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB82B60216 for ; Thu, 12 Oct 2017 19:28:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF3D028E90 for ; Thu, 12 Oct 2017 19:28:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D30EE28E92; Thu, 12 Oct 2017 19:28:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 615BD28E90 for ; Thu, 12 Oct 2017 19:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754886AbdJLT1n (ORCPT ); Thu, 12 Oct 2017 15:27:43 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:15175 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754188AbdJLT1i (ORCPT ); Thu, 12 Oct 2017 15:27:38 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9CJRYpU017244; Thu, 12 Oct 2017 14:27:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507836454; bh=lWYc2CTpVB4GroByhHljYJhojOV1DWAoCO0O/lGQbBc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AB4zOPouEbtCt3MjkegPs8mJ5Zw0D1i9gmQUO9CZrF/zzbRc5EpqHjBCGurWWzJi0 nqAJKXI62AGYOguYq8FBsm2NCvFkg3XjD9dwaQkTzEd3eKLzQx+Tvy4Hk3oZ6BemD/ hHfJk6zZ2LPQVmyiYkJNkT8OHrhlOz/QyM4Ix9VE= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9CJRYcc019226; Thu, 12 Oct 2017 14:27:34 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 12 Oct 2017 14:27:34 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 12 Oct 2017 14:27:34 -0500 Received: from uda0869644a.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9CJRPPP024242; Thu, 12 Oct 2017 14:27:34 -0500 From: Benoit Parrot To: Tony Lindgren , Tero Kristo , Rob Herring CC: , , , , Benoit Parrot Subject: [Patch 5/6] ARM: DRA7: hwmod: Add VPE nodes Date: Thu, 12 Oct 2017 14:27:18 -0500 Message-ID: <20171012192719.15193-6-bparrot@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171012192719.15193-1-bparrot@ti.com> References: <20171012192719.15193-1-bparrot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add hwmod entries for VPE (Video Processing Engine) hardware block found in DRA7x family of devices. DRA75x_DRA74x_ES1.1 Version T Technical Reference Manual (Literature Number SPRUHI2T) states that VPE only support NO_STANDBY, FORCE_STANDBY, NO_IDLE, FORCE_IDLE and SMART_IDLE. The hwmod flags were set to reflect this fact and make sure that both are software supervised (SWSUSP). Signed-off-by: Benoit Parrot --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index fc53b498975c..c0bbc1099a11 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -240,6 +240,40 @@ static struct omap_hwmod dra7xx_bb2d_hwmod = { }; /* + * 'vpe' class + * + */ + +static struct omap_hwmod_class_sysconfig dra7xx_vpe_sysc = { + .sysc_offs = 0x0010, + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + MSTANDBY_FORCE | MSTANDBY_NO | + MSTANDBY_SMART), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class dra7xx_vpe_hwmod_class = { + .name = "vpe", + .sysc = &dra7xx_vpe_sysc, +}; + +/* vpe */ +static struct omap_hwmod dra7xx_vpe_hwmod = { + .name = "vpe", + .class = &dra7xx_vpe_hwmod_class, + .clkdm_name = "vpe_clkdm", + .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_VPE_VPE_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_VPE_VPE_CONTEXT_OFFSET, + .modulemode = MODULEMODE_HWCTRL, + }, + }, +}; + +/* * 'cal' class * */ @@ -3936,6 +3970,14 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l4_per3 -> vpe */ +static struct omap_hwmod_ocp_if dra7xx_l4_per3__vpe = { + .master = &dra7xx_l4_per3_hwmod, + .slave = &dra7xx_vpe_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l4_per3 -> cal */ static struct omap_hwmod_ocp_if dra7xx_l4_per3__cal = { .master = &dra7xx_l4_per3_hwmod, @@ -4099,6 +4141,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per2__vcp1, &dra7xx_l3_main_1__vcp2, &dra7xx_l4_per2__vcp2, + &dra7xx_l4_per3__vpe, &dra7xx_l4_wkup__wd_timer2, &dra7xx_l4_per2__epwmss0, &dra7xx_l4_per2__epwmss1,