diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/configs/sandpoint_defconfig | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/sandpoint.c | 94 | ||||
-rw-r--r-- | arch/ppc/platforms/sandpoint.h | 3 |
3 files changed, 1 insertions, 98 deletions
diff --git a/arch/ppc/configs/sandpoint_defconfig b/arch/ppc/configs/sandpoint_defconfig index fb493a67c60d..9525e34138fc 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 | # |
192 | CONFIG_IDE_GENERIC=y | 192 | CONFIG_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/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 3352fae1c722..b4897bdb742a 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 | */ | ||
566 | static int sandpoint_ide_ports_known = 0; | ||
567 | static unsigned long sandpoint_ide_regbase[MAX_HWIFS]; | ||
568 | static unsigned long sandpoint_ide_ctl_regbase[MAX_HWIFS]; | ||
569 | static unsigned long sandpoint_idedma_regbase; | ||
570 | |||
571 | static void | ||
572 | sandpoint_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 | |||
589 | static int | ||
590 | sandpoint_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 | |||
603 | static unsigned long | ||
604 | sandpoint_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 | |||
612 | static void __init | ||
613 | sandpoint_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 3b64e6418489..ed83759e4044 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 | /* |