diff mbox

[19/20] Get RFBI baseaddr with platform device

Message ID 1282579089-10487-20-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/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index fe4f423..690f7bf 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -36,7 +36,6 @@ 
 #include <plat/display.h>
 #include "dss.h"
 
-#define RFBI_BASE               0x48050800
 
 struct rfbi_reg { u16 idx; };
 
@@ -961,6 +960,7 @@  int rfbi_init(struct platform_device *pdev)
 {
 	u32 rev;
 	u32 l;
+	struct resource *rfbi_mem;
 
 	spin_lock_init(&rfbi.cmd_lock);
 
@@ -968,7 +968,8 @@  int rfbi_init(struct platform_device *pdev)
 	atomic_set(&rfbi.cmd_fifo_full, 0);
 	atomic_set(&rfbi.cmd_pending, 0);
 
-	rfbi.base = ioremap(RFBI_BASE, SZ_256);
+	rfbi_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	rfbi.base = ioremap(rfbi_mem->start, resource_size(rfbi_mem));
 	if (!rfbi.base) {
 		DSSERR("can't ioremap RFBI\n");
 		return -ENOMEM;