RE: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

2010-06-21 Thread Jate Sujjavanich
Resubmission:





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.

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..492fee8 100644
--- a/arch/m68k/include/asm/ide.h
+++ b/arch/m68k/include/asm/ide.h
@@ -1,6 +1,4 @@
 /*
- *  linux/include/asm-m68k/ide.h
- *
  *  Copyright (C) 1994-1996  Linus Torvalds  authors
  */
 
@@ -34,6 +32,8 @@
 #include asm/io.h
 #include asm/irq.h
 
+#ifdef CONFIG_MMU
+
 /*
  * 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
@@ -53,5 +53,14 @@
 #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)
 
+#else
+
+#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 /* CONFIG_MMU */
+
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */





-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Sam Ravnborg
Sent: Friday, June 11, 2010 12:10 PM
To: uClinux development list
Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

On Fri, Jun 11, 2010 at 10:05:27AM -0400, Jate Sujjavanich wrote:
 
 
 -Original Message-
 From: uclinux-dev-boun...@uclinux.org 
 [mailto:uclinux-dev-boun...@uclinux.org] On Behalf Of Sam Ravnborg
 Sent: Monday, June 07, 2010 12:09 PM
 To: uClinux development list
 Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu
 
 - *  linux/include/asm-m68k/ide.h
 + *  arch/m68k/include/ide.h
 Would be nice if you could remove this redundant filename.
 Sure. Should the copyright comments remain?

Yes - please keep these (if they are relevant for the code in question).
If you are in daught keep them.

Sam
___
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

 
 

This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals  computer 
viruses.




___
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


Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

2010-06-21 Thread Greg Ungerer


Hi Jate,

Jate Sujjavanich wrote:

Resubmission:


Applied to for-linus branch of m68knommu git tree.

Thanks
Greg




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.

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..492fee8 100644
--- a/arch/m68k/include/asm/ide.h
+++ b/arch/m68k/include/asm/ide.h
@@ -1,6 +1,4 @@
 /*
- *  linux/include/asm-m68k/ide.h
- *
  *  Copyright (C) 1994-1996  Linus Torvalds  authors
  */
 
@@ -34,6 +32,8 @@

 #include asm/io.h
 #include asm/irq.h
 
+#ifdef CONFIG_MMU

+
 /*
  * 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
@@ -53,5 +53,14 @@
 #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)
 
+#else

+
+#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 /* CONFIG_MMU */
+
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */





-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Sam Ravnborg
Sent: Friday, June 11, 2010 12:10 PM
To: uClinux development list
Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

On Fri, Jun 11, 2010 at 10:05:27AM -0400, Jate Sujjavanich wrote:


-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Sam Ravnborg
Sent: Monday, June 07, 2010 12:09 PM
To: uClinux development list
Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu


- *  linux/include/asm-m68k/ide.h
+ *  arch/m68k/include/ide.h

Would be nice if you could remove this redundant filename.

Sure. Should the copyright comments remain?


Yes - please keep these (if they are relevant for the code in question).
If you are in daught keep them.

Sam
___
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

 
 


This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals  computer 
viruses.




___
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




--

Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
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


RE: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

2010-06-11 Thread Jate Sujjavanich


-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Sam Ravnborg
Sent: Monday, June 07, 2010 12:09 PM
To: uClinux development list
Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

Sure. Should the copyright comments remain?

- Jate


On Mon, Jun 07, 2010 at 11:39:30AM -0400, Jate Sujjavanich wrote:
 Sounds good. Therefore, the patch becomes:
 
 diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h
 index 3958726..80e3e87 100644
 --- a/arch/m68k/include/asm/ide.h
 +++ b/arch/m68k/include/asm/ide.h
 @@ -1,5 +1,5 @@
  /*
 - *  linux/include/asm-m68k/ide.h
 + *  arch/m68k/include/ide.h

Would be nice if you could remove this redundant filename.

Sam
___
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

 
 

This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals  computer 
viruses.




___
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


Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

2010-06-11 Thread Sam Ravnborg
On Fri, Jun 11, 2010 at 10:05:27AM -0400, Jate Sujjavanich wrote:
 
 
 -Original Message-
 From: uclinux-dev-boun...@uclinux.org 
 [mailto:uclinux-dev-boun...@uclinux.org] On Behalf Of Sam Ravnborg
 Sent: Monday, June 07, 2010 12:09 PM
 To: uClinux development list
 Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu
 
 - *  linux/include/asm-m68k/ide.h
 + *  arch/m68k/include/ide.h
 Would be nice if you could remove this redundant filename.
 Sure. Should the copyright comments remain?

Yes - please keep these (if they are relevant for the code in question).
If you are in daught keep them.

Sam
___
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


RE: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

2010-06-03 Thread Jate Sujjavanich
Here's a resubmission.



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 000..11c2ee6
--- /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_MM_IDE_H
+#define _M68K_MM_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 000..d32919c
--- /dev/null
+++ b/arch/m68k/include/asm/ide_no.h
@@ -0,0 +1,20 @@
+/*
+ *  arch/m68k/include/ide-no.h
+ *
+ */
+
+#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 */

-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Geert Uytterhoeven
Sent: Thursday, June 03, 2010 1:23 AM
To: uClinux development list
Subject: Re: [uClinux-dev] [PATCH] arch/m68k/ide.h fix for nommu

On Thu, Jun 3, 2010 at 00:01, Jate Sujjavanich
jsujjavan...@syntech