summaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/au1xxx-ide.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-02-03 07:58:57 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-02-03 07:58:57 +1100
commit9135f1901ee6449dfe338adf6e40e9c2025b8150 (patch)
tree05e1ab38563a93cf0df8c05d21062b85b14f8491 /drivers/ide/mips/au1xxx-ide.c
parent124d3b7041f9a0ca7c43a6293e1cae4576c32fd5 (diff)
parentd59823fa44f7d9babf586b3c705db314aa0f9822 (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: (95 commits) ide-tape: remove idetape_config_t typedef ide-tape: remove mtio.h related comments ide-tape: make function name more accurate ide-tape: remove unused sense packet commands. ide-tape: use generic byteorder macros ide-tape: remove EXPERIMENTAL driver status ide-tape: use generic scsi commands ide-tape: remove struct idetape_block_size_page_t ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t ide-tape: remove struct idetape_parameter_block_descriptor_t ide-tape: remove struct idetape_medium_partition_page_t ide-tape: remove struct idetape_data_compression_page_t ide-tape: remove struct idetape_inquiry_result_t ide-tape: remove struct idetape_capabilities_page_t ide-tape: remove IDETAPE_DEBUG_BUGS ide-tape: remove IDETAPE_DEBUG_INFO ide-tape: dump gcw fields on error in idetape_identify_device() ide-tape: remove struct idetape_mode_parameter_header_t ide-tape: remove struct idetape_request_sense_result_t ide-tape: remove dead code ...
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index cd42b30a7a3..0f4bf5d7283 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -548,6 +548,17 @@ static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif)
*ata_regs = ahwif->regbase + (14 << AU1XXX_ATA_REG_OFFSET);
}
+static const struct ide_port_info au1xxx_port_info = {
+ .host_flags = IDE_HFLAG_POST_SET_MODE |
+ IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
+ IDE_HFLAG_NO_IO_32BIT |
+ IDE_HFLAG_UNMASK_IRQS,
+ .pio_mask = ATA_PIO4,
+#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
+ .mwdma_mask = ATA_MWDMA2,
+#endif
+};
+
static int au_ide_probe(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -606,21 +617,6 @@ static int au_ide_probe(struct device *dev)
hwif->dev = dev;
- hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
-#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
- hwif->mwdma_mask = 0x07; /* Multimode-2 DMA */
- hwif->swdma_mask = 0x00;
-#else
- hwif->mwdma_mask = 0x0;
- hwif->swdma_mask = 0x0;
-#endif
-
- hwif->pio_mask = ATA_PIO4;
- hwif->host_flags = IDE_HFLAG_POST_SET_MODE;
-
- hwif->drives[0].unmask = 1;
- hwif->drives[1].unmask = 1;
-
/* hold should be on in all cases */
hwif->hold = 1;
@@ -651,16 +647,9 @@ static int au_ide_probe(struct device *dev)
hwif->ide_dma_test_irq = &auide_dma_test_irq;
hwif->dma_lost_irq = &auide_dma_lost_irq;
#endif
- hwif->channel = 0;
hwif->select_data = 0; /* no chipset-specific code */
hwif->config_data = 0; /* no chipset-specific code */
- hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */
- hwif->drives[1].autotune = 1;
-
- hwif->drives[0].no_io_32bit = 1;
- hwif->drives[1].no_io_32bit = 1;
-
auide_hwif.hwif = hwif;
hwif->hwif_data = &auide_hwif;
@@ -671,7 +660,7 @@ static int au_ide_probe(struct device *dev)
idx[0] = hwif->index;
- ide_device_add(idx);
+ ide_device_add(idx, &au1xxx_port_info);
dev_set_drvdata(dev, hwif);
@@ -688,7 +677,7 @@ static int au_ide_remove(struct device *dev)
ide_hwif_t *hwif = dev_get_drvdata(dev);
_auide_hwif *ahwif = &auide_hwif;
- ide_unregister(hwif->index);
+ ide_unregister(hwif->index, 0, 0);
iounmap((void *)ahwif->regbase);