Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Manjunath Hadli and committed by
Mauro Carvalho Chehab
3de93941 c1819fc5

+15
+15
drivers/media/platform/davinci/vpss.c
··· 69 69 #define DM365_ISP5_CCDCMUX 0x20 70 70 #define DM365_ISP5_PG_FRAME_SIZE 0x28 71 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 78 * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1, 74 79 * AF - vpss_int3 ··· 117 112 struct vpss_oper_config { 118 113 __iomem void *vpss_regs_base0; 119 114 __iomem void *vpss_regs_base1; 115 + resource_size_t *vpss_regs_base2; 120 116 enum vpss_platform_type platform; 121 117 spinlock_t vpss_lock; 122 118 struct vpss_hw_ops hw_ops; ··· 498 492 499 493 static void vpss_exit(void) 500 494 { 495 + iounmap(oper_cfg.vpss_regs_base2); 496 + release_mem_region(VPSS_CLK_CTRL, 4); 501 497 platform_driver_unregister(&vpss_driver); 502 498 } 503 499 504 500 static int __init vpss_init(void) 505 501 { 502 + if (!request_mem_region(VPSS_CLK_CTRL, 4, "vpss_clock_control")) 503 + return -EBUSY; 504 + 505 + oper_cfg.vpss_regs_base2 = ioremap(VPSS_CLK_CTRL, 4); 506 + writel(VPSS_CLK_CTRL_VENCCLKEN | 507 + VPSS_CLK_CTRL_DACCLKEN, oper_cfg.vpss_regs_base2); 508 + 506 509 return platform_driver_register(&vpss_driver); 507 510 } 508 511 subsys_initcall(vpss_init);