From patchwork Wed Nov 28 10:55:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1815671 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by patchwork1.kernel.org (Postfix) with ESMTP id CE1383FC54 for ; Wed, 28 Nov 2012 11:01:24 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qASAuxl9014384; Wed, 28 Nov 2012 04:56:59 -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 qASAuwjs026161; Wed, 28 Nov 2012 04:56:58 -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; Wed, 28 Nov 2012 04:56:58 -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 qASAuwYd008137; Wed, 28 Nov 2012 04:56:58 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id AF1DA80627; Wed, 28 Nov 2012 04:56:58 -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 4273880626 for ; Wed, 28 Nov 2012 04:55:58 -0600 (CST) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id qASAtwth000200 for ; Wed, 28 Nov 2012 04:55:58 -0600 (CST) Received: from psmtp.com (na3sys009amx195.postini.com [74.125.149.176]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id qASAtvdi006053 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 28 Nov 2012 04:55:57 -0600 Received: from mail-pa0-f45.google.com ([209.85.220.45]) (using TLSv1) by na3sys009amx195.postini.com ([74.125.148.10]) with SMTP; Wed, 28 Nov 2012 04:55:57 CST Received: by mail-pa0-f45.google.com with SMTP id bg2so6772032pad.4 for ; Wed, 28 Nov 2012 02:55:57 -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=MVZePimOW8UKBXMS/VXqjsED7tQP6ow4Ldhq85yZPRbekvI3zzkgYsJYjqwsGRLauY Y0eb/CINemBRug/rnDw5QiIFJFkW5Vr+rUUzux5cSbdIWB8ec1+T4V9B7R/dTsEgr2ZG 5cJcWPdQ8ylku17E+jyT1U36bfONSoVxzTN1BbvFDjIFg0xlXCXaA0xlHixaf0yV5/7d 5RNRsH/fOAsB3ufutcljD2+NRYlMs7UjNJ4YRQQWSrWze4mB5vJXVinJhJGCnhP14Krj rLP7FdZIlc9BGDpNsmKT+2WkKU/hZWQNzV8Hnk/ilCKeVrm/ullVdabzsqugXImHYnK3 +DKw== Received: by 10.66.79.166 with SMTP id k6mr51372893pax.25.1354100157118; Wed, 28 Nov 2012 02:55:57 -0800 (PST) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id nm9sm12280572pbc.46.2012.11.28.02.55.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Nov 2012 02:55:56 -0800 (PST) From: Prabhakar Lad To: LMML , Mauro Carvalho Chehab Subject: [PATCH v3 2/3] davinci: vpss: dm365: set vpss clk ctrl Date: Wed, 28 Nov 2012 16:25:33 +0530 Message-ID: <1354100134-21095-3-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1354100134-21095-1-git-send-email-prabhakar.lad@ti.com> References: <1354100134-21095-1-git-send-email-prabhakar.lad@ti.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:37.59508/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 , Sakari Ailus , Hans Verkuil 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);