mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prabhakar Lad <prabhakar.csengg@gmail.com>
To: LMML <linux-media@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	Manjunath Hadli <manjunath.hadli@ti.com>,
	"Lad, Prabhakar" <prabhakar.lad@ti.com>
Subject: [PATCH 11/14] dm365: vpss: set vpss clk ctrl
Date: Fri, 14 Sep 2012 18:16:41 +0530	[thread overview]
Message-ID: <1347626804-5703-12-git-send-email-prabhakar.lad@ti.com> (raw)
In-Reply-To: <1347626804-5703-1-git-send-email-prabhakar.lad@ti.com>

From: Manjunath Hadli <manjunath.hadli@ti.com>

request_mem_region for VPSS_CLK_CTRL register and ioremap.
and enable clocks appropriately.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
---
 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);
-- 
1.7.4.1


  parent reply	other threads:[~2012-09-14 12:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 12:46 [PATCH 00/14] Media Controller capture driver for DM365 Prabhakar Lad
2012-09-14 12:46 ` [PATCH 01/14] davinci: vpfe: add dm3xx IPIPEIF hardware support module Prabhakar Lad
2012-09-19 22:01   ` Laurent Pinchart
2012-09-22  5:08     ` Prabhakar Lad
2012-09-14 12:46 ` [PATCH 02/14] davinci: vpfe: add IPIPE hardware layer support Prabhakar Lad
2012-09-23 14:36   ` Sakari Ailus
2012-09-24  4:59     ` Prabhakar Lad
2012-09-14 12:46 ` [PATCH 03/14] davinci: vpfe: add IPIPE support for media controller driver Prabhakar Lad
2012-09-14 12:46 ` [PATCH 04/14] davinci: vpfe: add support for CCDC hardware for dm365 Prabhakar Lad
2012-09-14 12:46 ` [PATCH 05/14] davinci: vpfe: add ccdc driver with media controller interface Prabhakar Lad
2012-09-14 12:46 ` [PATCH 06/14] davinci: vpfe: add v4l2 video driver support Prabhakar Lad
2012-09-14 13:30   ` Hans Verkuil
2012-09-22  5:03     ` Prabhakar Lad
2012-09-14 12:46 ` [PATCH 07/14] davinci: vpfe: v4l2 capture driver with media interface Prabhakar Lad
2012-09-14 12:46 ` [PATCH 08/14] davinci: vpfe: previewer driver based on v4l2 media controller framework Prabhakar Lad
2012-09-14 12:46 ` [PATCH 09/14] davinci: vpfe: resizer driver based on media framework Prabhakar Lad
2012-09-14 12:46 ` [PATCH 10/14] dm365: vpss: setup ISP registers Prabhakar Lad
2012-09-14 12:46 ` Prabhakar Lad [this message]
2012-09-14 12:46 ` [PATCH 12/14] dm365: vpss: add vpss helper functions to be used in the main driver for setting hardware parameters Prabhakar Lad
2012-09-14 12:46 ` [PATCH 13/14] davinci: vpfe: build infrastructure for dm365 Prabhakar Lad
2012-09-14 12:46 ` [PATCH 14/14] [media] davinci: vpfe: Add documentation Prabhakar Lad
2012-09-23 15:16 ` [PATCH 00/14] Media Controller capture driver for DM365 Sakari Ailus
2012-09-24  4:49   ` Prabhakar Lad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347626804-5703-12-git-send-email-prabhakar.lad@ti.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=manjunath.hadli@ti.com \
    --cc=mchehab@infradead.org \
    --cc=prabhakar.lad@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®