From patchwork Fri Nov 30 11:43:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1824811 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork2.kernel.org (Postfix) with ESMTP id 40F5BDF24C for ; Fri, 30 Nov 2012 11:49:37 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAUBjGee006095; Fri, 30 Nov 2012 05:45:16 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAUBjFLm015686; Fri, 30 Nov 2012 05:45:15 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 30 Nov 2012 05:45:15 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAUBjFv3023733; Fri, 30 Nov 2012 05:45:15 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 64C028062D; Fri, 30 Nov 2012 05:45:15 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 1F2EB80630 for ; Fri, 30 Nov 2012 05:44:22 -0600 (CST) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id qAUBiLdP007588 for ; Fri, 30 Nov 2012 05:44:21 -0600 (CST) Received: from psmtp.com (na3sys009amx170.postini.com [74.125.149.96]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id qAUBiLe4013845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 30 Nov 2012 05:44:21 -0600 Received: from mail-da0-f45.google.com ([209.85.210.45]) (using TLSv1) by na3sys009amx170.postini.com ([74.125.148.10]) with SMTP; Fri, 30 Nov 2012 03:44:21 PST Received: by mail-da0-f45.google.com with SMTP id w4so183662dam.4 for ; Fri, 30 Nov 2012 03:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Ha9TuGfdjPCA+ZJGXiAqGI4je+m1qefyRNn0qqzrTNA=; b=Ki2SMvtQxHRet9RbIEMGom7bWuppPZOTCEH9rjXB/FXF2opcDbAeJ/g/rBB6BNonGy BI8xLyaYQbYUaK5HH1PIaudBRHERjVb8e2nZjHHHVvTWvUdHWZTZiCgJu39Y48yfpbYP u552U7r7JhRuyMKpUmcxohiIDJYB4a7nVihBuyEGeEdW84MfB8zFUl6oQidD3l2aOyL5 QTa5AMwsP5Y/5sXsKGwLDPhHarvf98ihF1eyO/j8mxHYeMAgSGzaeoTG/ukmlaB3Uof2 z34KKHsAf1OfsnHp05nRFiqrhkQbfqCpq64w/uceveV+wkA3dGbhoGw72RDwo4PP7+US pfnA== Received: by 10.66.79.163 with SMTP id k3mr2452401pax.60.1354275860666; Fri, 30 Nov 2012 03:44:20 -0800 (PST) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id sy1sm2924030pbc.66.2012.11.30.03.44.16 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Nov 2012 03:44:19 -0800 (PST) From: Prabhakar Lad To: LMML , Mauro Carvalho Chehab Subject: [PATCH v4 2/3] davinci: vpss: dm365: set vpss clk ctrl Date: Fri, 30 Nov 2012 17:13:40 +0530 Message-ID: <1354275821-25235-3-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1354275821-25235-1-git-send-email-prabhakar.lad@ti.com> References: <1354275821-25235-1-git-send-email-prabhakar.lad@ti.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:33.89539/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:no-policies X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: DLOS , LKML , Hans Verkuil , Sakari Ailus X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Manjunath Hadli request_mem_region for VPSS_CLK_CTRL register and ioremap. and enable clocks appropriately. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpss.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c index 1c96ce8..e4ad63d 100644 --- a/drivers/media/platform/davinci/vpss.c +++ b/drivers/media/platform/davinci/vpss.c @@ -69,6 +69,11 @@ MODULE_AUTHOR("Texas Instruments"); #define DM365_ISP5_CCDCMUX 0x20 #define DM365_ISP5_PG_FRAME_SIZE 0x28 #define DM365_VPBE_CLK_CTRL 0x00 + +#define VPSS_CLK_CTRL 0x01c40044 +#define VPSS_CLK_CTRL_VENCCLKEN BIT(3) +#define VPSS_CLK_CTRL_DACCLKEN BIT(4) + /* * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1, * AF - vpss_int3 @@ -112,6 +117,7 @@ struct vpss_hw_ops { struct vpss_oper_config { __iomem void *vpss_regs_base0; __iomem void *vpss_regs_base1; + resource_size_t *vpss_regs_base2; enum vpss_platform_type platform; spinlock_t vpss_lock; struct vpss_hw_ops hw_ops; @@ -492,11 +498,20 @@ static struct platform_driver vpss_driver = { static void vpss_exit(void) { + iounmap(oper_cfg.vpss_regs_base2); + release_mem_region(VPSS_CLK_CTRL, 4); platform_driver_unregister(&vpss_driver); } static int __init vpss_init(void) { + if (!request_mem_region(VPSS_CLK_CTRL, 4, "vpss_clock_control")) + return -EBUSY; + + oper_cfg.vpss_regs_base2 = ioremap(VPSS_CLK_CTRL, 4); + writel(VPSS_CLK_CTRL_VENCCLKEN | + VPSS_CLK_CTRL_DACCLKEN, oper_cfg.vpss_regs_base2); + return platform_driver_register(&vpss_driver); } subsys_initcall(vpss_init);