diff options
author | Manjunath Hadli <manjunath.hadli@ti.com> | 2012-08-21 04:50:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 11:04:50 -0500 |
commit | 3de939419cfaf613b87cf89adc5dda97ca1720e0 (patch) | |
tree | ac38e0b713176838c2556fc6963b49f830695662 | |
parent | c1819fc5dbe4582575965e587ba61184ab9b45fa (diff) |
[media] davinci: vpss: dm365: set vpss clk ctrl
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | 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 1c96ce8269d4..e4ad63d15265 100644 --- a/drivers/media/platform/davinci/vpss.c +++ b/drivers/media/platform/davinci/vpss.c | |||
@@ -69,6 +69,11 @@ MODULE_AUTHOR("Texas Instruments"); | |||
69 | #define DM365_ISP5_CCDCMUX 0x20 | 69 | #define DM365_ISP5_CCDCMUX 0x20 |
70 | #define DM365_ISP5_PG_FRAME_SIZE 0x28 | 70 | #define DM365_ISP5_PG_FRAME_SIZE 0x28 |
71 | #define DM365_VPBE_CLK_CTRL 0x00 | 71 | #define DM365_VPBE_CLK_CTRL 0x00 |
72 | |||
73 | #define VPSS_CLK_CTRL 0x01c40044 | ||
74 | #define VPSS_CLK_CTRL_VENCCLKEN BIT(3) | ||
75 | #define VPSS_CLK_CTRL_DACCLKEN BIT(4) | ||
76 | |||
72 | /* | 77 | /* |
73 | * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1, | 78 | * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1, |
74 | * AF - vpss_int3 | 79 | * AF - vpss_int3 |
@@ -112,6 +117,7 @@ struct vpss_hw_ops { | |||
112 | struct vpss_oper_config { | 117 | struct vpss_oper_config { |
113 | __iomem void *vpss_regs_base0; | 118 | __iomem void *vpss_regs_base0; |
114 | __iomem void *vpss_regs_base1; | 119 | __iomem void *vpss_regs_base1; |
120 | resource_size_t *vpss_regs_base2; | ||
115 | enum vpss_platform_type platform; | 121 | enum vpss_platform_type platform; |
116 | spinlock_t vpss_lock; | 122 | spinlock_t vpss_lock; |
117 | struct vpss_hw_ops hw_ops; | 123 | struct vpss_hw_ops hw_ops; |
@@ -492,11 +498,20 @@ static struct platform_driver vpss_driver = { | |||
492 | 498 | ||
493 | static void vpss_exit(void) | 499 | static void vpss_exit(void) |
494 | { | 500 | { |
501 | iounmap(oper_cfg.vpss_regs_base2); | ||
502 | release_mem_region(VPSS_CLK_CTRL, 4); | ||
495 | platform_driver_unregister(&vpss_driver); | 503 | platform_driver_unregister(&vpss_driver); |
496 | } | 504 | } |
497 | 505 | ||
498 | static int __init vpss_init(void) | 506 | static int __init vpss_init(void) |
499 | { | 507 | { |
508 | if (!request_mem_region(VPSS_CLK_CTRL, 4, "vpss_clock_control")) | ||
509 | return -EBUSY; | ||
510 | |||
511 | oper_cfg.vpss_regs_base2 = ioremap(VPSS_CLK_CTRL, 4); | ||
512 | writel(VPSS_CLK_CTRL_VENCCLKEN | | ||
513 | VPSS_CLK_CTRL_DACCLKEN, oper_cfg.vpss_regs_base2); | ||
514 | |||
500 | return platform_driver_register(&vpss_driver); | 515 | return platform_driver_register(&vpss_driver); |
501 | } | 516 | } |
502 | subsys_initcall(vpss_init); | 517 | subsys_initcall(vpss_init); |