diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
| commit | a52b0d25a722e84da999005b75f972aa4824253c (patch) | |
| tree | 4a3a48305f744e6bde2e3fd663a4473dd712049c /drivers/ide/legacy/umc8672.c | |
| parent | 539a5fe22620a1665cce504167953a71a43232ad (diff) | |
| parent | f37afdaca711838b50ecd89b9c15fc745270d77c (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: (46 commits)
ide: constify struct ide_dma_ops
ide: add struct ide_dma_ops (take 3)
ide: add IDE_HFLAG_SERIALIZE_DMA host flag
sl82c105: check bridge revision in sl82c105_init_one()
au1xxx-ide: use ->init_dma method
palm_bk3710: use ->init_dma method
sgiioc4: use ->init_dma method
icside: use ->init_dma method
ide-pmac: use ->init_dma method
ide: do complete DMA setup in ->init_dma method (take 2)
au1xxx-ide: fix MWDMA support
ide: cleanup ide_setup_dma()
ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma()
ide: export ide_allocate_dma_engine()
ide: move ide_setup_dma() call out from ->init_dma method
alim15x3: skip DMA initialization completely on revs < 0x20
pdc202xx_old: remove init_dma_pdc202xx()
ide: don't display "BIOS" settings in ide_setup_dma()
ide: remove ->cds field from ide_hwif_t (take 2)
ide: remove ide_dma_iobase()
...
Diffstat (limited to 'drivers/ide/legacy/umc8672.c')
| -rw-r--r-- | drivers/ide/legacy/umc8672.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index 4d90badd2bda..17d515329fe0 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c | |||
| @@ -51,6 +51,8 @@ | |||
| 51 | 51 | ||
| 52 | #include <asm/io.h> | 52 | #include <asm/io.h> |
| 53 | 53 | ||
| 54 | #define DRV_NAME "umc8672" | ||
| 55 | |||
| 54 | /* | 56 | /* |
| 55 | * Default speeds. These can be changed with "auto-tune" and/or hdparm. | 57 | * Default speeds. These can be changed with "auto-tune" and/or hdparm. |
| 56 | */ | 58 | */ |
| @@ -120,18 +122,21 @@ static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
| 120 | spin_unlock_irqrestore(&ide_lock, flags); | 122 | spin_unlock_irqrestore(&ide_lock, flags); |
| 121 | } | 123 | } |
| 122 | 124 | ||
| 125 | static const struct ide_port_ops umc8672_port_ops = { | ||
| 126 | .set_pio_mode = umc_set_pio_mode, | ||
| 127 | }; | ||
| 128 | |||
| 123 | static const struct ide_port_info umc8672_port_info __initdata = { | 129 | static const struct ide_port_info umc8672_port_info __initdata = { |
| 130 | .name = DRV_NAME, | ||
| 124 | .chipset = ide_umc8672, | 131 | .chipset = ide_umc8672, |
| 132 | .port_ops = &umc8672_port_ops, | ||
| 125 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_NO_AUTOTUNE, | 133 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_NO_AUTOTUNE, |
| 126 | .pio_mask = ATA_PIO4, | 134 | .pio_mask = ATA_PIO4, |
| 127 | }; | 135 | }; |
| 128 | 136 | ||
| 129 | static int __init umc8672_probe(void) | 137 | static int __init umc8672_probe(void) |
| 130 | { | 138 | { |
| 131 | ide_hwif_t *hwif, *mate; | ||
| 132 | unsigned long flags; | 139 | unsigned long flags; |
| 133 | static u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
| 134 | hw_regs_t hw[2]; | ||
| 135 | 140 | ||
| 136 | if (!request_region(0x108, 2, "umc8672")) { | 141 | if (!request_region(0x108, 2, "umc8672")) { |
| 137 | printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); | 142 | printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); |
| @@ -150,31 +155,7 @@ static int __init umc8672_probe(void) | |||
| 150 | umc_set_speeds(current_speeds); | 155 | umc_set_speeds(current_speeds); |
| 151 | local_irq_restore(flags); | 156 | local_irq_restore(flags); |
| 152 | 157 | ||
| 153 | memset(&hw, 0, sizeof(hw)); | 158 | return ide_legacy_device_add(&umc8672_port_info, 0); |
| 154 | |||
| 155 | ide_std_init_ports(&hw[0], 0x1f0, 0x3f6); | ||
| 156 | hw[0].irq = 14; | ||
| 157 | |||
| 158 | ide_std_init_ports(&hw[1], 0x170, 0x376); | ||
| 159 | hw[1].irq = 15; | ||
| 160 | |||
| 161 | hwif = ide_find_port(); | ||
| 162 | if (hwif) { | ||
| 163 | ide_init_port_hw(hwif, &hw[0]); | ||
| 164 | hwif->set_pio_mode = umc_set_pio_mode; | ||
| 165 | idx[0] = hwif->index; | ||
| 166 | } | ||
| 167 | |||
| 168 | mate = ide_find_port(); | ||
| 169 | if (mate) { | ||
| 170 | ide_init_port_hw(mate, &hw[1]); | ||
| 171 | mate->set_pio_mode = umc_set_pio_mode; | ||
| 172 | idx[1] = mate->index; | ||
| 173 | } | ||
| 174 | |||
| 175 | ide_device_add(idx, &umc8672_port_info); | ||
| 176 | |||
| 177 | return 0; | ||
| 178 | } | 159 | } |
| 179 | 160 | ||
| 180 | int probe_umc8672; | 161 | int probe_umc8672; |
