From patchwork Wed Oct 6 11:14:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthilvadivu Guruswamy X-Patchwork-Id: 235731 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 o96BFmsC017482 for ; Wed, 6 Oct 2010 11:15:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758892Ab0JFLP1 (ORCPT ); Wed, 6 Oct 2010 07:15:27 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:32921 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758890Ab0JFLPX (ORCPT ); Wed, 6 Oct 2010 07:15:23 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o96BFFcM002679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Oct 2010 06:15:18 -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 o96BFEVc029586; Wed, 6 Oct 2010 16:45:14 +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 o96BFDmW010525; Wed, 6 Oct 2010 16:45:13 +0530 Received: (from a0876342@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o96BFDkF010521; Wed, 6 Oct 2010 16:45:13 +0530 From: Guruswamy Senthilvadivu To: khilman@deeprootsystems.com, tomi.valkeinen@nokia.com, paul@pwsan.com, hvaibhav@ti.com, linux-omap@vger.kernel.org Cc: Senthilvadivu Guruswamy Subject: [PATCH v1 12/16] OMAP3: hwmod DSS: DISPC Move init,exit to driver Date: Wed, 6 Oct 2010 16:44:55 +0530 Message-Id: <1286363699-9614-13-git-send-email-svadivu@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1286363699-9614-12-git-send-email-svadivu@ti.com> References: <1286363699-9614-1-git-send-email-svadivu@ti.com> <1286363699-9614-2-git-send-email-svadivu@ti.com> <1286363699-9614-3-git-send-email-svadivu@ti.com> <1286363699-9614-4-git-send-email-svadivu@ti.com> <1286363699-9614-5-git-send-email-svadivu@ti.com> <1286363699-9614-6-git-send-email-svadivu@ti.com> <1286363699-9614-7-git-send-email-svadivu@ti.com> <1286363699-9614-8-git-send-email-svadivu@ti.com> <1286363699-9614-9-git-send-email-svadivu@ti.com> <1286363699-9614-10-git-send-email-svadivu@ti.com> <1286363699-9614-11-git-send-email-svadivu@ti.com> <1286363699-9614-12-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 (demeter1.kernel.org [140.211.167.41]); Wed, 06 Oct 2010 11:15:54 +0000 (UTC) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index cc7a5f1..9652ed7 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -199,12 +199,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"); @@ -262,8 +256,6 @@ err_dsi: err_sdi: venc_exit(); err_venc: - dispc_exit(); -err_dispc: dpi_exit(); err_dpi: @@ -278,7 +270,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(); diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index e48c6fa..e35cc87 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -156,6 +156,7 @@ struct dispc_irq_stats { }; static struct { + struct platform_device *pdev; void __iomem *base; u32 fifo_size[3]; @@ -189,11 +190,22 @@ static inline u32 dispc_read_reg(const struct dispc_reg idx) /* DISPC HW IP initialisation */ static int omap_dispchw_probe(struct platform_device *pdev) { - return 0; + int r; + dispc.pdev = pdev; + + r = dispc_init(); + if (r) { + DSSERR("Failed to initialize dispc\n"); + goto err_dispc; + } + +err_dispc: + return r; } static int omap_dispchw_remove(struct platform_device *pdev) { + dispc_exit(); return 0; }