From patchwork Fri Nov 16 14:45:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1755861 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork2.kernel.org (Postfix) with ESMTP id 4AEAADF230 for ; Fri, 16 Nov 2012 14:55:08 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAGEr73t002107; Fri, 16 Nov 2012 08:53:07 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAGEr75c010366; Fri, 16 Nov 2012 08:53:07 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 16 Nov 2012 08:53:06 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAGEr61g015159; Fri, 16 Nov 2012 08:53:06 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6A2E380626; Fri, 16 Nov 2012 08:53:06 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id D57E480627 for ; Fri, 16 Nov 2012 08:47:33 -0600 (CST) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id qAGElXTF014126 for ; Fri, 16 Nov 2012 08:47:33 -0600 (CST) Received: from psmtp.com (na3sys009amx222.postini.com [74.125.149.62]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id qAGElWiX005698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Nov 2012 08:47:33 -0600 Received: from mail-pa0-f45.google.com ([209.85.220.45]) (using TLSv1) by na3sys009amx222.postini.com ([74.125.148.10]) with SMTP; Fri, 16 Nov 2012 06:47:33 PST Received: by mail-pa0-f45.google.com with SMTP id fb10so1843472pad.4 for ; Fri, 16 Nov 2012 06:47:27 -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=agtCgRqbFG84KPrYY56icBEjGrIyDeXNxbd/ZUOxwzg=; b=j5PYwZNvxkYxYKks3DfclC+fPuioLIi+tTo+8/2BXhblAErKyPORfe6rsJ4buXT2Ze AV8ZsahPDAczE7ofa+t2on7xfJHEFr5K4BIg8r5H70dal1+5Bgw8g0CJ6VN1pDQJCVO3 G4hs+DVyI99h0rIUbdfH77bx8xm+1vabZXmrEpq8Lc7KKQk3wftx7oMRoMnmk3aCfvpX GoDE2n8kpstoCDu4W7L/t5WqaMfTIbvBWAjjjBKBOXA/hKWsLS/tLwF1BvTYILekU2P6 P5NkaoEBLLGrv4JxZi+LiwSi6OyAIwtfWu6aNIvB2ywild7PhJf2ZVB1jaYzHH5vbjg2 8icg== Received: by 10.66.73.135 with SMTP id l7mr13466286pav.55.1353077247698; Fri, 16 Nov 2012 06:47:27 -0800 (PST) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id os5sm1334196pbc.15.2012.11.16.06.47.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Nov 2012 06:47:27 -0800 (PST) From: Prabhakar Lad To: LMML Subject: [PATCH v2 09/12] davinci: vpss: dm365: set vpss clk ctrl Date: Fri, 16 Nov 2012 20:15:11 +0530 Message-ID: <1353077114-19296-10-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353077114-19296-1-git-send-email-prabhakar.lad@ti.com> References: <1353077114-19296-1-git-send-email-prabhakar.lad@ti.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:35.80526/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:not-enabled 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 , Mauro Carvalho Chehab , LKML 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 | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c index 34ad7bd..a36d694 100644 --- a/drivers/media/platform/davinci/vpss.c +++ b/drivers/media/platform/davinci/vpss.c @@ -103,6 +103,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; @@ -484,11 +485,24 @@ static struct platform_driver vpss_driver = { static void vpss_exit(void) { + iounmap(oper_cfg.vpss_regs_base2); + release_mem_region(*oper_cfg.vpss_regs_base2, 4); platform_driver_unregister(&vpss_driver); } +#define VPSS_CLK_CTRL 0x01c40044 +#define VPSS_CLK_CTRL_VENCCLKEN BIT(3) +#define VPSS_CLK_CTRL_DACCLKEN BIT(4) + static int __init vpss_init(void) { + if (request_mem_region(VPSS_CLK_CTRL, 4, "vpss_clock_control")) { + oper_cfg.vpss_regs_base2 = ioremap(VPSS_CLK_CTRL, 4); + __raw_writel(VPSS_CLK_CTRL_VENCCLKEN | + VPSS_CLK_CTRL_DACCLKEN, oper_cfg.vpss_regs_base2); + } else { + return -EBUSY; + } return platform_driver_register(&vpss_driver); } subsys_initcall(vpss_init);