@@ -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;