From patchwork Tue Jun 17 09:54:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 4365631 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DE8AF9F26E for ; Tue, 17 Jun 2014 09:56:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D796201D3 for ; Tue, 17 Jun 2014 09:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17C71201B4 for ; Tue, 17 Jun 2014 09:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754121AbaFQJ4M (ORCPT ); Tue, 17 Jun 2014 05:56:12 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44211 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994AbaFQJ4L (ORCPT ); Tue, 17 Jun 2014 05:56:11 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5H9uA9S021660; Tue, 17 Jun 2014 04:56:10 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5H9uAOC002321; Tue, 17 Jun 2014 04:56:10 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 17 Jun 2014 04:56:09 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5H9u9JV003240; Tue, 17 Jun 2014 04:56:09 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.145.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id s5H9u8t20601; Tue, 17 Jun 2014 04:56:08 -0500 (CDT) From: Archit Taneja To: , CC: , Archit Taneja Subject: [RFC v2 2/2] arm: omap5 hwmod data: Example: Make DSS hwmods share MODULEMODE fields Date: Tue, 17 Jun 2014 15:24:34 +0530 Message-ID: <1402998874-1024-3-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402998874-1024-1-git-send-email-archit@ti.com> References: <1401101095-27181-1-git-send-email-archit@ti.com> <1402998874-1024-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DSS hwmods share the MODULEMODE field. Create a new 'mmode_shared' struct which the DSS hwmods refer to. This will allow the hwmods to reset properly during boot, and not break things when the omapdss module is inserted. (Note: hdmi and rfbi hwmods still don't reset properly as they don't have their mainclks as dss_dss_clk, this needs to be changed later). Signed-off-by: Archit Taneja --- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 40 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index 290213f..e855cf5 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c @@ -337,6 +337,9 @@ static struct omap_hwmod omap54xx_dmic_hwmod = { * 'dss' class * display sub-system */ + +static struct mmode_shared dss_modulemode_ref; + static struct omap_hwmod_class_sysconfig omap54xx_dss_sysc = { .rev_offs = 0x0000, .syss_offs = 0x0014, @@ -364,9 +367,10 @@ static struct omap_hwmod omap54xx_dss_hwmod = { .main_clk = "dss_dss_clk", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .context_offs = OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET, - .modulemode = MODULEMODE_SWCTRL, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .context_offs = OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_opt_clks, @@ -414,8 +418,10 @@ static struct omap_hwmod omap54xx_dss_dispc_hwmod = { .main_clk = "dss_dss_clk", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_dispc_opt_clks, @@ -456,8 +462,10 @@ static struct omap_hwmod omap54xx_dss_dsi1_a_hwmod = { .main_clk = "dss_dss_clk", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_dsi1_a_opt_clks, @@ -476,8 +484,10 @@ static struct omap_hwmod omap54xx_dss_dsi1_c_hwmod = { .main_clk = "dss_dss_clk", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_dsi1_c_opt_clks, @@ -515,8 +525,10 @@ static struct omap_hwmod omap54xx_dss_hdmi_hwmod = { .main_clk = "dss_48mhz_clk", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_hdmi_opt_clks, @@ -554,8 +566,10 @@ static struct omap_hwmod omap54xx_dss_rfbi_hwmod = { .clkdm_name = "dss_clkdm", .prcm = { .omap4 = { - .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, - .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET, + .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, + .modulemode = MODULEMODE_SWCTRL, + .mmode_ref = &dss_modulemode_ref, }, }, .opt_clks = dss_rfbi_opt_clks,