]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ARM/ARM26 IDE cleanups
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Wed, 19 May 2004 00:14:44 +0000 (17:14 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 19 May 2004 00:14:44 +0000 (17:14 -0700)
- clear hwif->hw in setup-pci.c before using it

- fix arch/arm/Kconfig to allow IDE only on platforms supporting it

- introduce IDE_ARCH_OBSOLETE_INIT and ide_default_io_ctl() so
  we can use generic ide_init_hwif_ports() and kill no longer needed
  <asm-arm/arch-*/ide.h> (leave broken lh7a40x and sa1100 versions)

Cross-compile tested on ARM.

30 files changed:
arch/arm/Kconfig
drivers/ide/ide.c
drivers/ide/setup-pci.c
include/asm-alpha/ide.h
include/asm-arm/arch-cl7500/ide.h [deleted file]
include/asm-arm/arch-ebsa110/ide.h [deleted file]
include/asm-arm/arch-ebsa285/ide.h [deleted file]
include/asm-arm/arch-iop3xx/ide.h [deleted file]
include/asm-arm/arch-ixp4xx/ide.h [deleted file]
include/asm-arm/arch-l7200/ide.h [deleted file]
include/asm-arm/arch-lh7a40x/ide.h
include/asm-arm/arch-nexuspci/ide.h [deleted file]
include/asm-arm/arch-pxa/ide.h [deleted file]
include/asm-arm/arch-rpc/ide.h [deleted file]
include/asm-arm/arch-s3c2410/ide.h [deleted file]
include/asm-arm/arch-shark/ide.h [deleted file]
include/asm-arm/arch-tbox/ide.h [deleted file]
include/asm-arm/ide.h
include/asm-arm26/ide.h
include/asm-i386/ide.h
include/asm-ia64/ide.h
include/asm-mips/mach-generic/ide.h
include/asm-parisc/ide.h
include/asm-ppc/ide.h
include/asm-ppc64/ide.h
include/asm-sh/ide.h
include/asm-sparc/ide.h
include/asm-sparc64/ide.h
include/asm-x86_64/ide.h
include/linux/ide.h

index 55694c5351a55661397557674c21bd5892293cba..ddc213a96355fb57253ba27d67ef0a35f82ed257 100644 (file)
@@ -609,7 +609,9 @@ source "drivers/acorn/block/Kconfig"
 
 source "net/Kconfig"
 
+if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_FTVPCI || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
 source "drivers/ide/Kconfig"
+endif
 
 source "drivers/scsi/Kconfig"
 
index ee2f5b25ec612187cc9592eee507690e416b790b..13f53f4b3c9b8a429fe58b92a0759f59206f67b5 100644 (file)
@@ -315,13 +315,6 @@ static void __init init_ide_data (void)
 #endif
        }
 
-/* OBSOLETE: still needed on arm26 and arm */
-#ifdef CONFIG_ARM
-       /* Add default hw interfaces */
-       initializing = 1;
-       ide_init_default_hwifs();
-       initializing = 0;
-#endif
 #ifdef CONFIG_IDE_ARM
        ide_arm_init();
 #endif
index 62484715f83ace3ada5140ca55ed0c8c289bea30..993e030c84bc46fc2df9d437f9697e3e80b2c130 100644 (file)
@@ -444,13 +444,12 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
        }
        if ((hwif = ide_match_hwif(base, d->bootable, d->name)) == NULL)
                return NULL;    /* no room in ide_hwifs[] */
-       if (hwif->io_ports[IDE_DATA_OFFSET] != base) {
-fixup_address:
+       if (hwif->io_ports[IDE_DATA_OFFSET] != base ||
+           hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
+               memset(&hwif->hw, 0, sizeof(hwif->hw));
                ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL);
                memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
                hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
-       } else if (hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
-               goto fixup_address;
        }
        hwif->chipset = ide_pci;
        hwif->pci_dev = dev;
index 9444b3d6dccc63ba82c3b9dc813c73acdab789f9..6624e5422421ff6688c1e6ca4b0d1952f29be6c3 100644 (file)
@@ -43,6 +43,9 @@ static inline unsigned long ide_default_io_base(int index)
        }
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)     (0)
 #else
diff --git a/include/asm-arm/arch-cl7500/ide.h b/include/asm-arm/arch-cl7500/ide.h
deleted file mode 100644 (file)
index db8b68f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * linux/include/asm-arm/arch-cl7500/ide.h
- *
- * Copyright (c) 1997 Russell King
- *
- * Modifications:
- *  29-07-1998 RMK     Major re-work of IDE architecture specific code
- */
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       if (ctrl_port) {
-               hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       } else {
-               hw->io_ports[IDE_CONTROL_OFFSET] = data_port + 0x206;
-       }
-       if (irq != NULL)
-               *irq = 0;
-       hw->io_ports[IDE_IRQ_OFFSET] = 0;
-}
-
-static inline void ide_init_default_hwifs(void) { ; }
diff --git a/include/asm-arm/arch-ebsa110/ide.h b/include/asm-arm/arch-ebsa110/ide.h
deleted file mode 100644 (file)
index 35eff5c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* no ide */
diff --git a/include/asm-arm/arch-ebsa285/ide.h b/include/asm-arm/arch-ebsa285/ide.h
deleted file mode 100644 (file)
index 09c0310..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-ebsa285/ide.h
- *
- *  Copyright (C) 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Modifications:
- *   29-07-1998        RMK     Major re-work of IDE architecture specific code
- */
-#include <asm/irq.h>
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void ide_init_default_hwifs(void)
-{
-#if 0
-       hw_regs_t hw;
-
-       memset(hw, 0, sizeof(*hw));
-
-       ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
-       hw.irq = IRQ_HARDDISK;
-       ide_register_hw(&hw);
-#endif
-}
diff --git a/include/asm-arm/arch-iop3xx/ide.h b/include/asm-arm/arch-iop3xx/ide.h
deleted file mode 100644 (file)
index c2b0265..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * include/asm-arm/arch-iop3xx/ide.h
- *
- * Generic IDE functions for IOP310 systems
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright 2001 MontaVista Software Inc.
- *
- * 09/26/2001 - Sharon Baartmans
- *     Fixed so it actually works.
- */
-
-#ifndef _ASM_ARCH_IDE_H_
-#define _ASM_ARCH_IDE_H_
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-       int regincr = 1;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += regincr;
-       }
-
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-
-       if (irq) *irq = 0;
-}
-
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void ide_init_default_hwifs(void)
-{
-       /* There are no standard ports */
-}
-
-#endif
diff --git a/include/asm-arm/arch-ixp4xx/ide.h b/include/asm-arm/arch-ixp4xx/ide.h
deleted file mode 100644 (file)
index c311713..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * linux/include/asm-arm/arch-ixp4xx/ide.h
- *
- * Copyright (C) 2003-2004 MontaVista Software, Inc.
- * Based on original code Copyright (c) 1998 Russell King
- */
-
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static __inline__ void
-ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
-{
-       unsigned long reg = (unsigned long) data_port;
-       int i;
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = (unsigned long) ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void ide_init_default_hwifs(void)
-{
-       /* There are no standard ports */
-}
-
-
diff --git a/include/asm-arm/arch-l7200/ide.h b/include/asm-arm/arch-l7200/ide.h
deleted file mode 100644 (file)
index 62ee12a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * linux/include/asm-arm/arch-l7200/ide.h
- *
- * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
- *
- * Changelog:
- *  03-29-2000 SJH     Created file placeholder
- */
-#include <asm/irq.h>
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-}
-
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void
-ide_init_default_hwifs(void)
-{
-}
index 7a461d166052dfc4c1b90b5cbd5876e8fad7c76f..fb50c0799f6917392795f0ac990f49d2bd742b99 100644 (file)
@@ -64,13 +64,6 @@ static __inline__  void ide_init_default_hwifs (void)
        ide_register_hw (&hw, &hwif);
        lpd7a40x_hwif_ioops (hwif); /* Override IO routines */
 }
-
-#else
-
-static __inline__ void ide_init_hwif_ports (hw_regs_t *hw, int data_port,
-                                           int ctrl_port, int *irq) {}
-static __inline__ void ide_init_default_hwifs (void) {}
-
 #endif
 
 #endif
diff --git a/include/asm-arm/arch-nexuspci/ide.h b/include/asm-arm/arch-nexuspci/ide.h
deleted file mode 100644 (file)
index 5514808..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/ide.h
- *
- * Copyright (c) 1998 Russell King
- *
- * Modifications:
- *  29-07-1998 RMK     Major re-work of IDE architecture specific code
- */
-#include <asm/irq.h>
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void ide_init_default_hwifs(void)
-{
-       /* There are no standard ports */
-}
diff --git a/include/asm-arm/arch-pxa/ide.h b/include/asm-arm/arch-pxa/ide.h
deleted file mode 100644 (file)
index a9efdce..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * linux/include/asm-arm/arch-pxa/ide.h
- *
- * Author:     George Davis
- * Created:    Jan 10, 2002
- * Copyright:  MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *
- * Originally based upon linux/include/asm-arm/arch-sa1100/ide.h
- *
- */
-
-#include <asm/irq.h>
-#include <asm/hardware.h>
-#include <asm/mach-types.h>
-
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-       int regincr = 1;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += regincr;
-       }
-
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-
-       if (irq)
-               *irq = 0;
-}
-
-
-/*
- * Register the standard ports for this architecture with the IDE driver.
- */
-static __inline__ void
-ide_init_default_hwifs(void)
-{
-       /* Nothing to declare... */
-}
diff --git a/include/asm-arm/arch-rpc/ide.h b/include/asm-arm/arch-rpc/ide.h
deleted file mode 100644 (file)
index b7595a8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-rpc/ide.h
- *
- *  Copyright (C) 1997 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Modifications:
- *   29-07-1998        RMK     Major re-work of IDE architecture specific code
- */
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-static inline void ide_init_default_hwifs(void) { ; }
diff --git a/include/asm-arm/arch-s3c2410/ide.h b/include/asm-arm/arch-s3c2410/ide.h
deleted file mode 100644 (file)
index de651e7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* linux/include/asm-arm/arch-s3c2410/ide.h
- *
- *  Copyright (C) 1997 Russell King
- *  Copyright (C) 2003 Simtec Electronics
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Modifications:
- *   29-07-1998        RMK     Major re-work of IDE architecture specific code
- *   16-05-2003 BJD    Changed to work with BAST IDE ports
- *   04-09-2003 BJD    Modifications for V2.6
- */
-
-#ifndef __ASM_ARCH_IDE_H
-#define __ASM_ARCH_IDE_H
-
-#include <asm/irq.h>
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-/* we initialise our ide devices from the main ide core, due to problems
- * with doing it in this function
-*/
-
-#define ide_init_default_hwifs() do { } while(0)
-
-#endif /* __ASM_ARCH_IDE_H */
diff --git a/include/asm-arm/arch-shark/ide.h b/include/asm-arm/arch-shark/ide.h
deleted file mode 100644 (file)
index 3aa231a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * linux/include/asm-arm/arch-shark/ide.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * linux/include/asm-arm/arch-ebsa285/ide.h
- * Copyright (c) 1998 Russell King
- */
-
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-       int i;
-
-       memset(hw, 0, sizeof(*hw));
-
-       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-               hw->io_ports[i] = reg;
-               reg += 1;
-       }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-       if (irq)
-               *irq = 0;
-}
-
-static inline void ide_init_default_hwifs(void) { ; }
diff --git a/include/asm-arm/arch-tbox/ide.h b/include/asm-arm/arch-tbox/ide.h
deleted file mode 100644 (file)
index d66e67c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/ide.h
- */
index c57af4d65abbacb6ca544f53fbf87e0fdf5fc558..d43dee139c59174875481fbd6bb42305af3b2658 100644 (file)
@@ -17,7 +17,9 @@
 #define MAX_HWIFS      4
 #endif
 
-#include <asm/arch/ide.h>
+#if defined(CONFIG_ARCH_LH7A40X) || defined(CONFIG_ARCH_SA1100)
+# include <asm/arch/ide.h>     /* obsolete + broken */
+#endif
 
 /*
  * We always use the new IDE port registering,
 #define ide_default_io_base(i)         (0)
 #define ide_default_irq(b)             (0)
 
+#if !defined(CONFIG_ARCH_L7200) && !defined(CONFIG_ARCH_LH7A40X)
+# define IDE_ARCH_OBSOLETE_INIT
+# ifdef CONFIG_ARCH_CLPS7500
+#  define ide_default_io_ctl(base)     ((base) + 0x206) /* obsolete */
+# else
+#  define ide_default_io_ctl(base)     (0)
+# endif
+#endif /* !ARCH_L7200 && !ARCH_LH7A40X */
+
 #define ide_init_default_irq(base)     (0)
 
 #define __ide_mm_insw(port,addr,len)   readsw(port,addr,len)
index ae0b3b0143a261d0618cead6c343d641d3cb1a28..7c8e435bdf8a7c27e0f8056a7fe9f842746dde1a 100644 (file)
 #define __ide_mm_outsw(port,addr,len)   writesw(port,addr,len)
 #define __ide_mm_outsl(port,addr,len)   writesl(port,addr,len)
 
-/*
- * Set up a hw structure for a specified data port, control port and IRQ.
- * This should follow whatever the default interface uses.
- */
-static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-                                      unsigned long ctrl_port, int *irq)
-{
-       unsigned long reg = data_port;
-        int i;
-
-        for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-                hw->io_ports[i] = reg;
-                reg += 1;
-        }
-       hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-        if (irq)
-                *irq = 0;
-}
-
 #define ide_init_default_irq(base)     (0)
 
-static inline void ide_init_default_hwifs(void) { ; }
-
 /*
  * We always use the new IDE port registering,
  * so these are fixed here.
@@ -56,6 +35,9 @@ static inline void ide_init_default_hwifs(void) { ; }
 #define ide_default_io_base(i)         (0)
 #define ide_default_irq(b)             (0)
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASMARM_IDE_H */
index e241be6d6e40c7ec28340b4066539ede46c2b7a2..d13334817b7fb8ce7f538e3cd2da22786ff5d7ca 100644 (file)
@@ -85,6 +85,9 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_por
 }
 #endif
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)     (0)
 #else
index 778d69ec67a2b29c1a8300f0a9cd2fc7722464b5..2adbd91a40c8c8b43a787c144dde855cb248960a 100644 (file)
@@ -53,6 +53,9 @@ static inline unsigned long ide_default_io_base(int index)
        }
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)     (0)
 #else
index a4618ca9fa81b5d0992e9b44974da0c3b22ab4c0..b70b1ec05fe6b7f937fd96e2059dd9662d17d7ba 100644 (file)
@@ -48,6 +48,9 @@ static inline unsigned long ide_default_io_base(int index)
        }
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)     (0)
 #else
index 61c3792177b3501fa350c0306b30c7d76ce6cf98..c2df5fce0da2b93e321198333037492ae0d9304c 100644 (file)
@@ -22,6 +22,9 @@
 #define ide_default_irq(base) (0)
 #define ide_default_io_base(index) (0)
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #define ide_init_default_irq(base)     (0)
 
 #define ide_request_irq(irq,hand,flg,dev,id)   request_irq((irq),(hand),(flg),(dev),(id))
index 1393d51c3e3ee8b14f3287dd42623a9d423a94e8..fbcddf33cdba44c6306e636f6a41b202fcac446c 100644 (file)
@@ -57,6 +57,9 @@ static __inline__ unsigned long ide_default_io_base(int index)
        return 0;
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)     (0)
 #else
