From patchwork Thu May 12 11:56:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 779752 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4CBpux0017999 for ; Thu, 12 May 2011 11:52:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756069Ab1ELLwL (ORCPT ); Thu, 12 May 2011 07:52:11 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51610 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756027Ab1ELLwK (ORCPT ); Thu, 12 May 2011 07:52:10 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4CBq9gR018393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 12 May 2011 06:52:10 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4CBq990023301 for ; Thu, 12 May 2011 06:52:09 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4CBq9S1010752; Thu, 12 May 2011 06:52:09 -0500 (CDT) Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Thu, 12 May 2011 06:52:09 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4CBq9Ta001805; Thu, 12 May 2011 06:52:09 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.144]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p4CBq7f21952; Thu, 12 May 2011 06:52:08 -0500 (CDT) From: Archit Taneja To: CC: , Archit Taneja Subject: [PATCH v2 6/7] OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4 Date: Thu, 12 May 2011 17:26:29 +0530 Message-ID: <1305201390-9724-7-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305201390-9724-1-git-send-email-archit@ti.com> References: <1305201390-9724-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-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 12 May 2011 11:52:12 +0000 (UTC) Introduce DSI2 PLL clock sources needed by LCD2 channel and DSI2 Protocol engine and DISPC Functional clock. Do the following: - Modify dss_get_dsi_clk_source() and dss_select_dsi_clk_source() to take the dsi module number as an argument. - Create debugfs files for dsi2, split the corresponding debugfs functions. - Allow DPI to use these new clock sources. Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/core.c | 6 +- drivers/video/omap2/dss/dispc.c | 8 ++ drivers/video/omap2/dss/dpi.c | 6 ++- drivers/video/omap2/dss/dsi.c | 117 +++++++++++++++++++++++++++----- drivers/video/omap2/dss/dss.c | 32 +++++++-- drivers/video/omap2/dss/dss.h | 15 +++- drivers/video/omap2/dss/dss_features.c | 2 + include/video/omapdss.h | 2 + 8 files changed, 157 insertions(+), 31 deletions(-) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 5fbf9e8..3da4267 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -127,8 +127,7 @@ static int dss_initialize_debugfs(void) #endif #if defined(CONFIG_OMAP2_DSS_DSI) && defined(CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS) - debugfs_create_file("dsi_irq", S_IRUGO, dss_debugfs_dir, - &dsi_dump_irqs, &dss_debug_fops); + dsi_create_debugfs_files_irq(dss_debugfs_dir, &dss_debug_fops); #endif debugfs_create_file("dss", S_IRUGO, dss_debugfs_dir, @@ -140,8 +139,7 @@ static int dss_initialize_debugfs(void) &rfbi_dump_regs, &dss_debug_fops); #endif #ifdef CONFIG_OMAP2_DSS_DSI - debugfs_create_file("dsi", S_IRUGO, dss_debugfs_dir, - &dsi_dump_regs, &dss_debug_fops); + dsi_create_debugfs_files_reg(dss_debugfs_dir, &dss_debug_fops); #endif #ifdef CONFIG_OMAP2_DSS_VENC debugfs_create_file("venc", S_IRUGO, dss_debugfs_dir, diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index df8c992..1a2d835 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -2250,6 +2250,10 @@ unsigned long dispc_fclk_rate(void) dsidev = dsi_get_dsidev_from_id(0); r = dsi_get_pll_hsdiv_dispc_rate(dsidev); break; + case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC: + dsidev = dsi_get_dsidev_from_id(1); + r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + break; default: BUG(); } @@ -2276,6 +2280,10 @@ unsigned long dispc_lclk_rate(enum omap_channel channel) dsidev = dsi_get_dsidev_from_id(0); r = dsi_get_pll_hsdiv_dispc_rate(dsidev); break; + case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC: + dsidev = dsi_get_dsidev_from_id(1); + r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + break; default: BUG(); } diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 4d661a9..ff6bd30 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -53,8 +53,12 @@ static bool dpi_use_dsi_pll(struct omap_dss_device *dssdev) { if (dssdev->clocks.dispc.dispc_fclk_src == OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC || + dssdev->clocks.dispc.dispc_fclk_src == + OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC || dssdev->clocks.dispc.channel.lcd_clk_src == - OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC) + OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC || + dssdev->clocks.dispc.channel.lcd_clk_src == + OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC) return true; else return false; diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 762b0fe..85ec3d6 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -35,6 +35,7 @@ #include #include #include +#include #include