diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:32 -0400 |
commit | 1d850bd0b291efd1740b8d87ce025363436eb6dc (patch) | |
tree | e0bfb32a27b58074206ec02a455272054c899ca2 /include | |
parent | 5d682e4407d8364c286650baafcccae54d4b7c89 (diff) |
ppc: remove ppc_ide_md
* Add special cases for pplus and prep to ide_default_{irq,io_base}()
(+ FIXMEs about the need to use IDE platform host driver instead).
* Remove no longer needed ppc_ide_md and struct ide_machdep_calls.
* Then remove <linux/ide.h> include from:
- arch/powerpc/kernel/setup_32.c
- arch/ppc/kernel/ppc_ksyms.c
- arch/ppc/kernel/setup.c
- arch/ppc/platforms/pplus.c
- arch/ppc/platforms/prep_setup.c
There should be no functional changes caused by this patch.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-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 | ||