diff mbox

[16/20] Get DISPC base addr with platform device

Message ID 1282579089-10487-17-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/dispc.c b/drivers/video/omap2/dss/dispc.c
index ae18b5f..8a7a086 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -40,7 +40,6 @@ 
 #include "dss.h"
 
 /* DISPC */
-#define DISPC_BASE			0x48050400
 
 #define DISPC_SZ_REGS			SZ_1K
 
@@ -3094,6 +3093,7 @@  static void _omap_dispc_initial_config(void)
 int dispc_init(struct platform_device *pdev)
 {
 	u32 rev;
+	struct resource *dispc_mem;
 
 	spin_lock_init(&dispc.irq_lock);
 
@@ -3104,7 +3104,8 @@  int dispc_init(struct platform_device *pdev)
 
 	INIT_WORK(&dispc.error_work, dispc_error_worker);
 
-	dispc.base = ioremap(DISPC_BASE, DISPC_SZ_REGS);
+	dispc_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	dispc.base = ioremap(dispc_mem->start, resource_size(dispc_mem));
 	if (!dispc.base) {
 		DSSERR("can't ioremap DISPC\n");
 		return -ENOMEM;