From patchwork Mon Aug 23 15:58:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthilvadivu Guruswamy X-Patchwork-Id: 124561 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7NFwQVK016508 for ; Mon, 23 Aug 2010 15:58:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754223Ab0HWP6X (ORCPT ); Mon, 23 Aug 2010 11:58:23 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:37914 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894Ab0HWP6W (ORCPT ); Mon, 23 Aug 2010 11:58:22 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7NFwFaR031169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Aug 2010 10:58:17 -0500 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7NFwCpf001730; Mon, 23 Aug 2010 21:28:12 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id o7NFwCb0011245; Mon, 23 Aug 2010 21:28:12 +0530 Received: (from a0876342@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o7NFwC6a011243; Mon, 23 Aug 2010 21:28:12 +0530 From: Guruswamy Senthilvadivu To: linux-omap@vger.kernel.org, tomi.valkeinen@nokia.com, paul@pwsan.com, khilman@ti.com Cc: Senthilvadivu Guruswamy Subject: [PATCH 11/20] Move dispc init to dispc probe Date: Mon, 23 Aug 2010 21:28:00 +0530 Message-Id: <1282579089-10487-12-git-send-email-svadivu@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1282579089-10487-11-git-send-email-svadivu@ti.com> References: <1282579089-10487-1-git-send-email-svadivu@ti.com> <1282579089-10487-2-git-send-email-svadivu@ti.com> <1282579089-10487-3-git-send-email-svadivu@ti.com> <1282579089-10487-4-git-send-email-svadivu@ti.com> <1282579089-10487-5-git-send-email-svadivu@ti.com> <1282579089-10487-6-git-send-email-svadivu@ti.com> <1282579089-10487-7-git-send-email-svadivu@ti.com> <1282579089-10487-8-git-send-email-svadivu@ti.com> <1282579089-10487-9-git-send-email-svadivu@ti.com> <1282579089-10487-10-git-send-email-svadivu@ti.com> <1282579089-10487-11-git-send-email-svadivu@ti.com> 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 23 Aug 2010 15:58:26 +0000 (UTC) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 5030a84..a72d2fa 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -205,12 +205,6 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_dpi; } - r = dispc_init(); - if (r) { - DSSERR("Failed to initialize dispc\n"); - goto err_dispc; - } - r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); @@ -268,8 +262,6 @@ err_dsi: err_sdi: venc_exit(); err_venc: - dispc_exit(); -err_dispc: dpi_exit(); err_dpi: dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M); @@ -286,7 +278,6 @@ static int omap_dss_remove(struct platform_device *pdev) dss_uninitialize_debugfs(); venc_exit(); - dispc_exit(); dpi_exit(); if (cpu_is_omap34xx()) { dsi_exit(); @@ -326,11 +317,21 @@ static int omap_dss_resume(struct platform_device *pdev) /* DISPC HW IP initialisation */ static int omap_dispchw_probe(struct platform_device *pdev) { - return 0; + int r; + dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M); + r = dispc_init(); + if (r) { + DSSERR("Failed to initialize dispc\n"); + goto err_dispc; + } +err_dispc: + dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M); + return r; } static int omap_dispchw_remove(struct platform_device *pdev) { + dispc_exit(); return 0; }