From patchwork Fri Mar 2 03:13:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 144128 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 217101007D6 for ; Fri, 2 Mar 2012 14:17:34 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1S3Iwy-0005XU-OD; Fri, 02 Mar 2012 03:14:32 +0000 Received: from mail-gy0-f177.google.com ([209.85.160.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1S3IwY-0005T8-Mj for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2012 03:14:07 +0000 Received: by mail-gy0-f177.google.com with SMTP id f11so680139ghb.36 for ; Thu, 01 Mar 2012 19:14:06 -0800 (PST) Received-SPF: pass (google.com: domain of robherring2@gmail.com designates 10.236.200.230 as permitted sender) client-ip=10.236.200.230; Authentication-Results: mr.google.com; spf=pass (google.com: domain of robherring2@gmail.com designates 10.236.200.230 as permitted sender) smtp.mail=robherring2@gmail.com; dkim=pass header.i=robherring2@gmail.com Received: from mr.google.com ([10.236.200.230]) by 10.236.200.230 with SMTP id z66mr11311853yhn.20.1330658046592 (num_hops = 1); Thu, 01 Mar 2012 19:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=0DqW4DSMKW1I0JcFy0eEaqxOB7ZfRWF+o35R2To0jRg=; b=KijRispai9JlkPTrYDBj0etlvwqCNVWA0eZdENfbtrgXWwB0HuF1ldzXybKxauIWRi XW/bdy3aRaJtthG1OONbDecQ9Hoa7JtzJMQB/sHvIgmLTTpdKmpR20B4X2403xw0fOEr miw2pTEA/tKT1FJzp9BnSftwC5JVAG+Fn1J0VyB3NPM0oovyg5QFurcoa82EJAe9O5Jd Tq5EdjsHIsHfSaoh6vE6C2YVXkAxNC2E1iaB+ZMLakRIj1DWcABgzod5R61eGY9LWjLo k65qyw/qkpiV6hOBSqWRWFZWJ+ywQYuhazT7rsa0HpWbgvAYLQsWP7drjkx/NlPt0QMo 0RTg== Received: by 10.236.200.230 with SMTP id z66mr8928671yhn.20.1330658046505; Thu, 01 Mar 2012 19:14:06 -0800 (PST) Received: from rob-laptop.grandecom.net (65-36-72-55.dyn.grandenetworks.net. [65.36.72.55]) by mx.google.com with ESMTPS id w44sm10189355yhk.17.2012.03.01.19.14.04 (version=SSLv3 cipher=OTHER); Thu, 01 Mar 2012 19:14:05 -0800 (PST) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 03/30] ARM: imx: convert to common runtime ioremap hook Date: Thu, 1 Mar 2012 21:13:15 -0600 Message-Id: <1330658022-14559-4-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1330658022-14559-1-git-send-email-robherring2@gmail.com> References: <1330658022-14559-1-git-send-email-robherring2@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Russell King , Arnd Bergmann , Nicolas Pitre , Rob Herring , Sascha Hauer , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Rob Herring Convert i.MX platforms to use the common run-time ioremap hook instead of the imx specific hook. Also, move addr_in_module out of io.h. Signed-off-by: Rob Herring Cc: Sascha Hauer --- arch/arm/mach-imx/mm-imx3.c | 4 ++-- arch/arm/plat-mxc/include/mach/hardware.h | 3 +++ arch/arm/plat-mxc/include/mach/io.h | 17 ----------------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 8404ee7..9db7c8d 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -132,7 +132,7 @@ void __init imx31_init_early(void) { mxc_set_cpu_type(MXC_CPU_MX31); mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); - imx_ioremap = imx3_ioremap; + arch_ioremap = imx3_ioremap; arm_pm_idle = imx3_idle; } @@ -196,7 +196,7 @@ void __init imx35_init_early(void) mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); arm_pm_idle = imx3_idle; - imx_ioremap = imx3_ioremap; + arch_ioremap = imx3_ioremap; } void __init mx35_init_irq(void) diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index a599f01..ca06a68 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h @@ -28,6 +28,9 @@ #define IOMEM(addr) ((void __force __iomem *)(addr)) #endif +#define addr_in_module(addr, mod) \ + ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE) + #define IMX_IO_P2V_MODULE(addr, module) \ (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \ (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0) diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h index 338300b..ea9d95e 100644 --- a/arch/arm/plat-mxc/include/mach/io.h +++ b/arch/arm/plat-mxc/include/mach/io.h @@ -14,23 +14,6 @@ /* Allow IO space to be anywhere in the memory */ #define IO_SPACE_LIMIT 0xffffffff -#define __arch_ioremap __imx_ioremap -#define __arch_iounmap __iounmap - -#define addr_in_module(addr, mod) \ - ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE) - -extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int); - -static inline void __iomem * -__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) -{ - if (imx_ioremap != NULL) - return imx_ioremap(phys_addr, size, mtype); - else - return __arm_ioremap(phys_addr, size, mtype); -} - /* io address mapping macro */ #define __io(a) __typesafe_io(a)