From patchwork Mon Jan 17 14:15:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manjunath Hadli X-Patchwork-Id: 483751 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0HEFOWs023345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jan 2011 14:15:50 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p0HEFOlg001881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 17 Jan 2011 08:15:24 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p0HEFOC3008639 for ; Mon, 17 Jan 2011 08:15:24 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 3B47B80667 for ; Mon, 17 Jan 2011 08:15:22 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 8F0EF80627 for ; Mon, 17 Jan 2011 08:15:15 -0600 (CST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p0HEFDtk014453; Mon, 17 Jan 2011 19:45:13 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id p0HEFDVq015329; Mon, 17 Jan 2011 19:45:13 +0530 Received: (from x0144960@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id p0HEFDqt015326; Mon, 17 Jan 2011 19:45:13 +0530 From: Manjunath Hadli To: LMML , LAK , Kevin Hilman Subject: [PATCH v15 3/3] davinci vpbe: changes to common files Date: Mon, 17 Jan 2011 19:45:13 +0530 Message-Id: <1295273713-15289-1-git-send-email-manjunath.hadli@ti.com> X-Mailer: git-send-email 1.6.2.4 Cc: dlos , Mauro Carvalho Chehab X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 17 Jan 2011 14:15:51 +0000 (UTC) diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 1d25573..fa7152d 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c @@ -111,7 +111,9 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) if (ret != 0) goto err; } - + davinci_sysmodbase = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, 0x800); + if (!davinci_sysmodbase) + return; return; err: diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 22ebc64..2bff2d6 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c @@ -33,6 +33,8 @@ #define DM365_MMCSD0_BASE 0x01D11000 #define DM365_MMCSD1_BASE 0x01D00000 +void __iomem *davinci_sysmodbase; + static struct resource i2c_resources[] = { { .start = DAVINCI_I2C_BASE, @@ -209,9 +211,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) davinci_cfg_reg(DM355_SD1_DATA2); davinci_cfg_reg(DM355_SD1_DATA3); } else if (cpu_is_davinci_dm365()) { - void __iomem *pupdctl1 = - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c); - + void __iomem *pupdctl1 = DAVINCI_SYSMODULE_VIRT(0x7c); /* Configure pull down control */ __raw_writel((__raw_readl(pupdctl1) & ~0xfc0), pupdctl1); @@ -243,9 +243,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0; } else if (cpu_is_davinci_dm644x()) { /* REVISIT: should this be in board-init code? */ - void __iomem *base = - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); - + void __iomem *base = DAVINCI_SYSMODULE_VIRT(0); /* Power-on 3.3V IO cells */ __raw_writel(0, base + DM64XX_VDD3P3V_PWDN); /*Set up the pull regiter for MMC */ diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h index c45ba1f..5a105c4 100644 --- a/arch/arm/mach-davinci/include/mach/hardware.h +++ b/arch/arm/mach-davinci/include/mach/hardware.h @@ -24,6 +24,11 @@ /* System control register offsets */ #define DM64XX_VDD3P3V_PWDN 0x48 +#ifndef __ASSEMBLER__ + extern void __iomem *davinci_sysmodbase; + #define DAVINCI_SYSMODULE_VIRT(x) (davinci_sysmodbase+(x)) +#endif + /* * I/O mapping */