aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/ide.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:39:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:39:24 -0400
commit188da98800893691e47eea9335a234378e32aceb (patch)
tree57dbf491d23676e011b4946ec1867a6d55a02eef /include/asm-powerpc/ide.h
parent07fe944e87d79f8d7e1b090913fe9f2ace78f41d (diff)
parent273b8385e5817a4765f82257004c5ec661a6a5b2 (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: (58 commits) ide: remove ide_init_default_irq() macro ide: move default IDE ports setup to ide_generic host driver ide: remove obsoleted "idex=noprobe" kernel parameter (take 2) ide: remove needless hwif->irq check from ide_hwif_configure() ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers ide: limit legacy VLB host drivers to alpha, x86 and mips cmd640: init hwif->{io_ports,irq} explicitly cmd640: cleanup setup_device_ptrs() ide: add ide-4drives host driver (take 3) ide: remove ppc ifdef from init_ide_data() ide: remove ide_default_io_ctl() macro ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) ppc/pmac: remove no longer needed IDE quirk ppc: don't include <linux/ide.h> ppc: remove ppc_ide_md ppc/pplus: remove ppc_ide_md.ide_init_hwif hook ppc/sandpoint: remove ppc_ide_md hooks ppc/lopec: remove ppc_ide_md hooks ppc/mpc8xx: remove ppc_ide_md hooks ...
Diffstat (limited to 'include/asm-powerpc/ide.h')
-rw-r--r--include/asm-powerpc/ide.h57
1 files changed, 32 insertions, 25 deletions
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h
index 6d50310ecaea..3d90bf7d3d73 100644
--- a/include/asm-powerpc/ide.h
+++ b/include/asm-powerpc/ide.h
@@ -31,39 +31,48 @@
31#include <linux/hdreg.h> 31#include <linux/hdreg.h>
32#include <linux/ioport.h> 32#include <linux/ioport.h>
33 33
34struct ide_machdep_calls { 34/* FIXME: use ide_platform host driver */
35 int (*default_irq)(unsigned long base);
36 unsigned long (*default_io_base)(int index);
37 void (*ide_init_hwif)(hw_regs_t *hw,
38 unsigned long data_port,
39 unsigned long ctrl_port,
40 int *irq);
41};
42
43extern struct ide_machdep_calls ppc_ide_md;
44
45#define IDE_ARCH_OBSOLETE_DEFAULTS
46
47static __inline__ int ide_default_irq(unsigned long base) 35static __inline__ int ide_default_irq(unsigned long base)
48{ 36{
49 if (ppc_ide_md.default_irq) 37#ifdef CONFIG_PPLUS
50 return ppc_ide_md.default_irq(base); 38 switch (base) {
39 case 0x1f0: return 14;
40 case 0x170: return 15;
41 }
42#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
51 return 0; 53 return 0;
52} 54}
53 55
56/* FIXME: use ide_platform host driver */
54static __inline__ unsigned long ide_default_io_base(int index) 57static __inline__ unsigned long ide_default_io_base(int index)
55{ 58{
56 if (ppc_ide_md.default_io_base) 59#ifdef CONFIG_PPLUS
57 return ppc_ide_md.default_io_base(index); 60 switch (index) {
61 case 0: return 0x1f0;
62 case 1: return 0x170;
63 }
64#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
58 return 0; 73 return 0;
59} 74}
60 75
61#ifdef CONFIG_PCI
62#define ide_init_default_irq(base) (0)
63#else
64#define ide_init_default_irq(base) ide_default_irq(base)
65#endif
66
67#ifdef CONFIG_BLK_DEV_MPC8xx_IDE 76#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
68#define IDE_ARCH_ACK_INTR 1 77#define IDE_ARCH_ACK_INTR 1
69#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) 78#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
@@ -71,8 +80,6 @@ static __inline__ unsigned long ide_default_io_base(int index)
71 80
72#endif /* __powerpc64__ */ 81#endif /* __powerpc64__ */
73 82
74#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
75
76#endif /* __KERNEL__ */ 83#endif /* __KERNEL__ */
77 84
78#endif /* _ASM_POWERPC_IDE_H */ 85#endif /* _ASM_POWERPC_IDE_H */