From patchwork Tue Apr 28 07:59:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 20349 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3S82MFO015802 for ; Tue, 28 Apr 2009 08:02:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758272AbZD1ICV (ORCPT ); Tue, 28 Apr 2009 04:02:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759357AbZD1ICU (ORCPT ); Tue, 28 Apr 2009 04:02:20 -0400 Received: from wa-out-1112.google.com ([209.85.146.179]:53738 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758272AbZD1ICT (ORCPT ); Tue, 28 Apr 2009 04:02:19 -0400 Received: by wa-out-1112.google.com with SMTP id j5so211615wah.21 for ; Tue, 28 Apr 2009 01:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=Wl3melpd8gj6yIhuAa1IUE0Q9RGZOcK+mOe2LdQgW0k=; b=n1pbg/hVQsb/XinA5iz4AJ8db0LsqmKDXwz8QXT2yp+fZFGLkJQpTPO01qUHABjbKZ gkalqBgvJmCNXIfq8dCc1peTovS/3/XJWGO3KYq+2f6x8V56/JF9j3AZEsa7s+DaeB0y b8bt3Ibi4ePVckdnBkd8NmtymYbwmLVmsEh3U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=c8LlDQK3gzF+jLxVqEuobmENA30xD6TmJ6xSF60xF/Rx87fE9EpSdQwWtdJIE8jMa6 VvbgxU0nPO2aFbfWrBWwAqFRyLAwIpP3+q9elaAp6stSP35qSJaweYq/Q5RKlt5876bM u8xZrpTkQG533TO6KD7P6bNHbc0KdBCGHt3i0= Received: by 10.114.88.1 with SMTP id l1mr2900824wab.9.1240905739385; Tue, 28 Apr 2009 01:02:19 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id n22sm4925567pof.22.2009.04.28.01.02.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 28 Apr 2009 01:02:18 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Tue, 28 Apr 2009 16:59:34 +0900 Message-Id: <20090428075934.16285.38017.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: pass through ioremap() for non-mmu processors Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This patch modifies the ioremap() handling for CONFIG_MMU=n. All 32-bit SuperH processors currently go through __ioremap_mode() and check for IO_TRAPPED and directly mapped segments. With this patch we simplify the MMU less case with a pass through version of __ioremap_mode() which just returns the physical address. The effects of this is change are: - fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT) - IO_TRAPPED is never checked for Signed-off-by: Magnus Damm --- arch/sh/Kconfig | 1 + arch/sh/include/asm/io.h | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/sh/Kconfig +++ work/arch/sh/Kconfig 2009-04-21 15:54:59.000000000 +0900 @@ -136,6 +136,7 @@ config ARCH_HAS_DEFAULT_IDLE config IO_TRAPPED bool + depends on MMU source "init/Kconfig" --- 0001/arch/sh/include/asm/io.h +++ work/arch/sh/include/asm/io.h 2009-04-21 15:18:02.000000000 +0900 @@ -228,12 +228,6 @@ void __iounmap(void __iomem *addr); unsigned long onchip_remap(unsigned long addr, unsigned long size, const char *name); extern void onchip_unmap(unsigned long vaddr); -#else -#define __ioremap(offset, size, flags) ((void __iomem *)(offset)) -#define __iounmap(addr) do { } while (0) -#define onchip_remap(addr, size, name) (addr) -#define onchip_unmap(addr) do { } while (0) -#endif /* CONFIG_MMU */ static inline void __iomem * __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) @@ -269,6 +263,13 @@ __ioremap_mode(unsigned long offset, uns return __ioremap(offset, size, flags); } +#else +#define onchip_remap(addr, size, name) (addr) +#define onchip_unmap(addr) do { } while (0) +#define __ioremap_mode(offset, size, flags) (void __iomem *)(offset) +#define __iounmap(addr) do { } while (0) +#endif /* CONFIG_MMU */ + #define ioremap(offset, size) \ __ioremap_mode((offset), (size), 0) #define ioremap_nocache(offset, size) \