The arch/m68k/include/asm/ide.h produces errors when the IDE driver is compiled 
for my 523x uClinux system under kernel. The header makes some redefines of 
operators not defined in the arch/m68k/include/asm/io_no.h header. There are no 
separate mmio and iospace defines.

This solution follows the convention used for other mmu/nommu headers in the 
m68k arch.

Signed-off-by: Jate Sujjavanich <jsujjavan...@syntech-fuelmaster.com>



diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h
index 3958726..ed40426 100644
--- a/arch/m68k/include/asm/ide.h
+++ b/arch/m68k/include/asm/ide.h
@@ -1,57 +1,9 @@
 /*
- *  linux/include/asm-m68k/ide.h
- *
- *  Copyright (C) 1994-1996  Linus Torvalds & authors
+ *  arch/m68k/include/ide.h
  */
 
-/* Copyright(c) 1996 Kars de Jong */
-/* Based on the ide driver from 1.2.13pl8 */
-
-/*
- * Credits (alphabetical):
- *
- *  - Bjoern Brauel
- *  - Kars de Jong
- *  - Torsten Ebeling
- *  - Dwight Engen
- *  - Thorsten Floeck
- *  - Roman Hodek
- *  - Guenther Kelleter
- *  - Chris Lawrence
- *  - Michael Rausch
- *  - Christian Sauer
- *  - Michael Schmitz
- *  - Jes Soerensen
- *  - Michael Thurm
- *  - Geert Uytterhoeven
- */
-
-#ifndef _M68K_IDE_H
-#define _M68K_IDE_H
-
-#ifdef __KERNEL__
-#include <asm/setup.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-
-/*
- * Get rid of defs from io.h - ide has its private and conflicting versions
- * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
- * always use the `raw' MMIO versions
- */
-#undef readb
-#undef readw
-#undef writeb
-#undef writew
-
-#define readb                          in_8
-#define readw                          in_be16
-#define __ide_mm_insw(port, addr, n)   raw_insw((u16 *)port, addr, n)
-#define __ide_mm_insl(port, addr, n)   raw_insl((u32 *)port, addr, n)
-#define writeb(val, port)              out_8(port, val)
-#define writew(val, port)              out_be16(port, val)
-#define __ide_mm_outsw(port, addr, n)  raw_outsw((u16 *)port, addr, n)
-#define __ide_mm_outsl(port, addr, n)  raw_outsl((u32 *)port, addr, n)
-
-#endif /* __KERNEL__ */
-#endif /* _M68K_IDE_H */
+#ifdef __uClinux__
+#include "ide_no.h"
+#else
+#include "ide_mm.h"
+#endif
diff --git a/arch/m68k/include/asm/ide_mm.h b/arch/m68k/include/asm/ide_mm.h
new file mode 100644
index 0000000..4914d9a
--- /dev/null
+++ b/arch/m68k/include/asm/ide_mm.h
@@ -0,0 +1,57 @@
+/*
+ *  arch/m68k/include/ide-mm.h
+ *
+ *  Copyright (C) 1994-1996  Linus Torvalds & authors
+ */
+
+/* Copyright(c) 1996 Kars de Jong */
+/* Based on the ide driver from 1.2.13pl8 */
+
+/*
+ * Credits (alphabetical):
+ *
+ *  - Bjoern Brauel
+ *  - Kars de Jong
+ *  - Torsten Ebeling
+ *  - Dwight Engen
+ *  - Thorsten Floeck
+ *  - Roman Hodek
+ *  - Guenther Kelleter
+ *  - Chris Lawrence
+ *  - Michael Rausch
+ *  - Christian Sauer
+ *  - Michael Schmitz
+ *  - Jes Soerensen
+ *  - Michael Thurm
+ *  - Geert Uytterhoeven
+ */
+
+#ifndef _M68K_IDE_H
+#define _M68K_IDE_H
+
+#ifdef __KERNEL__
+#include <asm/setup.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+/*
+ * Get rid of defs from io.h - ide has its private and conflicting versions
+ * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
+ * always use the `raw' MMIO versions
+ */
+#undef readb
+#undef readw
+#undef writeb
+#undef writew
+
+#define readb                          in_8
+#define readw                          in_be16
+#define __ide_mm_insw(port, addr, n)   raw_insw((u16 *)port, addr, n)
+#define __ide_mm_insl(port, addr, n)   raw_insl((u32 *)port, addr, n)
+#define writeb(val, port)              out_8(port, val)
+#define writew(val, port)              out_be16(port, val)
+#define __ide_mm_outsw(port, addr, n)  raw_outsw((u16 *)port, addr, n)
+#define __ide_mm_outsl(port, addr, n)  raw_outsl((u32 *)port, addr, n)
+
+#endif /* __KERNEL__ */
+#endif /* _M68K_IDE_H */
diff --git a/arch/m68k/include/asm/ide_no.h b/arch/m68k/include/asm/ide_no.h
new file mode 100644
index 0000000..59afc80
--- /dev/null
+++ b/arch/m68k/include/asm/ide_no.h
@@ -0,0 +1,43 @@
+/*
+ *  arch/m68k/include/ide-no.h
+ *
+ *  Copyright (C) 1994-1996  Linus Torvalds & authors
+ */
+
+/* Copyright(c) 1996 Kars de Jong */
+/* Based on the ide driver from 1.2.13pl8 */
+
+/*
+ * Credits (alphabetical):
+ *
+ *  - Bjoern Brauel
+ *  - Kars de Jong
+ *  - Torsten Ebeling
+ *  - Dwight Engen
+ *  - Thorsten Floeck
+ *  - Roman Hodek
+ *  - Guenther Kelleter
+ *  - Chris Lawrence
+ *  - Michael Rausch
+ *  - Christian Sauer
+ *  - Michael Schmitz
+ *  - Jes Soerensen
+ *  - Michael Thurm
+ *  - Geert Uytterhoeven
+ */
+
+#ifndef _M68K_IDE_NO_H
+#define _M68K_IDE_NO_H
+
+#ifdef __KERNEL__
+#include <asm/setup.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#define __ide_mm_insw(port, addr, n)   io_insw((unsigned int)port, addr, n)
+#define __ide_mm_insl(port, addr, n)   io_insl((unsigned int)port, addr, n)
+#define __ide_mm_outsw(port, addr, n)  io_outsw((unsigned int)port, addr, n)
+#define __ide_mm_outsl(port, addr, n)  io_outsl((unsigned int)port, addr, n)
+
+#endif /* __KERNEL__ */
+#endif /* _M68K_IDE_NO_H */
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to