aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:30 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:30 -0400
commit7ef8df81def587ddb610b1c6f4572178ce0a97a6 (patch)
treede35be7dc199b77eda4883e5d6b02d2c9d35d4c1 /arch/ppc
parent5510b1255726d5d4ff424be4264aa0c99275dfdc (diff)
ppc/sandpoint: remove ppc_ide_md hooks
* Add IDE_HFLAG_FORCE_LEGACY_IRQS host flag for Motorola-Sandpoint platform to sl82c105 host driver. * Disable ide_generic host driver in arch/ppc/configs/sandpoint_defconfig and enable sl82c105 one. * Remove ppc_ide_md hooks from arch/ppc/platforms/sandpoint.c - no need for them (sl82c105 host driver takes care of all this setup). * Then remove no longer needed <linux/ide.h> include. * Also update arch/ppc/platforms/sandpoint.h. Unfortunately (unlike lopec's case) sl82c105 host driver was not enabled in defconfing so there is a funcionality change. [ Not a big deal since sl82c105 is superior over ide_generic. ] Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/configs/sandpoint_defconfig2
-rw-r--r--arch/ppc/platforms/sandpoint.c94
-rw-r--r--arch/ppc/platforms/sandpoint.h3
3 files changed, 1 insertions, 98 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/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/*