[PATCH v3 1/2] m68k: mmu: fixed ioremap and iounmap for ColdFire family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes ioremap() and iounmap(), since ColdFire family
is setting IO peripheral memory area into ACR0 (ACR0_MODE, head.S).

---
Changes from v2:
- patch reduced form 3/3 to 2/2

Signed-off-by: Angelo Dureghello <angelo@xxxxxxxx>
---
 arch/m68k/mm/kmap.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index c2a38321c96d..3d51e1993b1a 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -118,6 +118,14 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla
 	if (!size || physaddr > (unsigned long)(-size))
 		return NULL;
 
+#if defined(CONFIG_COLDFIRE)
+	/*
+	 * This ColdFire models maps IO space into ACR0_MODE,
+	 * so they can access IO space directly.
+	 */
+	return (void __iomem *)physaddr;
+#endif
+
 #ifdef CONFIG_AMIGA
 	if (MACH_IS_AMIGA) {
 		if ((physaddr >= 0x40000000) && (physaddr + size < 0x60000000)
@@ -229,6 +237,13 @@ EXPORT_SYMBOL(__ioremap);
  */
 void iounmap(void __iomem *addr)
 {
+#if defined(CONFIG_COLDFIRE)
+	/*
+	 * No virtual io_area is allocated for ColdFire family.
+	 */
+	return;
+#endif
+
 #ifdef CONFIG_AMIGA
 	if ((!MACH_IS_AMIGA) ||
 	    (((unsigned long)addr < 0x40000000) ||
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux