diff mbox

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

Message ID 1282579089-10487-18-git-send-email-svadivu@ti.com (mailing list archive)
State Changes Requested
Delegated to: Kevin Hilman
Headers show

Commit Message

Senthilvadivu Guruswamy Aug. 23, 2010, 3:58 p.m. UTC
None
diff mbox

Patch

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;