diff options
Diffstat (limited to 'drivers/ide/legacy')
| -rw-r--r-- | drivers/ide/legacy/ali14xx.c | 6 | ||||
| -rw-r--r-- | drivers/ide/legacy/buddha.c | 14 | ||||
| -rw-r--r-- | drivers/ide/legacy/dtc2278.c | 5 | ||||
| -rw-r--r-- | drivers/ide/legacy/falconide.c | 6 | ||||
| -rw-r--r-- | drivers/ide/legacy/gayle.c | 18 | ||||
| -rw-r--r-- | drivers/ide/legacy/ht6560b.c | 11 | ||||
| -rw-r--r-- | drivers/ide/legacy/ide-4drives.c | 2 | ||||
| -rw-r--r-- | drivers/ide/legacy/ide-cs.c | 12 | ||||
| -rw-r--r-- | drivers/ide/legacy/ide_platform.c | 10 | ||||
| -rw-r--r-- | drivers/ide/legacy/macide.c | 4 | ||||
| -rw-r--r-- | drivers/ide/legacy/q40ide.c | 6 | ||||
| -rw-r--r-- | drivers/ide/legacy/qd65xx.c | 33 | ||||
| -rw-r--r-- | drivers/ide/legacy/umc8672.c | 4 |
13 files changed, 63 insertions, 68 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index 6efbf947c6db..90c65cf97448 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
| @@ -116,7 +116,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
| 116 | int time1, time2; | 116 | int time1, time2; |
| 117 | u8 param1, param2, param3, param4; | 117 | u8 param1, param2, param3, param4; |
| 118 | unsigned long flags; | 118 | unsigned long flags; |
| 119 | int bus_speed = system_bus_clock(); | 119 | int bus_speed = ide_vlb_clk ? ide_vlb_clk : system_bus_clock(); |
| 120 | 120 | ||
| 121 | /* calculate timing, according to PIO mode */ | 121 | /* calculate timing, according to PIO mode */ |
| 122 | time1 = ide_pio_cycle_time(drive, pio); | 122 | time1 = ide_pio_cycle_time(drive, pio); |
| @@ -202,7 +202,7 @@ static const struct ide_port_info ali14xx_port_info = { | |||
| 202 | .name = DRV_NAME, | 202 | .name = DRV_NAME, |
| 203 | .chipset = ide_ali14xx, | 203 | .chipset = ide_ali14xx, |
| 204 | .port_ops = &ali14xx_port_ops, | 204 | .port_ops = &ali14xx_port_ops, |
| 205 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_NO_AUTOTUNE, | 205 | .host_flags = IDE_HFLAG_NO_DMA, |
| 206 | .pio_mask = ATA_PIO4, | 206 | .pio_mask = ATA_PIO4, |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| @@ -220,7 +220,7 @@ static int __init ali14xx_probe(void) | |||
| 220 | return ide_legacy_device_add(&ali14xx_port_info, 0); | 220 | return ide_legacy_device_add(&ali14xx_port_info, 0); |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | int probe_ali14xx; | 223 | static int probe_ali14xx; |
| 224 | 224 | ||
| 225 | module_param_named(probe, probe_ali14xx, bool, 0); | 225 | module_param_named(probe, probe_ali14xx, bool, 0); |
| 226 | MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets"); | 226 | MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets"); |
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c index f51433bce8e4..5c730e4dd735 100644 --- a/drivers/ide/legacy/buddha.c +++ b/drivers/ide/legacy/buddha.c | |||
| @@ -102,7 +102,7 @@ static int buddha_ack_intr(ide_hwif_t *hwif) | |||
| 102 | { | 102 | { |
| 103 | unsigned char ch; | 103 | unsigned char ch; |
| 104 | 104 | ||
| 105 | ch = z_readb(hwif->io_ports[IDE_IRQ_OFFSET]); | 105 | ch = z_readb(hwif->io_ports.irq_addr); |
| 106 | if (!(ch & 0x80)) | 106 | if (!(ch & 0x80)) |
| 107 | return 0; | 107 | return 0; |
| 108 | return 1; | 108 | return 1; |
| @@ -112,9 +112,9 @@ static int xsurf_ack_intr(ide_hwif_t *hwif) | |||
| 112 | { | 112 | { |
| 113 | unsigned char ch; | 113 | unsigned char ch; |
| 114 | 114 | ||
| 115 | ch = z_readb(hwif->io_ports[IDE_IRQ_OFFSET]); | 115 | ch = z_readb(hwif->io_ports.irq_addr); |
| 116 | /* X-Surf needs a 0 written to IRQ register to ensure ISA bit A11 stays at 0 */ | 116 | /* X-Surf needs a 0 written to IRQ register to ensure ISA bit A11 stays at 0 */ |
| 117 | z_writeb(0, hwif->io_ports[IDE_IRQ_OFFSET]); | 117 | z_writeb(0, hwif->io_ports.irq_addr); |
| 118 | if (!(ch & 0x80)) | 118 | if (!(ch & 0x80)) |
| 119 | return 0; | 119 | return 0; |
| 120 | return 1; | 120 | return 1; |
| @@ -128,13 +128,13 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base, | |||
| 128 | 128 | ||
| 129 | memset(hw, 0, sizeof(*hw)); | 129 | memset(hw, 0, sizeof(*hw)); |
| 130 | 130 | ||
| 131 | hw->io_ports[IDE_DATA_OFFSET] = base; | 131 | hw->io_ports.data_addr = base; |
| 132 | 132 | ||
| 133 | for (i = 1; i < 8; i++) | 133 | for (i = 1; i < 8; i++) |
| 134 | hw->io_ports[i] = base + 2 + i * 4; | 134 | hw->io_ports_array[i] = base + 2 + i * 4; |
| 135 | 135 | ||
| 136 | hw->io_ports[IDE_CONTROL_OFFSET] = ctl; | 136 | hw->io_ports.ctl_addr = ctl; |
| 137 | hw->io_ports[IDE_IRQ_OFFSET] = irq_port; | 137 | hw->io_ports.irq_addr = irq_port; |
| 138 | 138 | ||
| 139 | hw->irq = IRQ_AMIGA_PORTS; | 139 | hw->irq = IRQ_AMIGA_PORTS; |
| 140 | hw->ack_intr = ack_intr; | 140 | hw->ack_intr = ack_intr; |
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index f7c4ad1c57c0..af791a02a120 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
| @@ -101,8 +101,7 @@ static const struct ide_port_info dtc2278_port_info __initdata = { | |||
| 101 | IDE_HFLAG_IO_32BIT | | 101 | IDE_HFLAG_IO_32BIT | |
| 102 | /* disallow ->io_32bit changes */ | 102 | /* disallow ->io_32bit changes */ |
| 103 | IDE_HFLAG_NO_IO_32BIT | | 103 | IDE_HFLAG_NO_IO_32BIT | |
| 104 | IDE_HFLAG_NO_DMA | | 104 | IDE_HFLAG_NO_DMA, |
| 105 | IDE_HFLAG_NO_AUTOTUNE, | ||
| 106 | .pio_mask = ATA_PIO4, | 105 | .pio_mask = ATA_PIO4, |
| 107 | }; | 106 | }; |
| 108 | 107 | ||
| @@ -131,7 +130,7 @@ static int __init dtc2278_probe(void) | |||
| 131 | return ide_legacy_device_add(&dtc2278_port_info, 0); | 130 | return ide_legacy_device_add(&dtc2278_port_info, 0); |
| 132 | } | 131 | } |
| 133 | 132 | ||
| 134 | int probe_dtc2278 = 0; | 133 | static int probe_dtc2278; |
| 135 | 134 | ||
| 136 | module_param_named(probe, probe_dtc2278, bool, 0); | 135 | module_param_named(probe, probe_dtc2278, bool, 0); |
| 137 | MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets"); | 136 | MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets"); |
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index 5c19c422c5cc..56cdaa0eeea5 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
| @@ -50,12 +50,12 @@ static void __init falconide_setup_ports(hw_regs_t *hw) | |||
| 50 | 50 | ||
| 51 | memset(hw, 0, sizeof(*hw)); | 51 | memset(hw, 0, sizeof(*hw)); |
| 52 | 52 | ||
| 53 | hw->io_ports[IDE_DATA_OFFSET] = ATA_HD_BASE; | 53 | hw->io_ports.data_addr = ATA_HD_BASE; |
| 54 | 54 | ||
| 55 | for (i = 1; i < 8; i++) | 55 | for (i = 1; i < 8; i++) |
| 56 | hw->io_ports[i] = ATA_HD_BASE + 1 + i * 4; | 56 | hw->io_ports_array[i] = ATA_HD_BASE + 1 + i * 4; |
| 57 | 57 | ||
| 58 | hw->io_ports[IDE_CONTROL_OFFSET] = ATA_HD_BASE + ATA_HD_CONTROL; | 58 | hw->io_ports.ctl_addr = ATA_HD_BASE + ATA_HD_CONTROL; |
| 59 | 59 | ||
| 60 | hw->irq = IRQ_MFP_IDE; | 60 | hw->irq = IRQ_MFP_IDE; |
| 61 | hw->ack_intr = NULL; | 61 | hw->ack_intr = NULL; |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index a0c9601bdaf0..a9c2593a898c 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
| @@ -63,6 +63,8 @@ | |||
| 63 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) | 63 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) |
| 64 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) | 64 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) |
| 65 | int ide_doubler = 0; /* support IDE doublers? */ | 65 | int ide_doubler = 0; /* support IDE doublers? */ |
| 66 | module_param_named(doubler, ide_doubler, bool, 0); | ||
| 67 | MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); | ||
| 66 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ | 68 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ |
| 67 | 69 | ||
| 68 | 70 | ||
| @@ -74,7 +76,7 @@ static int gayle_ack_intr_a4000(ide_hwif_t *hwif) | |||
| 74 | { | 76 | { |
| 75 | unsigned char ch; | 77 | unsigned char ch; |
| 76 | 78 | ||
| 77 | ch = z_readb(hwif->io_ports[IDE_IRQ_OFFSET]); | 79 | ch = z_readb(hwif->io_ports.irq_addr); |
| 78 | if (!(ch & GAYLE_IRQ_IDE)) | 80 | if (!(ch & GAYLE_IRQ_IDE)) |
| 79 | return 0; | 81 | return 0; |
| 80 | return 1; | 82 | return 1; |
| @@ -84,11 +86,11 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif) | |||
| 84 | { | 86 | { |
| 85 | unsigned char ch; | 87 | unsigned char ch; |
| 86 | 88 | ||
| 87 | ch = z_readb(hwif->io_ports[IDE_IRQ_OFFSET]); | 89 | ch = z_readb(hwif->io_ports.irq_addr); |
| 88 | if (!(ch & GAYLE_IRQ_IDE)) | 90 | if (!(ch & GAYLE_IRQ_IDE)) |
| 89 | return 0; | 91 | return 0; |
| 90 | (void)z_readb(hwif->io_ports[IDE_STATUS_OFFSET]); | 92 | (void)z_readb(hwif->io_ports.status_addr); |
| 91 | z_writeb(0x7c, hwif->io_ports[IDE_IRQ_OFFSET]); | 93 | z_writeb(0x7c, hwif->io_ports.irq_addr); |
| 92 | return 1; | 94 | return 1; |
| 93 | } | 95 | } |
| 94 | 96 | ||
| @@ -100,13 +102,13 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, | |||
| 100 | 102 | ||
| 101 | memset(hw, 0, sizeof(*hw)); | 103 | memset(hw, 0, sizeof(*hw)); |
| 102 | 104 | ||
| 103 | hw->io_ports[IDE_DATA_OFFSET] = base; | 105 | hw->io_ports.data_addr = base; |
| 104 | 106 | ||
| 105 | for (i = 1; i < 8; i++) | 107 | for (i = 1; i < 8; i++) |
| 106 | hw->io_ports[i] = base + 2 + i * 4; | 108 | hw->io_ports_array[i] = base + 2 + i * 4; |
| 107 | 109 | ||
| 108 | hw->io_ports[IDE_CONTROL_OFFSET] = ctl; | 110 | hw->io_ports.ctl_addr = ctl; |
| 109 | hw->io_ports[IDE_IRQ_OFFSET] = irq_port; | 111 | hw->io_ports.irq_addr = irq_port; |
| 110 | 112 | ||
| 111 | hw->irq = IRQ_AMIGA_PORTS; | 113 | hw->irq = IRQ_AMIGA_PORTS; |
| 112 | hw->ack_intr = ack_intr; | 114 | hw->ack_intr = ack_intr; |
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index 702d8deb5780..4fe516df9f74 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
| @@ -157,8 +157,8 @@ static void ht6560b_selectproc (ide_drive_t *drive) | |||
| 157 | /* | 157 | /* |
| 158 | * Set timing for this drive: | 158 | * Set timing for this drive: |
| 159 | */ | 159 | */ |
| 160 | outb(timing, hwif->io_ports[IDE_SELECT_OFFSET]); | 160 | outb(timing, hwif->io_ports.device_addr); |
| 161 | (void)inb(hwif->io_ports[IDE_STATUS_OFFSET]); | 161 | (void)inb(hwif->io_ports.status_addr); |
| 162 | #ifdef DEBUG | 162 | #ifdef DEBUG |
| 163 | printk("ht6560b: %s: select=%#x timing=%#x\n", | 163 | printk("ht6560b: %s: select=%#x timing=%#x\n", |
| 164 | drive->name, select, timing); | 164 | drive->name, select, timing); |
| @@ -212,8 +212,8 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio) | |||
| 212 | { | 212 | { |
| 213 | int active_time, recovery_time; | 213 | int active_time, recovery_time; |
| 214 | int active_cycles, recovery_cycles; | 214 | int active_cycles, recovery_cycles; |
| 215 | int bus_speed = system_bus_clock(); | 215 | int bus_speed = ide_vlb_clk ? ide_vlb_clk : system_bus_clock(); |
| 216 | 216 | ||
| 217 | if (pio) { | 217 | if (pio) { |
| 218 | unsigned int cycle_time; | 218 | unsigned int cycle_time; |
| 219 | 219 | ||
| @@ -323,7 +323,7 @@ static void __init ht6560b_port_init_devs(ide_hwif_t *hwif) | |||
| 323 | hwif->drives[1].drive_data = t; | 323 | hwif->drives[1].drive_data = t; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | int probe_ht6560b = 0; | 326 | static int probe_ht6560b; |
| 327 | 327 | ||
| 328 | module_param_named(probe, probe_ht6560b, bool, 0); | 328 | module_param_named(probe, probe_ht6560b, bool, 0); |
| 329 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); | 329 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); |
| @@ -340,7 +340,6 @@ static const struct ide_port_info ht6560b_port_info __initdata = { | |||
| 340 | .port_ops = &ht6560b_port_ops, | 340 | .port_ops = &ht6560b_port_ops, |
| 341 | .host_flags = IDE_HFLAG_SERIALIZE | /* is this needed? */ | 341 | .host_flags = IDE_HFLAG_SERIALIZE | /* is this needed? */ |
| 342 | IDE_HFLAG_NO_DMA | | 342 | IDE_HFLAG_NO_DMA | |
| 343 | IDE_HFLAG_NO_AUTOTUNE | | ||
| 344 | IDE_HFLAG_ABUSE_PREFETCH, | 343 | IDE_HFLAG_ABUSE_PREFETCH, |
| 345 | .pio_mask = ATA_PIO4, | 344 | .pio_mask = ATA_PIO4, |
| 346 | }; | 345 | }; |
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c index 17f94d0cb539..ecae916a3385 100644 --- a/drivers/ide/legacy/ide-4drives.c +++ b/drivers/ide/legacy/ide-4drives.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #define DRV_NAME "ide-4drives" | 7 | #define DRV_NAME "ide-4drives" |
| 8 | 8 | ||
| 9 | int probe_4drives; | 9 | static int probe_4drives; |
| 10 | 10 | ||
| 11 | module_param_named(probe, probe_4drives, bool, 0); | 11 | module_param_named(probe, probe_4drives, bool, 0); |
| 12 | MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port"); | 12 | MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port"); |
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 855e157b18d3..aa2ea3deac85 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
| @@ -140,8 +140,8 @@ static void ide_detach(struct pcmcia_device *link) | |||
| 140 | 140 | ||
| 141 | ide_release(link); | 141 | ide_release(link); |
| 142 | 142 | ||
| 143 | release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); | 143 | release_region(hwif->io_ports.ctl_addr, 1); |
| 144 | release_region(hwif->io_ports[IDE_DATA_OFFSET], 8); | 144 | release_region(hwif->io_ports.data_addr, 8); |
| 145 | 145 | ||
| 146 | kfree(info); | 146 | kfree(info); |
| 147 | } /* ide_detach */ | 147 | } /* ide_detach */ |
| @@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl, | |||
| 183 | 183 | ||
| 184 | i = hwif->index; | 184 | i = hwif->index; |
| 185 | 185 | ||
| 186 | if (hwif->present) | 186 | ide_init_port_data(hwif, i); |
| 187 | ide_unregister(i); | ||
| 188 | else | ||
| 189 | ide_init_port_data(hwif, i); | ||
| 190 | |||
| 191 | ide_init_port_hw(hwif, &hw); | 187 | ide_init_port_hw(hwif, &hw); |
| 192 | hwif->port_ops = &idecs_port_ops; | 188 | hwif->port_ops = &idecs_port_ops; |
| 193 | 189 | ||
| @@ -390,7 +386,7 @@ void ide_release(struct pcmcia_device *link) | |||
| 390 | if (info->ndev) { | 386 | if (info->ndev) { |
| 391 | /* FIXME: if this fails we need to queue the cleanup somehow | 387 | /* FIXME: if this fails we need to queue the cleanup somehow |
| 392 | -- need to investigate the required PCMCIA magic */ | 388 | -- need to investigate the required PCMCIA magic */ |
| 393 | ide_unregister(hwif->index); | 389 | ide_unregister(hwif); |
| 394 | } | 390 | } |
| 395 | info->ndev = 0; | 391 | info->ndev = 0; |
| 396 | 392 | ||
diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c index 822f48b05c70..8279dc7ca4c0 100644 --- a/drivers/ide/legacy/ide_platform.c +++ b/drivers/ide/legacy/ide_platform.c | |||
| @@ -30,14 +30,14 @@ static void __devinit plat_ide_setup_ports(hw_regs_t *hw, | |||
| 30 | unsigned long port = (unsigned long)base; | 30 | unsigned long port = (unsigned long)base; |
| 31 | int i; | 31 | int i; |
| 32 | 32 | ||
| 33 | hw->io_ports[IDE_DATA_OFFSET] = port; | 33 | hw->io_ports.data_addr = port; |
| 34 | 34 | ||
| 35 | port += (1 << pdata->ioport_shift); | 35 | port += (1 << pdata->ioport_shift); |
| 36 | for (i = IDE_ERROR_OFFSET; i <= IDE_STATUS_OFFSET; | 36 | for (i = 1; i <= 7; |
| 37 | i++, port += (1 << pdata->ioport_shift)) | 37 | i++, port += (1 << pdata->ioport_shift)) |
| 38 | hw->io_ports[i] = port; | 38 | hw->io_ports_array[i] = port; |
| 39 | 39 | ||
| 40 | hw->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; | 40 | hw->io_ports.ctl_addr = (unsigned long)ctrl; |
| 41 | 41 | ||
| 42 | hw->irq = irq; | 42 | hw->irq = irq; |
| 43 | 43 | ||
| @@ -120,7 +120,7 @@ static int __devexit plat_ide_remove(struct platform_device *pdev) | |||
| 120 | { | 120 | { |
| 121 | ide_hwif_t *hwif = pdev->dev.driver_data; | 121 | ide_hwif_t *hwif = pdev->dev.driver_data; |
| 122 | 122 | ||
| 123 | ide_unregister(hwif->index); | 123 | ide_unregister(hwif); |
| 124 | 124 | ||
| 125 | return 0; | 125 | return 0; |
| 126 | } | 126 | } |
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index 26546d0afc7f..1f527bbf8d96 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
| @@ -72,9 +72,9 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
| 72 | memset(hw, 0, sizeof(*hw)); | 72 | memset(hw, 0, sizeof(*hw)); |
| 73 | 73 | ||
| 74 | for (i = 0; i < 8; i++) | 74 | for (i = 0; i < 8; i++) |
| 75 | hw->io_ports[i] = base + i * 4; | 75 | hw->io_ports_array[i] = base + i * 4; |
| 76 | 76 | ||
| 77 | hw->io_ports[IDE_CONTROL_OFFSET] = base + IDE_CONTROL; | 77 | hw->io_ports.ctl_addr = base + IDE_CONTROL; |
| 78 | 78 | ||
| 79 | hw->irq = irq; | 79 | hw->irq = irq; |
| 80 | hw->ack_intr = ack_intr; | 80 | hw->ack_intr = ack_intr; |
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index f23999dd3d46..a3573d40b4b7 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
| @@ -80,10 +80,10 @@ void q40_ide_setup_ports ( hw_regs_t *hw, | |||
| 80 | for (i = 0; i < IDE_NR_PORTS; i++) { | 80 | for (i = 0; i < IDE_NR_PORTS; i++) { |
| 81 | /* BIG FAT WARNING: | 81 | /* BIG FAT WARNING: |
| 82 | assumption: only DATA port is ever used in 16 bit mode */ | 82 | assumption: only DATA port is ever used in 16 bit mode */ |
| 83 | if ( i==0 ) | 83 | if (i == 0) |
| 84 | hw->io_ports[i] = Q40_ISA_IO_W(base + offsets[i]); | 84 | hw->io_ports_array[i] = Q40_ISA_IO_W(base + offsets[i]); |
| 85 | else | 85 | else |
| 86 | hw->io_ports[i] = Q40_ISA_IO_B(base + offsets[i]); | 86 | hw->io_ports_array[i] = Q40_ISA_IO_B(base + offsets[i]); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | hw->irq = irq; | 89 | hw->irq = irq; |
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 15a99aae0cf9..6424af154325 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
| @@ -11,11 +11,7 @@ | |||
| 11 | * | 11 | * |
| 12 | * QDI QD6500/QD6580 EIDE controller fast support | 12 | * QDI QD6500/QD6580 EIDE controller fast support |
| 13 | * | 13 | * |
| 14 | * Please set local bus speed using kernel parameter idebus | ||
| 15 | * for example, "idebus=33" stands for 33Mhz VLbus | ||
| 16 | * To activate controller support, use "ide0=qd65xx" | 14 | * To activate controller support, use "ide0=qd65xx" |
| 17 | * To enable tuning, use "hda=autotune hdb=autotune" | ||
| 18 | * To enable 2nd channel tuning (qd6580 only), use "hdc=autotune hdd=autotune" | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | /* | 17 | /* |
| @@ -114,17 +110,18 @@ static void qd65xx_select(ide_drive_t *drive) | |||
| 114 | 110 | ||
| 115 | static u8 qd6500_compute_timing (ide_hwif_t *hwif, int active_time, int recovery_time) | 111 | static u8 qd6500_compute_timing (ide_hwif_t *hwif, int active_time, int recovery_time) |
| 116 | { | 112 | { |
| 117 | u8 active_cycle,recovery_cycle; | 113 | int clk = ide_vlb_clk ? ide_vlb_clk : system_bus_clock(); |
| 114 | u8 act_cyc, rec_cyc; | ||
| 118 | 115 | ||
| 119 | if (system_bus_clock()<=33) { | 116 | if (clk <= 33) { |
| 120 | active_cycle = 9 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 2, 9); | 117 | act_cyc = 9 - IDE_IN(active_time * clk / 1000 + 1, 2, 9); |
| 121 | recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 0, 15); | 118 | rec_cyc = 15 - IDE_IN(recovery_time * clk / 1000 + 1, 0, 15); |
| 122 | } else { | 119 | } else { |
| 123 | active_cycle = 8 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 1, 8); | 120 | act_cyc = 8 - IDE_IN(active_time * clk / 1000 + 1, 1, 8); |
| 124 | recovery_cycle = 18 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 3, 18); | 121 | rec_cyc = 18 - IDE_IN(recovery_time * clk / 1000 + 1, 3, 18); |
| 125 | } | 122 | } |
| 126 | 123 | ||
| 127 | return((recovery_cycle<<4) | 0x08 | active_cycle); | 124 | return (rec_cyc << 4) | 0x08 | act_cyc; |
| 128 | } | 125 | } |
| 129 | 126 | ||
| 130 | /* | 127 | /* |
| @@ -135,10 +132,13 @@ static u8 qd6500_compute_timing (ide_hwif_t *hwif, int active_time, int recovery | |||
| 135 | 132 | ||
| 136 | static u8 qd6580_compute_timing (int active_time, int recovery_time) | 133 | static u8 qd6580_compute_timing (int active_time, int recovery_time) |
| 137 | { | 134 | { |
| 138 | u8 active_cycle = 17 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 2, 17); | 135 | int clk = ide_vlb_clk ? ide_vlb_clk : system_bus_clock(); |
| 139 | u8 recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 2, 15); | 136 | u8 act_cyc, rec_cyc; |
| 140 | 137 | ||
| 141 | return((recovery_cycle<<4) | active_cycle); | 138 | act_cyc = 17 - IDE_IN(active_time * clk / 1000 + 1, 2, 17); |
| 139 | rec_cyc = 15 - IDE_IN(recovery_time * clk / 1000 + 1, 2, 15); | ||
| 140 | |||
| 141 | return (rec_cyc << 4) | act_cyc; | ||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | /* | 144 | /* |
| @@ -322,8 +322,7 @@ static const struct ide_port_info qd65xx_port_info __initdata = { | |||
| 322 | .name = DRV_NAME, | 322 | .name = DRV_NAME, |
| 323 | .chipset = ide_qd65xx, | 323 | .chipset = ide_qd65xx, |
| 324 | .host_flags = IDE_HFLAG_IO_32BIT | | 324 | .host_flags = IDE_HFLAG_IO_32BIT | |
| 325 | IDE_HFLAG_NO_DMA | | 325 | IDE_HFLAG_NO_DMA, |
| 326 | IDE_HFLAG_NO_AUTOTUNE, | ||
| 327 | .pio_mask = ATA_PIO4, | 326 | .pio_mask = ATA_PIO4, |
| 328 | }; | 327 | }; |
| 329 | 328 | ||
| @@ -399,7 +398,7 @@ static int __init qd_probe(int base) | |||
| 399 | return rc; | 398 | return rc; |
| 400 | } | 399 | } |
| 401 | 400 | ||
| 402 | int probe_qd65xx = 0; | 401 | static int probe_qd65xx; |
| 403 | 402 | ||
| 404 | module_param_named(probe, probe_qd65xx, bool, 0); | 403 | module_param_named(probe, probe_qd65xx, bool, 0); |
| 405 | MODULE_PARM_DESC(probe, "probe for QD65xx chipsets"); | 404 | MODULE_PARM_DESC(probe, "probe for QD65xx chipsets"); |
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index 17d515329fe0..b54a14a57755 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c | |||
| @@ -130,7 +130,7 @@ static const struct ide_port_info umc8672_port_info __initdata = { | |||
| 130 | .name = DRV_NAME, | 130 | .name = DRV_NAME, |
| 131 | .chipset = ide_umc8672, | 131 | .chipset = ide_umc8672, |
| 132 | .port_ops = &umc8672_port_ops, | 132 | .port_ops = &umc8672_port_ops, |
| 133 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_NO_AUTOTUNE, | 133 | .host_flags = IDE_HFLAG_NO_DMA, |
| 134 | .pio_mask = ATA_PIO4, | 134 | .pio_mask = ATA_PIO4, |
| 135 | }; | 135 | }; |
| 136 | 136 | ||
| @@ -158,7 +158,7 @@ static int __init umc8672_probe(void) | |||
| 158 | return ide_legacy_device_add(&umc8672_port_info, 0); | 158 | return ide_legacy_device_add(&umc8672_port_info, 0); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | int probe_umc8672; | 161 | static int probe_umc8672; |
| 162 | 162 | ||
| 163 | module_param_named(probe, probe_umc8672, bool, 0); | 163 | module_param_named(probe, probe_umc8672, bool, 0); |
| 164 | MODULE_PARM_DESC(probe, "probe for UMC8672 chipset"); | 164 | MODULE_PARM_DESC(probe, "probe for UMC8672 chipset"); |
