From patchwork Fri Sep 14 12:46:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1458741 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 B6BEBDF280 for ; Fri, 14 Sep 2012 12:55:04 +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 q8ECt4kH019263 for ; Fri, 14 Sep 2012 07:55:04 -0500 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 q8ECt4fV005819 for ; Fri, 14 Sep 2012 07:55:04 -0500 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, 14 Sep 2012 07:55:04 -0500 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 q8ECt4ZJ008662 for ; Fri, 14 Sep 2012 07:55:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 279C780628 for ; Fri, 14 Sep 2012 07:55:04 -0500 (CDT) 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 83A5A80626 for ; Fri, 14 Sep 2012 07:50:29 -0500 (CDT) 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 q8ECoTNk002674 for ; Fri, 14 Sep 2012 07:50:29 -0500 (CDT) Received: from psmtp.com (na3sys009amx172.postini.com [74.125.149.98]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id q8ECoSV3006374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 14 Sep 2012 07:50:28 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]) (using TLSv1) by na3sys009amx172.postini.com ([74.125.148.10]) with SMTP; Fri, 14 Sep 2012 12:50:28 GMT Received: by mail-pb0-f45.google.com with SMTP id rp12so5836930pbb.4 for ; Fri, 14 Sep 2012 05:50:27 -0700 (PDT) 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=komRPipGudKgFfuvhyHK5V4iilsA8y4wfU7rqQ7T7Ss=; b=Hs24w1doaXlESU11fWnsumFT58G79mKZLNrv8iSd2WcpP4F+JGGSANr1oTs2Qgcyzm UiMXP1YW9Gw8kjZ8s8InZN3LmT2utsBfvCMube3Q0YeFxg97NCAc6cto3OZ2tks5Rr1Y HadDr8HMm+5uLOO4nuCZSFWQCHzPIDdAO9o0kJ1ebZJNjy4HEVe1F9f90NoN09wkx0zj PoW+Cs1ADfcbJhCakclIOkiS/zBo9TQFdnyL1nmzDu+0mwbvd4Q52QBqVnYXhE361MzQ Rr93Ug8HIyw3rtE3lkwBTDYTrife1hVTKjqrpaYfjA89Xpu832bLwr5W1F5sKXMZhKMm e0Yw== Received: by 10.66.75.133 with SMTP id c5mr4207712paw.24.1347627027885; Fri, 14 Sep 2012 05:50:27 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id gv1sm939033pbc.38.2012.09.14.05.50.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 05:50:27 -0700 (PDT) From: Prabhakar Lad To: LMML Subject: [PATCH 11/14] dm365: vpss: set vpss clk ctrl Date: Fri, 14 Sep 2012 18:16:41 +0530 Message-ID: <1347626804-5703-12-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1347626804-5703-1-git-send-email-prabhakar.lad@ti.com> References: <1347626804-5703-1-git-send-email-prabhakar.lad@ti.com> X-pstn-levels: (S:44.21902/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 , LKML , Mauro Carvalho Chehab 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+patchwork-davinci=patchwork.kernel.org@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 | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c index 34ad7bd..49bb045 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,21 @@ 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 + 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(0x18, oper_cfg.vpss_regs_base2); + } else { + return -EBUSY; + } return platform_driver_register(&vpss_driver); } subsys_initcall(vpss_init);