[PATCH 17/20] Get VENC base addr from platform device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Senthilvadivu Guruswamy <svadivu@xxxxxx>

VENC base addr got from platform device.  Hardcoding
of base addr removed.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@xxxxxx>
---
 drivers/video/omap2/dss/venc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 576f0df..e618b09 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -39,7 +39,6 @@
 
 #include "dss.h"
 
-#define VENC_BASE	0x48050C00
 
 /* Venc registers */
 #define VENC_REV_ID				0x00
@@ -659,13 +658,15 @@ struct regulator *dss_get_vdda_dac(void)
 int venc_init(struct platform_device *pdev)
 {
 	u8 rev_id;
+	struct resource *venc_mem;
 
 	mutex_init(&venc.venc_lock);
 
 	venc.pdev = pdev;
 	venc.wss_data = 0;
 
-	venc.base = ioremap(VENC_BASE, SZ_1K);
+	venc_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	venc.base = ioremap(venc_mem->start, resource_size(venc_mem));
 	if (!venc.base) {
 		DSSERR("can't ioremap VENC\n");
 		return -ENOMEM;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux