diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 17:55:09 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 17:55:09 -0400 |
| commit | b5684b83b1e1579bbbc80e703e990c0cccf5892c (patch) | |
| tree | 3f1b62b2320bce4d658d2ad0d4b77856499ac533 /include | |
| parent | 1481b9109fe771ec8b035d7760f42e36d2bed5d4 (diff) | |
| parent | 1b8ebad87b459e2e1333fbf28005977245ff5402 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits)
ide: use proper printk() KERN_* levels in ide-probe.c
ide: fix for EATA SCSI HBA in ATA emulating mode
ide: remove stale comments from drivers/ide/Makefile
ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase
ide-scsi: remove kmalloced struct request
ht6560b: remove old history
ht6560b: update email address
ide-cd: fix oops when using growisofs
gayle: release resources on ide_host_add() failure
palm_bk3710: add UltraDMA/100 support
ide: trivial sparse annotations
ide: ide-tape.c sparse annotations and unaligned access removal
ide: drop 'name' parameter from ->init_chipset method
ide: prefix messages from IDE PCI host drivers by driver name
it821x: remove DECLARE_ITE_DEV() macro
it8213: remove DECLARE_ITE_DEV() macro
ide: include PCI device name in messages from IDE PCI host drivers
ide: remove <asm/ide.h> for some archs
ide-generic: remove ide_default_{io_base,irq}() inlines (take 3)
ide-generic: is no longer needed on ppc32
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/ide.h | 44 | ||||
| -rw-r--r-- | include/asm-arm/ide.h | 4 | ||||
| -rw-r--r-- | include/asm-blackfin/ide.h | 27 | ||||
| -rw-r--r-- | include/asm-cris/arch-v10/ide.h | 91 | ||||
| -rw-r--r-- | include/asm-cris/arch-v32/ide.h | 56 | ||||
| -rw-r--r-- | include/asm-cris/ide.h | 1 | ||||
| -rw-r--r-- | include/asm-frv/ide.h | 4 | ||||
| -rw-r--r-- | include/asm-h8300/ide.h | 26 | ||||
| -rw-r--r-- | include/asm-ia64/ide.h | 51 | ||||
| -rw-r--r-- | include/asm-m32r/ide.h | 70 | ||||
| -rw-r--r-- | include/asm-m68k/ide.h | 4 | ||||
| -rw-r--r-- | include/asm-mips/mach-generic/ide.h | 48 | ||||
| -rw-r--r-- | include/asm-mn10300/ide.h | 4 | ||||
| -rw-r--r-- | include/asm-parisc/ide.h | 4 | ||||
| -rw-r--r-- | include/asm-powerpc/ide.h | 26 | ||||
| -rw-r--r-- | include/asm-sh/ide.h | 21 | ||||
| -rw-r--r-- | include/asm-sparc/ide.h | 3 | ||||
| -rw-r--r-- | include/asm-x86/ide.h | 65 | ||||
| -rw-r--r-- | include/asm-xtensa/ide.h | 35 | ||||
| -rw-r--r-- | include/linux/ide.h | 32 |
20 files changed, 29 insertions, 587 deletions
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h deleted file mode 100644 index f44129abc02c..000000000000 --- a/include/asm-alpha/ide.h +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-alpha/ide.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 5 | */ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * This file contains the alpha architecture specific IDE code. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __ASMalpha_IDE_H | ||
| 12 | #define __ASMalpha_IDE_H | ||
| 13 | |||
| 14 | #ifdef __KERNEL__ | ||
| 15 | |||
| 16 | static inline int ide_default_irq(unsigned long base) | ||
| 17 | { | ||
| 18 | switch (base) { | ||
| 19 | case 0x1f0: return 14; | ||
| 20 | case 0x170: return 15; | ||
| 21 | case 0x1e8: return 11; | ||
| 22 | case 0x168: return 10; | ||
| 23 | default: | ||
| 24 | return 0; | ||
| 25 | } | ||
| 26 | } | ||
| 27 | |||
| 28 | static inline unsigned long ide_default_io_base(int index) | ||
| 29 | { | ||
| 30 | switch (index) { | ||
| 31 | case 0: return 0x1f0; | ||
| 32 | case 1: return 0x170; | ||
| 33 | case 2: return 0x1e8; | ||
| 34 | case 3: return 0x168; | ||
| 35 | default: | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | #include <asm-generic/ide_iops.h> | ||
| 41 | |||
| 42 | #endif /* __KERNEL__ */ | ||
| 43 | |||
| 44 | #endif /* __ASMalpha_IDE_H */ | ||
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h index 88f4d231ce4f..a48019f99d08 100644 --- a/include/asm-arm/ide.h +++ b/include/asm-arm/ide.h | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
| 15 | 15 | ||
| 16 | #ifndef MAX_HWIFS | ||
| 17 | #define MAX_HWIFS 4 | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #define __ide_mm_insw(port,addr,len) readsw(port,addr,len) | 16 | #define __ide_mm_insw(port,addr,len) readsw(port,addr,len) |
| 21 | #define __ide_mm_insl(port,addr,len) readsl(port,addr,len) | 17 | #define __ide_mm_insl(port,addr,len) readsl(port,addr,len) |
| 22 | #define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) | 18 | #define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) |
diff --git a/include/asm-blackfin/ide.h b/include/asm-blackfin/ide.h deleted file mode 100644 index 5b88de115bf4..000000000000 --- a/include/asm-blackfin/ide.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | /****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * linux/include/asm-blackfin/ide.h | ||
| 5 | * | ||
| 6 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 7 | * Copyright (C) 2001 Lineo Inc., davidm@snapgear.com | ||
| 8 | * Copyright (C) 2002 Greg Ungerer (gerg@snapgear.com) | ||
| 9 | * Copyright (C) 2002 Yoshinori Sato (ysato@users.sourceforge.jp) | ||
| 10 | * Copyright (C) 2005 Hennerich Michael (hennerich@blackfin.uclinux.org) | ||
| 11 | */ | ||
| 12 | |||
| 13 | /****************************************************************************/ | ||
| 14 | #ifndef _BLACKFIN_IDE_H | ||
| 15 | #define _BLACKFIN_IDE_H | ||
| 16 | /****************************************************************************/ | ||
| 17 | #ifdef __KERNEL__ | ||
| 18 | /****************************************************************************/ | ||
| 19 | |||
| 20 | #define MAX_HWIFS 1 | ||
| 21 | |||
| 22 | #include <asm-generic/ide_iops.h> | ||
| 23 | |||
| 24 | /****************************************************************************/ | ||
| 25 | #endif /* __KERNEL__ */ | ||
| 26 | #endif /* _BLACKFIN_IDE_H */ | ||
| 27 | /****************************************************************************/ | ||
diff --git a/include/asm-cris/arch-v10/ide.h b/include/asm-cris/arch-v10/ide.h deleted file mode 100644 index 5366e6239328..000000000000 --- a/include/asm-cris/arch-v10/ide.h +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-cris/ide.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2000, 2001, 2002 Axis Communications AB | ||
| 5 | * | ||
| 6 | * Authors: Bjorn Wesen | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | /* | ||
| 11 | * This file contains the ETRAX 100LX specific IDE code. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASMCRIS_IDE_H | ||
| 15 | #define __ASMCRIS_IDE_H | ||
| 16 | |||
| 17 | #ifdef __KERNEL__ | ||
| 18 | |||
| 19 | #include <asm/arch/svinto.h> | ||
| 20 | #include <asm/io.h> | ||
| 21 | #include <asm-generic/ide_iops.h> | ||
| 22 | |||
| 23 | |||
| 24 | /* ETRAX 100 can support 4 IDE busses on the same pins (serialized) */ | ||
| 25 | |||
| 26 | #define MAX_HWIFS 4 | ||
| 27 | |||
| 28 | static inline int ide_default_irq(unsigned long base) | ||
| 29 | { | ||
| 30 | /* all IDE busses share the same IRQ, number 4. | ||
| 31 | * this has the side-effect that ide-probe.c will cluster our 4 interfaces | ||
| 32 | * together in a hwgroup, and will serialize accesses. this is good, because | ||
| 33 | * we can't access more than one interface at the same time on ETRAX100. | ||
| 34 | */ | ||
| 35 | return 4; | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline unsigned long ide_default_io_base(int index) | ||
| 39 | { | ||
| 40 | /* we have no real I/O base address per interface, since all go through the | ||
| 41 | * same register. but in a bitfield in that register, we have the i/f number. | ||
| 42 | * so we can use the io_base to remember that bitfield. | ||
| 43 | */ | ||
| 44 | static const unsigned long io_bases[MAX_HWIFS] = { | ||
| 45 | IO_FIELD(R_ATA_CTRL_DATA, sel, 0), | ||
| 46 | IO_FIELD(R_ATA_CTRL_DATA, sel, 1), | ||
| 47 | IO_FIELD(R_ATA_CTRL_DATA, sel, 2), | ||
| 48 | IO_FIELD(R_ATA_CTRL_DATA, sel, 3) | ||
| 49 | }; | ||
| 50 | return io_bases[index]; | ||
| 51 | } | ||
| 52 | |||
| 53 | /* this is called once for each interface, to setup the port addresses. data_port is the result | ||
| 54 | * of the ide_default_io_base call above. ctrl_port will be 0, but that is don't care for us. | ||
| 55 | */ | ||
| 56 | |||
| 57 | static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, unsigned long ctrl_port, int *irq) | ||
| 58 | { | ||
| 59 | int i; | ||
| 60 | |||
| 61 | /* fill in ports for ATA addresses 0 to 7 */ | ||
| 62 | for (i = 0; i <= 7; i++) { | ||
| 63 | hw->io_ports_array[i] = data_port | | ||
| 64 | IO_FIELD(R_ATA_CTRL_DATA, addr, i) | | ||
| 65 | IO_STATE(R_ATA_CTRL_DATA, cs0, active); | ||
| 66 | } | ||
| 67 | |||
| 68 | /* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */ | ||
| 69 | hw->io_ports.ctl_addr = data_port | | ||
| 70 | IO_FIELD(R_ATA_CTRL_DATA, addr, 6) | | ||
| 71 | IO_STATE(R_ATA_CTRL_DATA, cs1, active); | ||
| 72 | |||
| 73 | /* whats this for ? */ | ||
| 74 | hw->io_ports.irq_addr = 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline void ide_init_default_hwifs(void) | ||
| 78 | { | ||
| 79 | hw_regs_t hw; | ||
| 80 | int index; | ||
| 81 | |||
| 82 | for(index = 0; index < MAX_HWIFS; index++) { | ||
| 83 | ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL); | ||
| 84 | hw.irq = ide_default_irq(ide_default_io_base(index)); | ||
| 85 | ide_register_hw(&hw, NULL); | ||
| 86 | } | ||
| 87 | } | ||
| 88 | |||
| 89 | #endif /* __KERNEL__ */ | ||
| 90 | |||
| 91 | #endif /* __ASMCRIS_IDE_H */ | ||
diff --git a/include/asm-cris/arch-v32/ide.h b/include/asm-cris/arch-v32/ide.h deleted file mode 100644 index fb9c3627a5b4..000000000000 --- a/include/asm-cris/arch-v32/ide.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-cris/ide.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2000-2004 Axis Communications AB | ||
| 5 | * | ||
| 6 | * Authors: Bjorn Wesen, Mikael Starvik | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | /* | ||
| 11 | * This file contains the ETRAX FS specific IDE code. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASMCRIS_IDE_H | ||
| 15 | #define __ASMCRIS_IDE_H | ||
| 16 | |||
| 17 | #ifdef __KERNEL__ | ||
| 18 | |||
| 19 | #include <asm/arch/hwregs/intr_vect.h> | ||
| 20 | #include <asm/arch/hwregs/ata_defs.h> | ||
| 21 | #include <asm/io.h> | ||
| 22 | #include <asm-generic/ide_iops.h> | ||
| 23 | |||
| 24 | |||
| 25 | /* ETRAX FS can support 4 IDE busses on the same pins (serialized) */ | ||
| 26 | |||
| 27 | #define MAX_HWIFS 4 | ||
| 28 | |||
| 29 | static inline int ide_default_irq(unsigned long base) | ||
| 30 | { | ||
| 31 | /* all IDE busses share the same IRQ, | ||
| 32 | * this has the side-effect that ide-probe.c will cluster our 4 interfaces | ||
| 33 | * together in a hwgroup, and will serialize accesses. this is good, because | ||
| 34 | * we can't access more than one interface at the same time on ETRAX100. | ||
| 35 | */ | ||
| 36 | return ATA_INTR_VECT; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline unsigned long ide_default_io_base(int index) | ||
| 40 | { | ||
| 41 | reg_ata_rw_ctrl2 ctrl2 = {.sel = index}; | ||
| 42 | /* we have no real I/O base address per interface, since all go through the | ||
| 43 | * same register. but in a bitfield in that register, we have the i/f number. | ||
| 44 | * so we can use the io_base to remember that bitfield. | ||
| 45 | */ | ||
| 46 | ctrl2.sel = index; | ||
| 47 | |||
| 48 | return REG_TYPE_CONV(unsigned long, reg_ata_rw_ctrl2, ctrl2); | ||
| 49 | } | ||
| 50 | |||
| 51 | #define IDE_ARCH_ACK_INTR | ||
| 52 | #define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif)) | ||
| 53 | |||
| 54 | #endif /* __KERNEL__ */ | ||
| 55 | |||
| 56 | #endif /* __ASMCRIS_IDE_H */ | ||
diff --git a/include/asm-cris/ide.h b/include/asm-cris/ide.h deleted file mode 100644 index a894f66665f8..000000000000 --- a/include/asm-cris/ide.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm/arch/ide.h> | ||
diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h index 8c9a540d4344..7ebcc56a2229 100644 --- a/include/asm-frv/ide.h +++ b/include/asm-frv/ide.h | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| 19 | #include <asm/irq.h> | 19 | #include <asm/irq.h> |
| 20 | 20 | ||
| 21 | #ifndef MAX_HWIFS | ||
| 22 | #define MAX_HWIFS 8 | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /****************************************************************************/ | 21 | /****************************************************************************/ |
| 26 | /* | 22 | /* |
| 27 | * some bits needed for parts of the IDE subsystem to compile | 23 | * some bits needed for parts of the IDE subsystem to compile |
diff --git a/include/asm-h8300/ide.h b/include/asm-h8300/ide.h deleted file mode 100644 index f8535ce7476e..000000000000 --- a/include/asm-h8300/ide.h +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | /****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * linux/include/asm-h8300/ide.h | ||
| 5 | * | ||
| 6 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 7 | * Copyright (C) 2001 Lineo Inc., davidm@snapgear.com | ||
| 8 | * Copyright (C) 2002 Greg Ungerer (gerg@snapgear.com) | ||
| 9 | * Copyright (C) 2002 Yoshinori Sato (ysato@users.sourceforge.jp) | ||
| 10 | */ | ||
| 11 | |||
| 12 | /****************************************************************************/ | ||
| 13 | #ifndef _H8300_IDE_H | ||
| 14 | #define _H8300_IDE_H | ||
| 15 | /****************************************************************************/ | ||
| 16 | #ifdef __KERNEL__ | ||
| 17 | /****************************************************************************/ | ||
| 18 | |||
| 19 | #define MAX_HWIFS 1 | ||
| 20 | |||
| 21 | #include <asm-generic/ide_iops.h> | ||
| 22 | |||
| 23 | /****************************************************************************/ | ||
| 24 | #endif /* __KERNEL__ */ | ||
| 25 | #endif /* _H8300_IDE_H */ | ||
| 26 | /****************************************************************************/ | ||
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h deleted file mode 100644 index 8fa3f8cd067a..000000000000 --- a/include/asm-ia64/ide.h +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-ia64/ide.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 5 | */ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * This file contains the ia64 architecture specific IDE code. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __ASM_IA64_IDE_H | ||
| 12 | #define __ASM_IA64_IDE_H | ||
| 13 | |||
| 14 | #ifdef __KERNEL__ | ||
| 15 | |||
| 16 | |||
| 17 | #include <linux/irq.h> | ||
| 18 | |||
| 19 | static inline int ide_default_irq(unsigned long base) | ||
| 20 | { | ||
| 21 | switch (base) { | ||
| 22 | case 0x1f0: return isa_irq_to_vector(14); | ||
| 23 | case 0x170: return isa_irq_to_vector(15); | ||
| 24 | case 0x1e8: return isa_irq_to_vector(11); | ||
| 25 | case 0x168: return isa_irq_to_vector(10); | ||
| 26 | case 0x1e0: return isa_irq_to_vector(8); | ||
| 27 | case 0x160: return isa_irq_to_vector(12); | ||
| 28 | default: | ||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline unsigned long ide_default_io_base(int index) | ||
| 34 | { | ||
| 35 | switch (index) { | ||
| 36 | case 0: return 0x1f0; | ||
| 37 | case 1: return 0x170; | ||
| 38 | case 2: return 0x1e8; | ||
| 39 | case 3: return 0x168; | ||
| 40 | case 4: return 0x1e0; | ||
| 41 | case 5: return 0x160; | ||
| 42 | default: | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | #include <asm-generic/ide_iops.h> | ||
| 48 | |||
| 49 | #endif /* __KERNEL__ */ | ||
| 50 | |||
| 51 | #endif /* __ASM_IA64_IDE_H */ | ||
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h deleted file mode 100644 index 1e7f6474d130..000000000000 --- a/include/asm-m32r/ide.h +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | #ifndef _ASM_M32R_IDE_H | ||
| 2 | #define _ASM_M32R_IDE_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * linux/include/asm-m32r/ide.h | ||
| 6 | * | ||
| 7 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 8 | */ | ||
| 9 | |||
| 10 | /* | ||
| 11 | * This file contains the i386 architecture specific IDE code. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifdef __KERNEL__ | ||
| 15 | |||
| 16 | #include <asm/m32r.h> | ||
| 17 | |||
| 18 | #ifndef MAX_HWIFS | ||
| 19 | # ifdef CONFIG_BLK_DEV_IDEPCI | ||
| 20 | #define MAX_HWIFS 10 | ||
| 21 | # else | ||
| 22 | #define MAX_HWIFS 2 | ||
| 23 | # endif | ||
| 24 | #endif | ||
| 25 | |||
| 26 | static __inline__ int ide_default_irq(unsigned long base) | ||
| 27 | { | ||
| 28 | switch (base) { | ||
| 29 | #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \ | ||
| 30 | || defined(CONFIG_PLAT_OPSPUT) | ||
| 31 | case 0x1f0: return PLD_IRQ_CFIREQ; | ||
| 32 | default: | ||
| 33 | return 0; | ||
| 34 | #elif defined(CONFIG_PLAT_MAPPI3) | ||
| 35 | case 0x1f0: return PLD_IRQ_CFIREQ; | ||
| 36 | case 0x170: return PLD_IRQ_IDEIREQ; | ||
| 37 | default: | ||
| 38 | return 0; | ||
| 39 | #else | ||
| 40 | case 0x1f0: return 14; | ||
| 41 | case 0x170: return 15; | ||
| 42 | case 0x1e8: return 11; | ||
| 43 | case 0x168: return 10; | ||
| 44 | case 0x1e0: return 8; | ||
| 45 | case 0x160: return 12; | ||
| 46 | default: | ||
| 47 | return 0; | ||
| 48 | #endif | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | static __inline__ unsigned long ide_default_io_base(int index) | ||
| 53 | { | ||
| 54 | switch (index) { | ||
| 55 | case 0: return 0x1f0; | ||
| 56 | case 1: return 0x170; | ||
| 57 | case 2: return 0x1e8; | ||
| 58 | case 3: return 0x168; | ||
| 59 | case 4: return 0x1e0; | ||
| 60 | case 5: return 0x160; | ||
| 61 | default: | ||
| 62 | return 0; | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | #include <asm-generic/ide_iops.h> | ||
| 67 | |||
| 68 | #endif /* __KERNEL__ */ | ||
| 69 | |||
| 70 | #endif /* _ASM_M32R_IDE_H */ | ||
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index 909c6dfd3851..1daf6cbdd9f0 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h | |||
| @@ -45,10 +45,6 @@ | |||
| 45 | #include <asm/macints.h> | 45 | #include <asm/macints.h> |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #ifndef MAX_HWIFS | ||
| 49 | #define MAX_HWIFS 4 /* same as the other archs */ | ||
| 50 | #endif | ||
| 51 | |||
| 52 | /* | 48 | /* |
| 53 | * Get rid of defs from io.h - ide has its private and conflicting versions | 49 | * Get rid of defs from io.h - ide has its private and conflicting versions |
| 54 | * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we | 50 | * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we |
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h index 0f6c251f5fec..73008f7bdc93 100644 --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h | |||
| @@ -19,14 +19,6 @@ | |||
| 19 | #include <linux/stddef.h> | 19 | #include <linux/stddef.h> |
| 20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
| 21 | 21 | ||
| 22 | #ifndef MAX_HWIFS | ||
| 23 | # ifdef CONFIG_BLK_DEV_IDEPCI | ||
| 24 | #define MAX_HWIFS 10 | ||
| 25 | # else | ||
| 26 | #define MAX_HWIFS 6 | ||
| 27 | # endif | ||
| 28 | #endif | ||
| 29 | |||
| 30 | static __inline__ int ide_probe_legacy(void) | 22 | static __inline__ int ide_probe_legacy(void) |
| 31 | { | 23 | { |
| 32 | #ifdef CONFIG_PCI | 24 | #ifdef CONFIG_PCI |
| @@ -56,46 +48,6 @@ found: | |||
| 56 | #endif | 48 | #endif |
| 57 | } | 49 | } |
| 58 | 50 | ||
| 59 | static __inline__ int ide_default_irq(unsigned long base) | ||
| 60 | { | ||
| 61 | switch (base) { | ||
| 62 | case 0x1f0: return 14; | ||
| 63 | case 0x170: return 15; | ||
| 64 | case 0x1e8: return 11; | ||
| 65 | case 0x168: return 10; | ||
| 66 | case 0x1e0: return 8; | ||
| 67 | case 0x160: return 12; | ||
| 68 | default: | ||
| 69 | return 0; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | static __inline__ unsigned long ide_default_io_base(int index) | ||
| 74 | { | ||
| 75 | if (!ide_probe_legacy()) | ||
| 76 | return 0; | ||
| 77 | /* | ||
| 78 | * If PCI is present then it is not safe to poke around | ||
| 79 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | ||
| 80 | * defined compatibility mode ports for PCI. A user can | ||
| 81 | * override this using ide= but we must default safe. | ||
| 82 | */ | ||
| 83 | if (no_pci_devices()) { | ||
| 84 | switch (index) { | ||
| 85 | case 2: return 0x1e8; | ||
| 86 | case 3: return 0x168; | ||
| 87 | case 4: return 0x1e0; | ||
| 88 | case 5: return 0x160; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | switch (index) { | ||
| 92 | case 0: return 0x1f0; | ||
| 93 | case 1: return 0x170; | ||
| 94 | default: | ||
| 95 | return 0; | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | /* MIPS port and memory-mapped I/O string operations. */ | 51 | /* MIPS port and memory-mapped I/O string operations. */ |
| 100 | static inline void __ide_flush_prologue(void) | 52 | static inline void __ide_flush_prologue(void) |
| 101 | { | 53 | { |
diff --git a/include/asm-mn10300/ide.h b/include/asm-mn10300/ide.h index dc235121ec42..6adcdd92e83d 100644 --- a/include/asm-mn10300/ide.h +++ b/include/asm-mn10300/ide.h | |||
| @@ -23,10 +23,6 @@ | |||
| 23 | #undef SUPPORT_VLB_SYNC | 23 | #undef SUPPORT_VLB_SYNC |
| 24 | #define SUPPORT_VLB_SYNC 0 | 24 | #define SUPPORT_VLB_SYNC 0 |
| 25 | 25 | ||
| 26 | #ifndef MAX_HWIFS | ||
| 27 | #define MAX_HWIFS 8 | ||
| 28 | #endif | ||
| 29 | |||
| 30 | /* | 26 | /* |
| 31 | * some bits needed for parts of the IDE subsystem to compile | 27 | * some bits needed for parts of the IDE subsystem to compile |
| 32 | */ | 28 | */ |
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index db0c94410095..c246ef75017d 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
| 15 | 15 | ||
| 16 | #ifndef MAX_HWIFS | ||
| 17 | #define MAX_HWIFS 2 | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) | 16 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) |
| 21 | #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) | 17 | #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) |
| 22 | #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) | 18 | #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) |
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 3d90bf7d3d73..1aaf27be8741 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
| @@ -14,14 +14,6 @@ | |||
| 14 | #endif | 14 | #endif |
| 15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
| 16 | 16 | ||
| 17 | #ifndef MAX_HWIFS | ||
| 18 | #ifdef __powerpc64__ | ||
| 19 | #define MAX_HWIFS 10 | ||
| 20 | #else | ||
| 21 | #define MAX_HWIFS 8 | ||
| 22 | #endif | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) | 17 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) |
| 26 | #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c)) | 18 | #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c)) |
| 27 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) | 19 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) |
| @@ -40,16 +32,6 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
| 40 | case 0x170: return 15; | 32 | case 0x170: return 15; |
| 41 | } | 33 | } |
| 42 | #endif | 34 | #endif |
| 43 | #ifdef CONFIG_PPC_PREP | ||
| 44 | switch (base) { | ||
| 45 | case 0x1f0: return 13; | ||
| 46 | case 0x170: return 13; | ||
| 47 | case 0x1e8: return 11; | ||
| 48 | case 0x168: return 10; | ||
| 49 | case 0xfff0: return 14; /* MCP(N)750 ide0 */ | ||
| 50 | case 0xffe0: return 15; /* MCP(N)750 ide1 */ | ||
| 51 | } | ||
| 52 | #endif | ||
| 53 | return 0; | 35 | return 0; |
| 54 | } | 36 | } |
| 55 | 37 | ||
| @@ -62,14 +44,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
| 62 | case 1: return 0x170; | 44 | case 1: return 0x170; |
| 63 | } | 45 | } |
| 64 | #endif | 46 | #endif |
| 65 | #ifdef CONFIG_PPC_PREP | ||
| 66 | switch (index) { | ||
| 67 | case 0: return 0x1f0; | ||
| 68 | case 1: return 0x170; | ||
| 69 | case 2: return 0x1e8; | ||
| 70 | case 3: return 0x168; | ||
| 71 | } | ||
| 72 | #endif | ||
| 73 | return 0; | 47 | return 0; |
| 74 | } | 48 | } |
| 75 | 49 | ||
diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h deleted file mode 100644 index 58e0bdd52be4..000000000000 --- a/include/asm-sh/ide.h +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-sh/ide.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 5 | */ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * This file contains the i386 architecture specific IDE code. | ||
| 9 | * In future, SuperH code. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __ASM_SH_IDE_H | ||
| 13 | #define __ASM_SH_IDE_H | ||
| 14 | |||
| 15 | #ifdef __KERNEL__ | ||
| 16 | |||
| 17 | #include <asm-generic/ide_iops.h> | ||
| 18 | |||
| 19 | #endif /* __KERNEL__ */ | ||
| 20 | |||
| 21 | #endif /* __ASM_SH_IDE_H */ | ||
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index 879fcec72dc1..b7af3d658239 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h | |||
| @@ -21,9 +21,6 @@ | |||
| 21 | #include <asm/psr.h> | 21 | #include <asm/psr.h> |
| 22 | #endif | 22 | #endif |
| 23 | 23 | ||
| 24 | #undef MAX_HWIFS | ||
| 25 | #define MAX_HWIFS 2 | ||
| 26 | |||
| 27 | #define __ide_insl(data_reg, buffer, wcount) \ | 24 | #define __ide_insl(data_reg, buffer, wcount) \ |
| 28 | __ide_insw(data_reg, buffer, (wcount)<<1) | 25 | __ide_insw(data_reg, buffer, (wcount)<<1) |
| 29 | #define __ide_outsl(data_reg, buffer, wcount) \ | 26 | #define __ide_outsl(data_reg, buffer, wcount) \ |
diff --git a/include/asm-x86/ide.h b/include/asm-x86/ide.h deleted file mode 100644 index cf9c98e5bdb5..000000000000 --- a/include/asm-x86/ide.h +++ /dev/null | |||
| @@ -1,65 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * This file contains the i386 architecture specific IDE code. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __ASMi386_IDE_H | ||
| 10 | #define __ASMi386_IDE_H | ||
| 11 | |||
| 12 | #ifdef __KERNEL__ | ||
| 13 | |||
| 14 | |||
| 15 | #ifndef MAX_HWIFS | ||
| 16 | # ifdef CONFIG_BLK_DEV_IDEPCI | ||
| 17 | #define MAX_HWIFS 10 | ||
| 18 | # else | ||
| 19 | #define MAX_HWIFS 6 | ||
| 20 | # endif | ||
| 21 | #endif | ||
| 22 | |||
| 23 | static __inline__ int ide_default_irq(unsigned long base) | ||
| 24 | { | ||
| 25 | switch (base) { | ||
| 26 | case 0x1f0: return 14; | ||
| 27 | case 0x170: return 15; | ||
| 28 | case 0x1e8: return 11; | ||
| 29 | case 0x168: return 10; | ||
| 30 | case 0x1e0: return 8; | ||
| 31 | case 0x160: return 12; | ||
| 32 | default: | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | static __inline__ unsigned long ide_default_io_base(int index) | ||
| 38 | { | ||
| 39 | /* | ||
| 40 | * If PCI is present then it is not safe to poke around | ||
| 41 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | ||
| 42 | * defined compatibility mode ports for PCI. A user can | ||
| 43 | * override this using ide= but we must default safe. | ||
| 44 | */ | ||
| 45 | if (no_pci_devices()) { | ||
| 46 | switch(index) { | ||
| 47 | case 2: return 0x1e8; | ||
| 48 | case 3: return 0x168; | ||
| 49 | case 4: return 0x1e0; | ||
| 50 | case 5: return 0x160; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | switch (index) { | ||
| 54 | case 0: return 0x1f0; | ||
| 55 | case 1: return 0x170; | ||
| 56 | default: | ||
| 57 | return 0; | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | #include <asm-generic/ide_iops.h> | ||
| 62 | |||
| 63 | #endif /* __KERNEL__ */ | ||
| 64 | |||
| 65 | #endif /* __ASMi386_IDE_H */ | ||
diff --git a/include/asm-xtensa/ide.h b/include/asm-xtensa/ide.h deleted file mode 100644 index 6b912742a42d..000000000000 --- a/include/asm-xtensa/ide.h +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-xtensa/ide.h | ||
| 3 | * | ||
| 4 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 5 | * License. See the file "COPYING" in the main directory of this archive | ||
| 6 | * for more details. | ||
| 7 | * | ||
| 8 | * Copyright (C) 1994 - 1996 Linus Torvalds & authors | ||
| 9 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _XTENSA_IDE_H | ||
| 13 | #define _XTENSA_IDE_H | ||
| 14 | |||
| 15 | #ifdef __KERNEL__ | ||
| 16 | |||
| 17 | |||
| 18 | #ifndef MAX_HWIFS | ||
| 19 | # define MAX_HWIFS 1 | ||
| 20 | #endif | ||
| 21 | |||
| 22 | static __inline__ int ide_default_irq(unsigned long base) | ||
| 23 | { | ||
| 24 | /* Unsupported! */ | ||
| 25 | return 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | static __inline__ unsigned long ide_default_io_base(int index) | ||
| 29 | { | ||
| 30 | /* Unsupported! */ | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | #endif /* __KERNEL__ */ | ||
| 35 | #endif /* _XTENSA_IDE_H */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index d67ccca2b964..b846bc44a27e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -211,7 +211,21 @@ static inline int __ide_default_irq(unsigned long base) | |||
| 211 | return 0; | 211 | return 0; |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
| 215 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
| 216 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
| 214 | #include <asm/ide.h> | 217 | #include <asm/ide.h> |
| 218 | #else | ||
| 219 | #include <asm-generic/ide_iops.h> | ||
| 220 | #endif | ||
| 221 | |||
| 222 | #ifndef MAX_HWIFS | ||
| 223 | #if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA) | ||
| 224 | # define MAX_HWIFS 1 | ||
| 225 | #else | ||
| 226 | # define MAX_HWIFS 10 | ||
| 227 | #endif | ||
| 228 | #endif | ||
| 215 | 229 | ||
| 216 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) | 230 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) |
| 217 | #undef MAX_HWIFS | 231 | #undef MAX_HWIFS |
| @@ -532,12 +546,16 @@ struct ide_dma_ops { | |||
| 532 | void (*dma_timeout)(struct ide_drive_s *); | 546 | void (*dma_timeout)(struct ide_drive_s *); |
| 533 | }; | 547 | }; |
| 534 | 548 | ||
| 549 | struct ide_host; | ||
| 550 | |||
| 535 | typedef struct hwif_s { | 551 | typedef struct hwif_s { |
| 536 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 552 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
| 537 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 553 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
| 538 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | 554 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ |
| 539 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 555 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
| 540 | 556 | ||
| 557 | struct ide_host *host; | ||
| 558 | |||
| 541 | char name[6]; /* name of interface, eg. "ide0" */ | 559 | char name[6]; /* name of interface, eg. "ide0" */ |
| 542 | 560 | ||
| 543 | struct ide_io_ports io_ports; | 561 | struct ide_io_ports io_ports; |
| @@ -626,6 +644,9 @@ typedef struct hwif_s { | |||
| 626 | struct ide_host { | 644 | struct ide_host { |
| 627 | ide_hwif_t *ports[MAX_HWIFS]; | 645 | ide_hwif_t *ports[MAX_HWIFS]; |
| 628 | unsigned int n_ports; | 646 | unsigned int n_ports; |
| 647 | struct device *dev[2]; | ||
| 648 | unsigned long host_flags; | ||
| 649 | void *host_priv; | ||
| 629 | }; | 650 | }; |
| 630 | 651 | ||
| 631 | /* | 652 | /* |
| @@ -874,6 +895,9 @@ struct ide_driver_s { | |||
| 874 | 895 | ||
| 875 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) | 896 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) |
| 876 | 897 | ||
| 898 | int ide_device_get(ide_drive_t *); | ||
| 899 | void ide_device_put(ide_drive_t *); | ||
| 900 | |||
| 877 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); | 901 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); |
| 878 | 902 | ||
| 879 | extern int ide_vlb_clk; | 903 | extern int ide_vlb_clk; |
| @@ -1182,7 +1206,7 @@ enum { | |||
| 1182 | 1206 | ||
| 1183 | struct ide_port_info { | 1207 | struct ide_port_info { |
| 1184 | char *name; | 1208 | char *name; |
| 1185 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1209 | unsigned int (*init_chipset)(struct pci_dev *); |
| 1186 | void (*init_iops)(ide_hwif_t *); | 1210 | void (*init_iops)(ide_hwif_t *); |
| 1187 | void (*init_hwif)(ide_hwif_t *); | 1211 | void (*init_hwif)(ide_hwif_t *); |
| 1188 | int (*init_dma)(ide_hwif_t *, | 1212 | int (*init_dma)(ide_hwif_t *, |
| @@ -1201,8 +1225,10 @@ struct ide_port_info { | |||
| 1201 | u8 udma_mask; | 1225 | u8 udma_mask; |
| 1202 | }; | 1226 | }; |
| 1203 | 1227 | ||
| 1204 | int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); | 1228 | int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *); |
| 1205 | int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); | 1229 | int ide_pci_init_two(struct pci_dev *, struct pci_dev *, |
| 1230 | const struct ide_port_info *, void *); | ||
| 1231 | void ide_pci_remove(struct pci_dev *); | ||
| 1206 | 1232 | ||
| 1207 | void ide_map_sg(ide_drive_t *, struct request *); | 1233 | void ide_map_sg(ide_drive_t *, struct request *); |
| 1208 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1234 | void ide_init_sg_cmd(ide_drive_t *, struct request *); |
