aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
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 /arch/ppc
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 'arch/ppc')
-rw-r--r--arch/ppc/configs/sandpoint_defconfig2
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c5
-rw-r--r--arch/ppc/kernel/setup.c2
-rw-r--r--arch/ppc/platforms/4xx/bamboo.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.c1
-rw-r--r--arch/ppc/platforms/4xx/luan.c1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c1
-rw-r--r--arch/ppc/platforms/4xx/yucca.c1
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/cpci690.c1
-rw-r--r--arch/ppc/platforms/ev64260.c1
-rw-r--r--arch/ppc/platforms/hdpu.c36
-rw-r--r--arch/ppc/platforms/lopec.c85
-rw-r--r--arch/ppc/platforms/mvme5100.c1
-rw-r--r--arch/ppc/platforms/powerpmc250.c1
-rw-r--r--arch/ppc/platforms/pplus.c58
-rw-r--r--arch/ppc/platforms/prep_setup.c38
-rw-r--r--arch/ppc/platforms/prpmc750.c1
-rw-r--r--arch/ppc/platforms/prpmc800.c1
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c1
-rw-r--r--arch/ppc/platforms/residual.c1
-rw-r--r--arch/ppc/platforms/sandpoint.c94
-rw-r--r--arch/ppc/platforms/sandpoint.h3
-rw-r--r--arch/ppc/platforms/spruce.c1
-rw-r--r--arch/ppc/syslib/m8xx_setup.c6
-rw-r--r--arch/ppc/syslib/ppc4xx_setup.c23
27 files changed, 1 insertions, 367 deletions
diff --git a/arch/ppc/configs/sandpoint_defconfig b/arch/ppc/configs/sandpoint_defconfig
index fb493a67c60..9525e34138f 100644
--- a/arch/ppc/configs/sandpoint_defconfig
+++ b/arch/ppc/configs/sandpoint_defconfig
@@ -189,7 +189,7 @@ CONFIG_IDE_TASKFILE_IO=y
189# 189#
190# IDE chipset support/bugfixes 190# IDE chipset support/bugfixes
191# 191#
192CONFIG_IDE_GENERIC=y 192CONFIG_BLK_DEV_SL82C105=y
193# CONFIG_BLK_DEV_IDEPCI is not set 193# CONFIG_BLK_DEV_IDEPCI is not set
194# CONFIG_BLK_DEV_IDEDMA is not set 194# CONFIG_BLK_DEV_IDEDMA is not set
195# CONFIG_IDEDMA_AUTO is not set 195# CONFIG_IDEDMA_AUTO is not set
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index c35350250cf..2ba659f401b 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -12,7 +12,6 @@
12#include <linux/irq.h> 12#include <linux/irq.h>
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/ide.h>
16#include <linux/pm.h> 15#include <linux/pm.h>
17#include <linux/bitops.h> 16#include <linux/bitops.h>
18 17
@@ -124,10 +123,6 @@ EXPORT_SYMBOL(__ioremap);
124EXPORT_SYMBOL(iounmap); 123EXPORT_SYMBOL(iounmap);
125EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */ 124EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
126 125
127#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
128EXPORT_SYMBOL(ppc_ide_md);
129#endif
130
131#ifdef CONFIG_PCI 126#ifdef CONFIG_PCI
132EXPORT_SYMBOL(isa_io_base); 127EXPORT_SYMBOL(isa_io_base);
133EXPORT_SYMBOL(isa_mem_base); 128EXPORT_SYMBOL(isa_mem_base);
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 294055902f0..bfddfdee0b6 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -10,7 +10,6 @@
10#include <linux/reboot.h> 10#include <linux/reboot.h>
11#include <linux/delay.h> 11#include <linux/delay.h>
12#include <linux/initrd.h> 12#include <linux/initrd.h>
13#include <linux/ide.h>
14#include <linux/screen_info.h> 13#include <linux/screen_info.h>
15#include <linux/bootmem.h> 14#include <linux/bootmem.h>
16#include <linux/seq_file.h> 15#include <linux/seq_file.h>
@@ -57,7 +56,6 @@ extern void ppc6xx_idle(void);
57extern void power4_idle(void); 56extern void power4_idle(void);
58 57
59extern boot_infos_t *boot_infos; 58extern boot_infos_t *boot_infos;
60struct ide_machdep_calls ppc_ide_md;
61 59
62/* Used with the BI_MEMSIZE bootinfo parameter to store the memory 60/* Used with the BI_MEMSIZE bootinfo parameter to store the memory
63 size value reported by the boot loader. */ 61 size value reported by the boot loader. */
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c
index 017623c9bc4..01f20f4c14f 100644
--- a/arch/ppc/platforms/4xx/bamboo.c
+++ b/arch/ppc/platforms/4xx/bamboo.c
@@ -22,7 +22,6 @@
22#include <linux/blkdev.h> 22#include <linux/blkdev.h>
23#include <linux/console.h> 23#include <linux/console.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/ide.h>
26#include <linux/initrd.h> 25#include <linux/initrd.h>
27#include <linux/seq_file.h> 26#include <linux/seq_file.h>
28#include <linux/root_dev.h> 27#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index 453643a0eee..8027a36fc5b 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -25,7 +25,6 @@
25#include <linux/blkdev.h> 25#include <linux/blkdev.h>
26#include <linux/console.h> 26#include <linux/console.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/ide.h>
29#include <linux/initrd.h> 28#include <linux/initrd.h>
30#include <linux/seq_file.h> 29#include <linux/seq_file.h>
31#include <linux/root_dev.h> 30#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index b79ebb8a3e6..f6d8c2e8b6b 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -23,7 +23,6 @@
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/console.h> 24#include <linux/console.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/ide.h>
27#include <linux/initrd.h> 26#include <linux/initrd.h>
28#include <linux/seq_file.h> 27#include <linux/seq_file.h>
29#include <linux/root_dev.h> 28#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index 28a712cd480..308386ef6f7 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -23,7 +23,6 @@
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/console.h> 24#include <linux/console.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/ide.h>
27#include <linux/initrd.h> 26#include <linux/initrd.h>
28#include <linux/seq_file.h> 27#include <linux/seq_file.h>
29#include <linux/root_dev.h> 28#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index f6a0c6650f3..11569427508 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -23,7 +23,6 @@
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/console.h> 24#include <linux/console.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/ide.h>
27#include <linux/initrd.h> 26#include <linux/initrd.h>
28#include <linux/seq_file.h> 27#include <linux/seq_file.h>
29#include <linux/root_dev.h> 28#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
index 66a44ff0d92..f6cfd44281f 100644
--- a/arch/ppc/platforms/4xx/yucca.c
+++ b/arch/ppc/platforms/4xx/yucca.c
@@ -24,7 +24,6 @@
24#include <linux/blkdev.h> 24#include <linux/blkdev.h>
25#include <linux/console.h> 25#include <linux/console.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/ide.h>
28#include <linux/initrd.h> 27#include <linux/initrd.h>
29#include <linux/seq_file.h> 28#include <linux/seq_file.h>
30#include <linux/root_dev.h> 29#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index dcd6070b85e..27c140f218e 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -22,7 +22,6 @@
22#include <linux/initrd.h> 22#include <linux/initrd.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/ide.h>
26#include <linux/serial.h> 25#include <linux/serial.h>
27#include <linux/serial_core.h> 26#include <linux/serial_core.h>
28#include <linux/serial_8250.h> 27#include <linux/serial_8250.h>
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c
index e78bccf96c9..07f672d5876 100644
--- a/arch/ppc/platforms/cpci690.c
+++ b/arch/ppc/platforms/cpci690.c
@@ -10,7 +10,6 @@
10 */ 10 */
11#include <linux/delay.h> 11#include <linux/delay.h>
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/ide.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15#include <linux/fs.h> 14#include <linux/fs.h>
16#include <linux/seq_file.h> 15#include <linux/seq_file.h>
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index c1f77e1d368..f522b31c46d 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -23,7 +23,6 @@
23 23
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <linux/ide.h>
27#include <linux/irq.h> 26#include <linux/irq.h>
28#include <linux/fs.h> 27#include <linux/fs.h>
29#include <linux/seq_file.h> 28#include <linux/seq_file.h>
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c
index ca5de13712f..904b518c152 100644
--- a/arch/ppc/platforms/hdpu.c
+++ b/arch/ppc/platforms/hdpu.c
@@ -16,7 +16,6 @@
16#include <linux/pci.h> 16#include <linux/pci.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/irq.h> 18#include <linux/irq.h>
19#include <linux/ide.h>
20#include <linux/seq_file.h> 19#include <linux/seq_file.h>
21#include <linux/platform_device.h> 20#include <linux/platform_device.h>
22 21
@@ -604,41 +603,6 @@ static void parse_bootinfo(unsigned long r3,
604 } 603 }
605} 604}
606 605
607#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
608static void
609hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name)
610{
611 request_region(from, extent, name);
612 return;
613}
614
615static void hdpu_ide_release_region(ide_ioreg_t from, unsigned int extent)
616{
617 release_region(from, extent);
618 return;
619}
620
621static void __init
622hdpu_ide_pci_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
623 ide_ioreg_t ctrl_port, int *irq)
624{
625 struct pci_dev *dev;
626
627 pci_for_each_dev(dev) {
628 if (((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) ||
629 ((dev->class >> 8) == PCI_CLASS_STORAGE_RAID)) {
630 hw->irq = dev->irq;
631
632 if (irq != NULL) {
633 *irq = dev->irq;
634 }
635 }
636 }
637
638 return;
639}
640#endif
641
642void hdpu_heartbeat(void) 606void hdpu_heartbeat(void)
643{ 607{
644 if (mv64x60_read(&bh, MV64x60_GPP_VALUE) & (1 << 5)) 608 if (mv64x60_read(&bh, MV64x60_GPP_VALUE) & (1 << 5))
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c
index b947c774f52..1e3aa6e9b6c 100644
--- a/arch/ppc/platforms/lopec.c
+++ b/arch/ppc/platforms/lopec.c
@@ -15,7 +15,6 @@
15#include <linux/pci_ids.h> 15#include <linux/pci_ids.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/ide.h>
19#include <linux/seq_file.h> 18#include <linux/seq_file.h>
20#include <linux/initrd.h> 19#include <linux/initrd.h>
21#include <linux/console.h> 20#include <linux/console.h>
@@ -168,85 +167,6 @@ lopec_power_off(void)
168 lopec_halt(); 167 lopec_halt();
169} 168}
170 169
171#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
172int lopec_ide_ports_known = 0;
173static unsigned long lopec_ide_regbase[MAX_HWIFS];
174static unsigned long lopec_ide_ctl_regbase[MAX_HWIFS];
175static unsigned long lopec_idedma_regbase;
176
177static void
178lopec_ide_probe(void)
179{
180 struct pci_dev *dev = pci_get_device(PCI_VENDOR_ID_WINBOND,
181 PCI_DEVICE_ID_WINBOND_82C105,
182 NULL);
183 lopec_ide_ports_known = 1;
184
185 if (dev) {
186 lopec_ide_regbase[0] = dev->resource[0].start;
187 lopec_ide_regbase[1] = dev->resource[2].start;
188 lopec_ide_ctl_regbase[0] = dev->resource[1].start;
189 lopec_ide_ctl_regbase[1] = dev->resource[3].start;
190 lopec_idedma_regbase = dev->resource[4].start;
191 pci_dev_put(dev);
192 }
193}
194
195static int
196lopec_ide_default_irq(unsigned long base)
197{
198 if (lopec_ide_ports_known == 0)
199 lopec_ide_probe();
200
201 if (base == lopec_ide_regbase[0])
202 return 14;
203 else if (base == lopec_ide_regbase[1])
204 return 15;
205 else
206 return 0;
207}
208
209static unsigned long
210lopec_ide_default_io_base(int index)
211{
212 if (lopec_ide_ports_known == 0)
213 lopec_ide_probe();
214 return lopec_ide_regbase[index];
215}
216
217static void __init
218lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data,
219 unsigned long ctl, int *irq)
220{
221 unsigned long reg = data;
222 uint alt_status_base;
223 int i;
224
225 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
226 hw->io_ports[i] = reg++;
227
228 if (data == lopec_ide_regbase[0]) {
229 alt_status_base = lopec_ide_ctl_regbase[0] + 2;
230 hw->irq = 14;
231 } else if (data == lopec_ide_regbase[1]) {
232 alt_status_base = lopec_ide_ctl_regbase[1] + 2;
233 hw->irq = 15;
234 } else {
235 alt_status_base = 0;
236 hw->irq = 0;
237 }
238
239 if (ctl)
240 hw->io_ports[IDE_CONTROL_OFFSET] = ctl;
241 else
242 hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base;
243
244 if (irq != NULL)
245 *irq = hw->irq;
246
247}
248#endif /* BLK_DEV_IDE */
249
250static void __init 170static void __init
251lopec_init_IRQ(void) 171lopec_init_IRQ(void)
252{ 172{
@@ -384,11 +304,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
384 ppc_md.nvram_read_val = todc_direct_read_val; 304 ppc_md.nvram_read_val = todc_direct_read_val;
385 ppc_md.nvram_write_val = todc_direct_write_val; 305 ppc_md.nvram_write_val = todc_direct_write_val;
386 306
387#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
388 ppc_ide_md.default_irq = lopec_ide_default_irq;
389 ppc_ide_md.default_io_base = lopec_ide_default_io_base;
390 ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports;
391#endif
392#ifdef CONFIG_SERIAL_TEXT_DEBUG 307#ifdef CONFIG_SERIAL_TEXT_DEBUG
393 ppc_md.progress = gen550_progress; 308 ppc_md.progress = gen550_progress;
394#endif 309#endif
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c
index bb8d4a45437..053b54ac88f 100644
--- a/arch/ppc/platforms/mvme5100.c
+++ b/arch/ppc/platforms/mvme5100.c
@@ -17,7 +17,6 @@
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18#include <linux/console.h> 18#include <linux/console.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/ide.h>
21#include <linux/seq_file.h> 20#include <linux/seq_file.h>
22#include <linux/kdev_t.h> 21#include <linux/kdev_t.h>
23#include <linux/root_dev.h> 22#include <linux/root_dev.h>
diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c
index 4d46650e07f..162dc85ff7b 100644
--- a/arch/ppc/platforms/powerpmc250.c
+++ b/arch/ppc/platforms/powerpmc250.c
@@ -25,7 +25,6 @@
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/seq_file.h> 27#include <linux/seq_file.h>
28#include <linux/ide.h>
29#include <linux/root_dev.h> 28#include <linux/root_dev.h>
30 29
31#include <asm/byteorder.h> 30#include <asm/byteorder.h>
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c
index 8a1788c4815..cbcac85c7a7 100644
--- a/arch/ppc/platforms/pplus.c
+++ b/arch/ppc/platforms/pplus.c
@@ -19,7 +19,6 @@
19#include <linux/ioport.h> 19#include <linux/ioport.h>
20#include <linux/console.h> 20#include <linux/console.h>
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <linux/ide.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
24#include <linux/root_dev.h> 23#include <linux/root_dev.h>
25 24
@@ -668,57 +667,6 @@ static void __init pplus_init_IRQ(void)
668 ppc_md.progress("init_irq: exit", 0); 667 ppc_md.progress("init_irq: exit", 0);
669} 668}
670 669
671#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
672/*
673 * IDE stuff.
674 */
675static int pplus_ide_default_irq(unsigned long base)
676{
677 switch (base) {
678 case 0x1f0:
679 return 14;
680 case 0x170:
681 return 15;
682 default:
683 return 0;
684 }
685}
686
687static unsigned long pplus_ide_default_io_base(int index)
688{
689 switch (index) {
690 case 0:
691 return 0x1f0;
692 case 1:
693 return 0x170;
694 default:
695 return 0;
696 }
697}
698
699static void __init
700pplus_ide_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
701 unsigned long ctrl_port, int *irq)
702{
703 unsigned long reg = data_port;
704 int i;
705
706 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
707 hw->io_ports[i] = reg;
708 reg += 1;
709 }
710
711 if (ctrl_port)
712 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
713 else
714 hw->io_ports[IDE_CONTROL_OFFSET] =
715 hw->io_ports[IDE_DATA_OFFSET] + 0x206;
716
717 if (irq != NULL)
718 *irq = pplus_ide_default_irq(data_port);
719}
720#endif
721
722#ifdef CONFIG_SMP 670#ifdef CONFIG_SMP
723/* PowerPlus (MTX) support */ 671/* PowerPlus (MTX) support */
724static int __init smp_pplus_probe(void) 672static int __init smp_pplus_probe(void)
@@ -884,12 +832,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
884 ppc_md.find_end_of_memory = pplus_find_end_of_memory; 832 ppc_md.find_end_of_memory = pplus_find_end_of_memory;
885 ppc_md.setup_io_mappings = pplus_map_io; 833 ppc_md.setup_io_mappings = pplus_map_io;
886 834
887#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
888 ppc_ide_md.default_irq = pplus_ide_default_irq;
889 ppc_ide_md.default_io_base = pplus_ide_default_io_base;
890 ppc_ide_md.ide_init_hwif = pplus_ide_init_hwif_ports;
891#endif
892
893#ifdef CONFIG_SERIAL_TEXT_DEBUG 835#ifdef CONFIG_SERIAL_TEXT_DEBUG
894 ppc_md.progress = gen550_progress; 836 ppc_md.progress = gen550_progress;
895#endif /* CONFIG_SERIAL_TEXT_DEBUG */ 837#endif /* CONFIG_SERIAL_TEXT_DEBUG */
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 38449855d5f..465b658c927 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -33,7 +33,6 @@
33#include <linux/console.h> 33#include <linux/console.h>
34#include <linux/timex.h> 34#include <linux/timex.h>
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/ide.h>
37#include <linux/seq_file.h> 36#include <linux/seq_file.h>
38#include <linux/root_dev.h> 37#include <linux/root_dev.h>
39 38
@@ -894,38 +893,6 @@ prep_init_IRQ(void)
894 i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR, 0); 893 i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR, 0);
895} 894}
896 895
897#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
898/*
899 * IDE stuff.
900 */
901static int
902prep_ide_default_irq(unsigned long base)
903{
904 switch (base) {
905 case 0x1f0: return 13;
906 case 0x170: return 13;
907 case 0x1e8: return 11;
908 case 0x168: return 10;
909 case 0xfff0: return 14; /* MCP(N)750 ide0 */
910 case 0xffe0: return 15; /* MCP(N)750 ide1 */
911 default: return 0;
912 }
913}
914
915static unsigned long
916prep_ide_default_io_base(int index)
917{
918 switch (index) {
919 case 0: return 0x1f0;
920 case 1: return 0x170;
921 case 2: return 0x1e8;
922 case 3: return 0x168;
923 default:
924 return 0;
925 }
926}
927#endif
928
929#ifdef CONFIG_SMP 896#ifdef CONFIG_SMP
930/* PReP (MTX) support */ 897/* PReP (MTX) support */
931static int __init 898static int __init
@@ -1070,11 +1037,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
1070 1037
1071 ppc_md.setup_io_mappings = prep_map_io; 1038 ppc_md.setup_io_mappings = prep_map_io;
1072 1039
1073#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
1074 ppc_ide_md.default_irq = prep_ide_default_irq;
1075 ppc_ide_md.default_io_base = prep_ide_default_io_base;
1076#endif
1077
1078#ifdef CONFIG_SMP 1040#ifdef CONFIG_SMP
1079 smp_ops = &prep_smp_ops; 1041 smp_ops = &prep_smp_ops;
1080#endif /* CONFIG_SMP */ 1042#endif /* CONFIG_SMP */
diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c
index fcab513e206..93bd593cf95 100644
--- a/arch/ppc/platforms/prpmc750.c
+++ b/arch/ppc/platforms/prpmc750.c
@@ -22,7 +22,6 @@
22#include <linux/console.h> 22#include <linux/console.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/ide.h>
26#include <linux/root_dev.h> 25#include <linux/root_dev.h>
27#include <linux/slab.h> 26#include <linux/slab.h>
28#include <linux/serial_reg.h> 27#include <linux/serial_reg.h>
diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c
index f4ade5cd7a8..5bcda7f92cd 100644
--- a/arch/ppc/platforms/prpmc800.c
+++ b/arch/ppc/platforms/prpmc800.c
@@ -20,7 +20,6 @@
20#include <linux/console.h> 20#include <linux/console.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/ide.h>
24#include <linux/root_dev.h> 23#include <linux/root_dev.h>
25#include <linux/harrier_defs.h> 24#include <linux/harrier_defs.h>
26 25
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index 44d4398a36f..179b4a99b5b 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -29,7 +29,6 @@
29#include <linux/initrd.h> 29#include <linux/initrd.h>
30#include <linux/console.h> 30#include <linux/console.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/ide.h>
33#include <linux/seq_file.h> 32#include <linux/seq_file.h>
34#include <linux/root_dev.h> 33#include <linux/root_dev.h>
35#include <linux/serial.h> 34#include <linux/serial.h>
diff --git a/arch/ppc/platforms/residual.c b/arch/ppc/platforms/residual.c
index c9911601cfd..18495e754e3 100644
--- a/arch/ppc/platforms/residual.c
+++ b/arch/ppc/platforms/residual.c
@@ -38,7 +38,6 @@
38#include <linux/init.h> 38#include <linux/init.h>
39#include <linux/ioport.h> 39#include <linux/ioport.h>
40#include <linux/pci.h> 40#include <linux/pci.h>
41#include <linux/ide.h>
42 41
43#include <asm/sections.h> 42#include <asm/sections.h>
44#include <asm/mmu.h> 43#include <asm/mmu.h>
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c
index 3352fae1c72..b4897bdb742 100644
--- a/arch/ppc/platforms/sandpoint.c
+++ b/arch/ppc/platforms/sandpoint.c
@@ -71,7 +71,6 @@
71#include <linux/initrd.h> 71#include <linux/initrd.h>
72#include <linux/console.h> 72#include <linux/console.h>
73#include <linux/delay.h> 73#include <linux/delay.h>
74#include <linux/ide.h>
75#include <linux/seq_file.h> 74#include <linux/seq_file.h>
76#include <linux/root_dev.h> 75#include <linux/root_dev.h>
77#include <linux/serial.h> 76#include <linux/serial.h>
@@ -559,93 +558,6 @@ sandpoint_show_cpuinfo(struct seq_file *m)
559 return 0; 558 return 0;
560} 559}
561 560
562#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
563/*
564 * IDE support.
565 */
566static int sandpoint_ide_ports_known = 0;
567static unsigned long sandpoint_ide_regbase[MAX_HWIFS];
568static unsigned long sandpoint_ide_ctl_regbase[MAX_HWIFS];
569static unsigned long sandpoint_idedma_regbase;
570
571static void
572sandpoint_ide_probe(void)
573{
574 struct pci_dev *pdev = pci_get_device(PCI_VENDOR_ID_WINBOND,
575 PCI_DEVICE_ID_WINBOND_82C105, NULL);
576
577 if (pdev) {
578 sandpoint_ide_regbase[0]=pdev->resource[0].start;
579 sandpoint_ide_regbase[1]=pdev->resource[2].start;
580 sandpoint_ide_ctl_regbase[0]=pdev->resource[1].start;
581 sandpoint_ide_ctl_regbase[1]=pdev->resource[3].start;
582 sandpoint_idedma_regbase=pdev->resource[4].start;
583 pci_dev_put(pdev);
584 }
585
586 sandpoint_ide_ports_known = 1;
587}
588
589static int
590sandpoint_ide_default_irq(unsigned long base)
591{
592 if (sandpoint_ide_ports_known == 0)
593 sandpoint_ide_probe();
594
595 if (base == sandpoint_ide_regbase[0])
596 return SANDPOINT_IDE_INT0;
597 else if (base == sandpoint_ide_regbase[1])
598 return SANDPOINT_IDE_INT1;
599 else
600 return 0;
601}
602
603static unsigned long
604sandpoint_ide_default_io_base(int index)
605{
606 if (sandpoint_ide_ports_known == 0)
607 sandpoint_ide_probe();
608
609 return sandpoint_ide_regbase[index];
610}
611
612static void __init
613sandpoint_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
614 unsigned long ctrl_port, int *irq)
615{
616 unsigned long reg = data_port;
617 uint alt_status_base;
618 int i;
619
620 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
621 hw->io_ports[i] = reg++;
622 }
623
624 if (data_port == sandpoint_ide_regbase[0]) {
625 alt_status_base = sandpoint_ide_ctl_regbase[0] + 2;
626 hw->irq = 14;
627 }
628 else if (data_port == sandpoint_ide_regbase[1]) {
629 alt_status_base = sandpoint_ide_ctl_regbase[1] + 2;
630 hw->irq = 15;
631 }
632 else {
633 alt_status_base = 0;
634 hw->irq = 0;
635 }
636
637 if (ctrl_port) {
638 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
639 } else {
640 hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base;
641 }
642
643 if (irq != NULL) {
644 *irq = hw->irq;
645 }
646}
647#endif
648
649/* 561/*
650 * Set BAT 3 to map 0xf8000000 to end of physical memory space 1-to-1. 562 * Set BAT 3 to map 0xf8000000 to end of physical memory space 1-to-1.
651 */ 563 */
@@ -736,10 +648,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
736#ifdef CONFIG_SERIAL_TEXT_DEBUG 648#ifdef CONFIG_SERIAL_TEXT_DEBUG
737 ppc_md.progress = gen550_progress; 649 ppc_md.progress = gen550_progress;
738#endif 650#endif
739
740#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
741 ppc_ide_md.default_irq = sandpoint_ide_default_irq;
742 ppc_ide_md.default_io_base = sandpoint_ide_default_io_base;
743 ppc_ide_md.ide_init_hwif = sandpoint_ide_init_hwif_ports;
744#endif
745} 651}
diff --git a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h
index 3b64e641848..ed83759e404 100644
--- a/arch/ppc/platforms/sandpoint.h
+++ b/arch/ppc/platforms/sandpoint.h
@@ -28,9 +28,6 @@
28 */ 28 */
29#define SANDPOINT_IDE_INT0 23 /* EPIC 7 */ 29#define SANDPOINT_IDE_INT0 23 /* EPIC 7 */
30#define SANDPOINT_IDE_INT1 24 /* EPIC 8 */ 30#define SANDPOINT_IDE_INT1 24 /* EPIC 8 */
31#else
32#define SANDPOINT_IDE_INT0 14 /* 8259 Test */
33#define SANDPOINT_IDE_INT1 15 /* 8259 Test */
34#endif 31#endif
35 32
36/* 33/*
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c
index f4de50ba292..a344134f14b 100644
--- a/arch/ppc/platforms/spruce.c
+++ b/arch/ppc/platforms/spruce.c
@@ -22,7 +22,6 @@
22#include <linux/console.h> 22#include <linux/console.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/ide.h>
26#include <linux/root_dev.h> 25#include <linux/root_dev.h>
27#include <linux/serial.h> 26#include <linux/serial.h>
28#include <linux/tty.h> 27#include <linux/tty.h>
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 9caf850c9b3..19749e9bcf9 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -87,8 +87,6 @@ void m8xx_calibrate_decr(void);
87 87
88unsigned char __res[sizeof(bd_t)]; 88unsigned char __res[sizeof(bd_t)];
89 89
90extern void m8xx_ide_init(void);
91
92extern unsigned long find_available_memory(void); 90extern unsigned long find_available_memory(void);
93extern void m8xx_cpm_reset(void); 91extern void m8xx_cpm_reset(void);
94extern void m8xx_wdt_handler_install(bd_t *bp); 92extern void m8xx_wdt_handler_install(bd_t *bp);
@@ -474,8 +472,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
474 472
475 ppc_md.find_end_of_memory = m8xx_find_end_of_memory; 473 ppc_md.find_end_of_memory = m8xx_find_end_of_memory;
476 ppc_md.setup_io_mappings = m8xx_map_io; 474 ppc_md.setup_io_mappings = m8xx_map_io;
477
478#if defined(CONFIG_BLK_DEV_MPC8xx_IDE)
479 m8xx_ide_init();
480#endif
481} 475}
diff --git a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c
index debe14c083a..353d746b47e 100644
--- a/arch/ppc/syslib/ppc4xx_setup.c
+++ b/arch/ppc/syslib/ppc4xx_setup.c
@@ -24,7 +24,6 @@
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/rtc.h> 25#include <linux/rtc.h>
26#include <linux/console.h> 26#include <linux/console.h>
27#include <linux/ide.h>
28#include <linux/serial_reg.h> 27#include <linux/serial_reg.h>
29#include <linux/seq_file.h> 28#include <linux/seq_file.h>
30 29
@@ -189,24 +188,6 @@ ppc4xx_calibrate_decr(void)
189 mtspr(SPRN_PIT, tb_ticks_per_jiffy); 188 mtspr(SPRN_PIT, tb_ticks_per_jiffy);
190} 189}
191 190
192/*
193 * IDE stuff.
194 * should be generic for every IDE PCI chipset
195 */
196#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
197static void
198ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
199 unsigned long ctrl_port, int *irq)
200{
201 int i;
202
203 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; ++i)
204 hw->io_ports[i] = data_port + i - IDE_DATA_OFFSET;
205
206 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
207}
208#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
209
210TODC_ALLOC(); 191TODC_ALLOC();
211 192
212/* 193/*
@@ -271,10 +252,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
271#ifdef CONFIG_SERIAL_TEXT_DEBUG 252#ifdef CONFIG_SERIAL_TEXT_DEBUG
272 ppc_md.progress = gen550_progress; 253 ppc_md.progress = gen550_progress;
273#endif 254#endif
274
275#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
276 ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
277#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
278} 255}
279 256
280/* Called from machine_check_exception */ 257/* Called from machine_check_exception */