]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: define MAX_HWIFS in <linux/ide.h>
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 24 Jul 2008 20:53:30 +0000 (22:53 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 24 Jul 2008 20:53:30 +0000 (22:53 +0200)
* Now that ide_hwif_t instances are allocated dynamically
  the difference between MAX_HWIFS == 2 and MAX_HWIFS == 10
  is ~100 bytes (x86-32) so use MAX_HWIFS == 10 on all archs
  except these ones that use MAX_HWIFS == 1.

* Define MAX_HWIFS in <linux/ide.h> instead of <asm/ide.h>.

[ Please note that avr32/cris/v850 have no <asm/ide.h>
  and alpha/ia64/sh always define CONFIG_IDE_MAX_HWIFS. ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
14 files changed:
include/asm-arm/ide.h
include/asm-blackfin/ide.h
include/asm-frv/ide.h
include/asm-h8300/ide.h
include/asm-m32r/ide.h
include/asm-m68k/ide.h
include/asm-mips/mach-generic/ide.h
include/asm-mn10300/ide.h
include/asm-parisc/ide.h
include/asm-powerpc/ide.h
include/asm-sparc/ide.h
include/asm-x86/ide.h
include/asm-xtensa/ide.h
include/linux/ide.h

index 88f4d231ce4f2579a27cfb9daba5bb824b6c6664..a48019f99d08acd160a2dd098c960dc4c5cdac2a 100644 (file)
 
 #ifdef __KERNEL__
 
-#ifndef MAX_HWIFS
-#define MAX_HWIFS      4
-#endif
-
 #define __ide_mm_insw(port,addr,len)   readsw(port,addr,len)
 #define __ide_mm_insl(port,addr,len)   readsl(port,addr,len)
 #define __ide_mm_outsw(port,addr,len)  writesw(port,addr,len)
index 5b88de115bf418acaf476d090ae656fd22c3eb1a..90bc50bd22e9f63d1e7198d3e1bb52597eda2927 100644 (file)
@@ -17,8 +17,6 @@
 #ifdef __KERNEL__
 /****************************************************************************/
 
-#define MAX_HWIFS      1
-
 #include <asm-generic/ide_iops.h>
 
 /****************************************************************************/
index 8c9a540d434431138deb74ee9f7558b660e9b197..7ebcc56a22291edb6388332d16f84686c1542e61 100644 (file)
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#ifndef MAX_HWIFS
-#define MAX_HWIFS 8
-#endif
-
 /****************************************************************************/
 /*
  * some bits needed for parts of the IDE subsystem to compile
index f8535ce7476e4cb7146b0d9cae054d55c2e986df..8f79ba2ff929d66d856dc3d693ef4b920fbc641c 100644 (file)
@@ -16,8 +16,6 @@
 #ifdef __KERNEL__
 /****************************************************************************/
 
-#define MAX_HWIFS      1
-
 #include <asm-generic/ide_iops.h>
 
 /****************************************************************************/
index 72798d624221f0207405911769f3e279b133595b..d755d41b99310f85e05d2a5d47e7c41bb945c662 100644 (file)
 
 #include <asm/m32r.h>
 
-#ifndef MAX_HWIFS
-# ifdef CONFIG_BLK_DEV_IDEPCI
-#define MAX_HWIFS      10
-# else
-#define MAX_HWIFS      2
-# endif
-#endif
-
 static __inline__ int ide_default_irq(unsigned long base)
 {
        switch (base) {
index 909c6dfd3851169dae42ac87613a70fc912ece34..1daf6cbdd9f0de3d9b3ae515dd939e887b7dd1e7 100644 (file)
 #include <asm/macints.h>
 #endif
 
-#ifndef MAX_HWIFS
-#define MAX_HWIFS      4       /* same as the other archs */
-#endif
-
 /*
  * 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
index f34740ee6775ba77a80019b7277790b17dc76484..8ee6bff030d9d46ab52b8042905cb1f5a400d3ad 100644 (file)
 #include <linux/stddef.h>
 #include <asm/processor.h>
 
-#ifndef MAX_HWIFS
-# ifdef CONFIG_BLK_DEV_IDEPCI
-#define MAX_HWIFS      10
-# else
-#define MAX_HWIFS      6
-# endif
-#endif
-
 static __inline__ int ide_probe_legacy(void)
 {
 #ifdef CONFIG_PCI
index dc235121ec422e57b7639503701c449d9fc3dae4..6adcdd92e83d942c171f0307c68b45d6a9834d71 100644 (file)
 #undef SUPPORT_VLB_SYNC
 #define SUPPORT_VLB_SYNC 0
 
-#ifndef MAX_HWIFS
-#define MAX_HWIFS 8
-#endif
-
 /*
  * some bits needed for parts of the IDE subsystem to compile
  */
index db0c944100953a1ce46ab8d7caa00f3a81314317..c246ef75017db7fc048699577c0603121bb19f51 100644 (file)
 
 #ifdef __KERNEL__
 
-#ifndef MAX_HWIFS
-#define MAX_HWIFS      2
-#endif
-
 #define ide_request_irq(irq,hand,flg,dev,id)   request_irq((irq),(hand),(flg),(dev),(id))
 #define ide_free_irq(irq,dev_id)               free_irq((irq), (dev_id))
 #define ide_request_region(from,extent,name)   request_region((from), (extent), (name))
index 3d90bf7d3d73ed19ae011c20b576f422b07e5868..262def6a9f0a3430c8a83bbc810c028de1842eae 100644 (file)
 #endif
 #include <asm/io.h>
 
-#ifndef MAX_HWIFS
-#ifdef __powerpc64__
-#define MAX_HWIFS      10
-#else
-#define MAX_HWIFS      8
-#endif
-#endif
-
 #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c))
 #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c))
 #define __ide_mm_outsw(p, a, c)        writesw((void __iomem *)(p), (a), (c))
index 879fcec72dc12e0bdd2726b19b6d77aba1d489b1..b7af3d6582394b6fb2b370479bd2523f21e6281e 100644 (file)
@@ -21,9 +21,6 @@
 #include <asm/psr.h>
 #endif
 
-#undef  MAX_HWIFS
-#define MAX_HWIFS      2
-
 #define __ide_insl(data_reg, buffer, wcount) \
        __ide_insw(data_reg, buffer, (wcount)<<1)
 #define __ide_outsl(data_reg, buffer, wcount) \
index 34050747f38cdf923510b01aec38d083b4c768aa..bc54879daed15228229e854fdd74aae8da256a5f 100644 (file)
 
 #ifdef __KERNEL__
 
-
-#ifndef MAX_HWIFS
-# ifdef CONFIG_BLK_DEV_IDEPCI
-#define MAX_HWIFS      10
-# else
-#define MAX_HWIFS      6
-# endif
-#endif
-
 static __inline__ int ide_default_irq(unsigned long base)
 {
        switch (base) {
index cb995701c42d843a84a82be8dabd9c129dfee28e..18342a2cc7740d4a2c7ad142368c09ab5e83efc9 100644 (file)
 
 #ifdef __KERNEL__
 
-
-#ifndef MAX_HWIFS
-# define MAX_HWIFS     1
-#endif
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
index dbd0aeb3a56de07d47b8e39e2b1d93026e886e6e..76fe00b24b5173476e48acc506988d351ab2cc60 100644 (file)
@@ -213,6 +213,14 @@ static inline int __ide_default_irq(unsigned long base)
 
 #include <asm/ide.h>
 
+#ifndef MAX_HWIFS
+#if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA)
+# define MAX_HWIFS     1
+#else
+# define MAX_HWIFS     10
+#endif
+#endif
+
 #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED)
 #undef MAX_HWIFS
 #define MAX_HWIFS      CONFIG_IDE_MAX_HWIFS