From patchwork Wed Apr 29 14:44:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 20727 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 n3TElIGI006836 for ; Wed, 29 Apr 2009 14:47:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751407AbZD2OrQ (ORCPT ); Wed, 29 Apr 2009 10:47:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752151AbZD2OrQ (ORCPT ); Wed, 29 Apr 2009 10:47:16 -0400 Received: from rv-out-0506.google.com ([209.85.198.227]:28386 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbZD2OrP (ORCPT ); Wed, 29 Apr 2009 10:47:15 -0400 Received: by rv-out-0506.google.com with SMTP id f6so2327546rvb.5 for ; Wed, 29 Apr 2009 07:47:15 -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=T2pvvXyScHBtKMrcb7lK4pGzl7prMkL6VqikPFVqIws=; b=Teczdjh5xpBWk+7AflsEMEyoqwTRpk9T5s5ZcnkiwsmhDMjmacr2/PmPBHnpfuEJTH RznIynJTj/qE3BL2ZPNE/Wt0mkwqEbJhxx1yqUdnGiu8cGsMzmhesJWQeAIT0TAjgO8K b2Ri4tCWqQSVWTezBFhReZi9OxCqOvrlIUCXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=jTBCoBnvbDUfdTLybMHXsW9RcVjAvBYs8235yqc7u/MMbUdDgcAQa1RPYl/FMNjbsr qm9y1wD5A4u0SxZW68ACtHuIzfMJtowU55gZvdc6XcyLZ8D0DLCUm8Ste8qVrCwd2U8K XOx2MecPhs5ARISQov7Tb5lC9hS9tUiPYZvls= Received: by 10.114.125.15 with SMTP id x15mr276133wac.217.1241016435176; Wed, 29 Apr 2009 07:47:15 -0700 (PDT) Received: from rx1.opensource.se (210-227-008-067.jp.fiberbit.net [210.227.8.67]) by mx.google.com with ESMTPS id n30sm1479641wag.63.2009.04.29.07.47.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 29 Apr 2009 07:47:14 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Wed, 29 Apr 2009 23:44:28 +0900 Message-Id: <20090429144428.15872.69452.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: pass through ioremap() for non-mmu processors V2 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This is V2 of the CONFIG_MMU=n pass through ioremap() patch. 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) - make sure IO_TRAPPED is not selected Signed-off-by: Magnus Damm --- Changes since V1: - rework Kconfig bits arch/sh/boards/Kconfig | 6 +++--- arch/sh/include/asm/io.h | 13 +++++++------ 2 files changed, 10 insertions(+), 9 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/boards/Kconfig +++ work/arch/sh/boards/Kconfig 2009-04-28 18:07:39.000000000 +0900 @@ -121,7 +121,7 @@ config SH_RTS7751R2D bool "RTS7751R2D" depends on CPU_SUBTYPE_SH7751R select SYS_SUPPORTS_PCI - select IO_TRAPPED + select IO_TRAPPED if MMU help Select RTS7751R2D if configuring for a Renesas Technology Sales SH-Graphics board. @@ -145,13 +145,13 @@ config SH_HIGHLANDER bool "Highlander" depends on CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785 select SYS_SUPPORTS_PCI - select IO_TRAPPED + select IO_TRAPPED if MMU config SH_SH7785LCR bool "SH7785LCR" depends on CPU_SUBTYPE_SH7785 select SYS_SUPPORTS_PCI - select IO_TRAPPED + select IO_TRAPPED if MMU config SH_SH7785LCR_29BIT_PHYSMAPS bool "SH7785LCR 29bit physmaps" --- 0001/arch/sh/include/asm/io.h +++ work/arch/sh/include/asm/io.h 2009-04-28 12:40:43.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) \