index 88d3645e5d268c00b86ac58e901987e5d89229f8..a06fef9f9efb3859113697072b5f7c20e5f5b21f 100644 (file)
@@ -25,6 +25,9 @@
 static inline int ide_default_irq(unsigned long base) { return 0; }
 static inline unsigned long ide_default_io_base(int index) { return 0; }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #define ide_init_default_irq(base)     (0)
 
 #endif /* __KERNEL__ */
index 4aa1568d2fc3200daaff00379d63d2dca9dbafb9..c88ba763cc547b4120c6bd53b8f4f6c9e8590830 100644 (file)
@@ -72,6 +72,9 @@ static inline unsigned long ide_default_io_base(int index)
        }
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)     (0)
 #else
index 1f4397221b14b7b7f518fc8fc19e059b50dd23d5..6e8468f967585bce3b535d30b8eac629a53b8505 100644 (file)
@@ -29,6 +29,9 @@ static __inline__ unsigned long ide_default_io_base(int index)
        return 0;
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #define ide_init_default_irq(base)     (0)
 
 #define __ide_insl(data_reg, buffer, wcount) \
index 9ce42e117719166ffde7ef56facc9806ba5f42cd..f4e62012cd9941e508721569c65a235d1706b9bf 100644 (file)
@@ -34,6 +34,9 @@ static __inline__ unsigned long ide_default_io_base(int index)
        return 0;
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #define ide_init_default_irq(base)     (0)
 
 #define __ide_insl(data_reg, buffer, wcount) \
index 870bf0e782d3d14f46428ee295623d34c5394c9a..99e18549c8c69e0fdb3acedf8e604ce33817979d 100644 (file)
@@ -51,6 +51,9 @@ static __inline__ unsigned long ide_default_io_base(int index)
        }
 }
 
+#define IDE_ARCH_OBSOLETE_INIT
+#define ide_default_io_ctl(base)       ((base) + 0x206) /* obsolete */
+
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)     (0)
 #else
index aa2e86d087cb5475b22ba853b5bd260daf3274d7..86e4d4d9910c5474a175341f323b4cdb59698bb0 100644 (file)
@@ -307,18 +307,20 @@ static inline void ide_std_init_ports(hw_regs_t *hw,
 
 /*
  * ide_init_hwif_ports() is OBSOLETE and will be removed in 2.7 series.
+ * New ports shouldn't define IDE_ARCH_OBSOLETE_INIT in <asm/ide.h>.
  *
- * arm26, arm, h8300, m68k, m68knommu (broken) and i386-pc9800 (broken)
+ * h8300, m68k, m68knommu (broken) and i386-pc9800 (broken)
  * still have their own versions.
  */
-#if !defined(CONFIG_ARM) && !defined(CONFIG_H8300) && !defined(CONFIG_M68K)
+#if !defined(CONFIG_H8300) && !defined(CONFIG_M68K)
+#ifdef IDE_ARCH_OBSOLETE_INIT
 static inline void ide_init_hwif_ports(hw_regs_t *hw,
                                       unsigned long io_addr,
                                       unsigned long ctl_addr,
                                       int *irq)
 {
        if (!ctl_addr)
-               ide_std_init_ports(hw, io_addr, io_addr + 0x206);
+               ide_std_init_ports(hw, io_addr, ide_default_io_ctl(io_addr));
        else
                ide_std_init_ports(hw, io_addr, ctl_addr);
 
@@ -332,7 +334,10 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw,
                ppc_ide_md.ide_init_hwif(hw, io_addr, ctl_addr, irq);
 #endif
 }
-#endif /* !ARM && !H8300 && !M68K */
+#else
+# define ide_init_hwif_ports(hw, io, ctl, irq) do {} while (0)
+#endif /* IDE_ARCH_OBSOLETE_INIT */
+#endif /* !H8300 && !M68K */
 
 /* Currently only m68k, apus and m8xx need it */
 #ifndef IDE_ARCH_ACK_INTR