aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:40 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:40 -0500
commit807b90d0be23b8d088d4369b02539dada70f03f4 (patch)
tree422895c1232715ba04957fd993579c0d768fd6fd /drivers/ide
parent7704ca2a3ee4b3690c5dcc99ea4f8dcf10d7bbdb (diff)
ide: add IDE_HFLAG_NO_{IO32_BIT,UNMASK_IRQS} host flags
* Use the same bit for IDE_HFLAG_CS5520 and IDE_HFLAG_VDMA host flags (both are used only by cs5520 host driver currently). * Add IDE_HFLAG_NO_IO32_BIT host flag and use it instead of ->no_io_32bit ide_hwif_t field. * Add IDE_HFLAG_NO_UNMASK_IRQS host flag, then convert dtc2278 and rz1000 host drivers to use it. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c4
-rw-r--r--drivers/ide/legacy/dtc2278.c10
-rw-r--r--drivers/ide/mips/au1xxx-ide.c3
-rw-r--r--drivers/ide/pci/rz1000.c3
4 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 802a04ad6024..fee898c4a773 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -822,7 +822,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
822 for (unit = 0; unit < MAX_DRIVES; ++unit) { 822 for (unit = 0; unit < MAX_DRIVES; ++unit) {
823 ide_drive_t *drive = &hwif->drives[unit]; 823 ide_drive_t *drive = &hwif->drives[unit];
824 824
825 if (hwif->no_io_32bit) 825 if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
826 drive->no_io_32bit = 1; 826 drive->no_io_32bit = 1;
827 else 827 else
828 drive->no_io_32bit = drive->id->dword_io ? 1 : 0; 828 drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
@@ -1300,6 +1300,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
1300 drive->io_32bit = 1; 1300 drive->io_32bit = 1;
1301 if (hwif->host_flags & IDE_HFLAG_UNMASK_IRQS) 1301 if (hwif->host_flags & IDE_HFLAG_UNMASK_IRQS)
1302 drive->unmask = 1; 1302 drive->unmask = 1;
1303 if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
1304 drive->no_unmask = 1;
1303 if ((hwif->host_flags & IDE_HFLAG_NO_AUTOTUNE) == 0) 1305 if ((hwif->host_flags & IDE_HFLAG_NO_AUTOTUNE) == 0)
1304 drive->autotune = 1; 1306 drive->autotune = 1;
1305 } 1307 }
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 7cbf2f1f35f9..73396f70f2b7 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -89,7 +89,10 @@ static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio)
89static const struct ide_port_info dtc2278_port_info __initdata = { 89static const struct ide_port_info dtc2278_port_info __initdata = {
90 .chipset = ide_dtc2278, 90 .chipset = ide_dtc2278,
91 .host_flags = IDE_HFLAG_SERIALIZE | 91 .host_flags = IDE_HFLAG_SERIALIZE |
92 IDE_HFLAG_NO_UNMASK_IRQS |
92 IDE_HFLAG_IO_32BIT | 93 IDE_HFLAG_IO_32BIT |
94 /* disallow ->io_32bit changes */
95 IDE_HFLAG_NO_IO_32BIT |
93 IDE_HFLAG_NO_DMA | 96 IDE_HFLAG_NO_DMA |
94 IDE_HFLAG_NO_AUTOTUNE, 97 IDE_HFLAG_NO_AUTOTUNE,
95 .pio_mask = ATA_PIO4, 98 .pio_mask = ATA_PIO4,
@@ -125,14 +128,7 @@ static int __init dtc2278_probe(void)
125#endif 128#endif
126 local_irq_restore(flags); 129 local_irq_restore(flags);
127 130
128 hwif->no_io_32bit = 1; /* disallow ->io_32bit changes */
129 hwif->set_pio_mode = &dtc2278_set_pio_mode; 131 hwif->set_pio_mode = &dtc2278_set_pio_mode;
130 hwif->drives[0].no_unmask = 1;
131 hwif->drives[1].no_unmask = 1;
132
133 mate->no_io_32bit = 1;
134 mate->drives[0].no_unmask = 1;
135 mate->drives[1].no_unmask = 1;
136 132
137 ide_device_add(idx, &dtc2278_port_info); 133 ide_device_add(idx, &dtc2278_port_info);
138 134
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 484a9287bf84..0f4bf5d72835 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -551,6 +551,7 @@ static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif)
551static const struct ide_port_info au1xxx_port_info = { 551static const struct ide_port_info au1xxx_port_info = {
552 .host_flags = IDE_HFLAG_POST_SET_MODE | 552 .host_flags = IDE_HFLAG_POST_SET_MODE |
553 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */ 553 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
554 IDE_HFLAG_NO_IO_32BIT |
554 IDE_HFLAG_UNMASK_IRQS, 555 IDE_HFLAG_UNMASK_IRQS,
555 .pio_mask = ATA_PIO4, 556 .pio_mask = ATA_PIO4,
556#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 557#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
@@ -649,8 +650,6 @@ static int au_ide_probe(struct device *dev)
649 hwif->select_data = 0; /* no chipset-specific code */ 650 hwif->select_data = 0; /* no chipset-specific code */
650 hwif->config_data = 0; /* no chipset-specific code */ 651 hwif->config_data = 0; /* no chipset-specific code */
651 652
652 hwif->no_io_32bit = 1;
653
654 auide_hwif.hwif = hwif; 653 auide_hwif.hwif = hwif;
655 hwif->hwif_data = &auide_hwif; 654 hwif->hwif_data = &auide_hwif;
656 655
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c
index dd0d18ba0022..51676612f78f 100644
--- a/drivers/ide/pci/rz1000.c
+++ b/drivers/ide/pci/rz1000.c
@@ -33,8 +33,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
33 } else { 33 } else {
34 if (hwif->mate) 34 if (hwif->mate)
35 hwif->mate->serialized = hwif->serialized = 1; 35 hwif->mate->serialized = hwif->serialized = 1;
36 hwif->drives[0].no_unmask = 1; 36 hwif->host_flags |= IDE_HFLAG_NO_UNMASK_IRQS;
37 hwif->drives[1].no_unmask = 1;
38 printk(KERN_INFO "%s: serialized, disabled unmasking " 37 printk(KERN_INFO "%s: serialized, disabled unmasking "
39 "(buggy RZ1000/RZ1001)\n", hwif->name); 38 "(buggy RZ1000/RZ1001)\n", hwif->name);
40 } 39 }