diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:24 -0400 |
commit | 188da98800893691e47eea9335a234378e32aceb (patch) | |
tree | 57dbf491d23676e011b4946ec1867a6d55a02eef /include/asm-powerpc | |
parent | 07fe944e87d79f8d7e1b090913fe9f2ace78f41d (diff) | |
parent | 273b8385e5817a4765f82257004c5ec661a6a5b2 (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')
-rw-r--r-- | include/asm-powerpc/ide.h | 57 | ||||
-rw-r--r-- | include/asm-powerpc/mediabay.h | 6 |
2 files changed, 37 insertions, 26 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 | ||
34 | struct 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 | |||
43 | extern struct ide_machdep_calls ppc_ide_md; | ||
44 | |||
45 | #define IDE_ARCH_OBSOLETE_DEFAULTS | ||
46 | |||
47 | static __inline__ int ide_default_irq(unsigned long base) | 35 | static __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 */ | ||
54 | static __inline__ unsigned long ide_default_io_base(int index) | 57 | static __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 */ |
diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h index de83fe196309..df111c362a7f 100644 --- a/include/asm-powerpc/mediabay.h +++ b/include/asm-powerpc/mediabay.h | |||
@@ -22,10 +22,14 @@ int check_media_bay(struct device_node *which_bay, int what); | |||
22 | /* Number of bays in the machine or 0 */ | 22 | /* Number of bays in the machine or 0 */ |
23 | extern int media_bay_count; | 23 | extern int media_bay_count; |
24 | 24 | ||
25 | #ifdef CONFIG_BLK_DEV_IDE_PMAC | ||
26 | #include <linux/ide.h> | ||
27 | |||
25 | int check_media_bay_by_base(unsigned long base, int what); | 28 | int check_media_bay_by_base(unsigned long base, int what); |
26 | /* called by IDE PMAC host driver to register IDE controller for media bay */ | 29 | /* called by IDE PMAC host driver to register IDE controller for media bay */ |
27 | int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, | 30 | int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, |
28 | int irq, int index); | 31 | int irq, ide_hwif_t *hwif); |
32 | #endif | ||
29 | 33 | ||
30 | #endif /* __KERNEL__ */ | 34 | #endif /* __KERNEL__ */ |
31 | #endif /* _PPC_MEDIABAY_H */ | 35 | #endif /* _PPC_MEDIABAY_H */ |