diff options
Diffstat (limited to 'include/asm-powerpc/ide.h')
-rw-r--r-- | include/asm-powerpc/ide.h | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 6d50310ecaea..06549456c953 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
@@ -31,30 +31,47 @@ | |||
31 | #include <linux/hdreg.h> | 31 | #include <linux/hdreg.h> |
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | 33 | ||
34 | struct ide_machdep_calls { | ||
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 | |||
43 | extern struct ide_machdep_calls ppc_ide_md; | ||
44 | |||
45 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 34 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
46 | 35 | ||
36 | /* FIXME: use ide_platform host driver */ | ||
47 | static __inline__ int ide_default_irq(unsigned long base) | 37 | static __inline__ int ide_default_irq(unsigned long base) |
48 | { | 38 | { |
49 | if (ppc_ide_md.default_irq) | 39 | #ifdef CONFIG_PPLUS |
50 | return ppc_ide_md.default_irq(base); | 40 | switch (base) { |
41 | case 0x1f0: return 14; | ||
42 | case 0x170: return 15; | ||
43 | } | ||
44 | #endif | ||
45 | #ifdef CONFIG_PPC_PREP | ||
46 | switch (base) { | ||
47 | case 0x1f0: return 13; | ||
48 | case 0x170: return 13; | ||
49 | case 0x1e8: return 11; | ||
50 | case 0x168: return 10; | ||
51 | case 0xfff0: return 14; /* MCP(N)750 ide0 */ | ||
52 | case 0xffe0: return 15; /* MCP(N)750 ide1 */ | ||
53 | } | ||
54 | #endif | ||
51 | return 0; | 55 | return 0; |
52 | } | 56 | } |
53 | 57 | ||
58 | /* FIXME: use ide_platform host driver */ | ||
54 | static __inline__ unsigned long ide_default_io_base(int index) | 59 | static __inline__ unsigned long ide_default_io_base(int index) |
55 | { | 60 | { |
56 | if (ppc_ide_md.default_io_base) | 61 | #ifdef CONFIG_PPLUS |
57 | return ppc_ide_md.default_io_base(index); | 62 | switch (index) { |
63 | case 0: return 0x1f0; | ||
64 | case 1: return 0x170; | ||
65 | } | ||
66 | #endif | ||
67 | #ifdef CONFIG_PPC_PREP | ||
68 | switch (index) { | ||
69 | case 0: return 0x1f0; | ||
70 | case 1: return 0x170; | ||
71 | case 2: return 0x1e8; | ||
72 | case 3: return 0x168; | ||
73 | } | ||
74 | #endif | ||
58 | return 0; | 75 | return 0; |
59 | } | 76 | } |
60 | 77 | ||