diff options
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r-- | drivers/ide/legacy/buddha.c | 2 | ||||
-rw-r--r-- | drivers/ide/legacy/falconide.c | 2 | ||||
-rw-r--r-- | drivers/ide/legacy/gayle.c | 6 | ||||
-rw-r--r-- | drivers/ide/legacy/ide-cs.c | 44 | ||||
-rw-r--r-- | drivers/ide/legacy/macide.c | 2 | ||||
-rw-r--r-- | drivers/ide/legacy/q40ide.c | 2 |
6 files changed, 37 insertions, 21 deletions
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c index 5c730e4dd735..9a1d27ef3f8a 100644 --- a/drivers/ide/legacy/buddha.c +++ b/drivers/ide/legacy/buddha.c | |||
@@ -138,6 +138,8 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base, | |||
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; |
141 | |||
142 | hw->chipset = ide_generic; | ||
141 | } | 143 | } |
142 | 144 | ||
143 | /* | 145 | /* |
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index 9e449a0c623f..af11028b4794 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
@@ -81,6 +81,8 @@ static void __init falconide_setup_ports(hw_regs_t *hw) | |||
81 | 81 | ||
82 | hw->irq = IRQ_MFP_IDE; | 82 | hw->irq = IRQ_MFP_IDE; |
83 | hw->ack_intr = NULL; | 83 | hw->ack_intr = NULL; |
84 | |||
85 | hw->chipset = ide_generic; | ||
84 | } | 86 | } |
85 | 87 | ||
86 | /* | 88 | /* |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index a9c2593a898c..fed7d812761c 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/ide.h> | 16 | #include <linux/ide.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/zorro.h> | 18 | #include <linux/zorro.h> |
19 | #include <linux/module.h> | ||
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <asm/amigahw.h> | 22 | #include <asm/amigahw.h> |
@@ -62,7 +63,10 @@ | |||
62 | GAYLE_NUM_HWIFS-1) | 63 | GAYLE_NUM_HWIFS-1) |
63 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) | 64 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) |
64 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) | 65 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) |
66 | |||
65 | int ide_doubler = 0; /* support IDE doublers? */ | 67 | int ide_doubler = 0; /* support IDE doublers? */ |
68 | EXPORT_SYMBOL_GPL(ide_doubler); | ||
69 | |||
66 | module_param_named(doubler, ide_doubler, bool, 0); | 70 | module_param_named(doubler, ide_doubler, bool, 0); |
67 | MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); | 71 | MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); |
68 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ | 72 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ |
@@ -112,6 +116,8 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, | |||
112 | 116 | ||
113 | hw->irq = IRQ_AMIGA_PORTS; | 117 | hw->irq = IRQ_AMIGA_PORTS; |
114 | hw->ack_intr = ack_intr; | 118 | hw->ack_intr = ack_intr; |
119 | |||
120 | hw->chipset = ide_generic; | ||
115 | } | 121 | } |
116 | 122 | ||
117 | /* | 123 | /* |
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index aa2ea3deac85..3381424d70a1 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -135,13 +135,17 @@ static void ide_detach(struct pcmcia_device *link) | |||
135 | { | 135 | { |
136 | ide_info_t *info = link->priv; | 136 | ide_info_t *info = link->priv; |
137 | ide_hwif_t *hwif = info->hwif; | 137 | ide_hwif_t *hwif = info->hwif; |
138 | unsigned long data_addr, ctl_addr; | ||
138 | 139 | ||
139 | DEBUG(0, "ide_detach(0x%p)\n", link); | 140 | DEBUG(0, "ide_detach(0x%p)\n", link); |
140 | 141 | ||
142 | data_addr = hwif->io_ports.data_addr; | ||
143 | ctl_addr = hwif->io_ports.ctl_addr; | ||
144 | |||
141 | ide_release(link); | 145 | ide_release(link); |
142 | 146 | ||
143 | release_region(hwif->io_ports.ctl_addr, 1); | 147 | release_region(ctl_addr, 1); |
144 | release_region(hwif->io_ports.data_addr, 8); | 148 | release_region(data_addr, 8); |
145 | 149 | ||
146 | kfree(info); | 150 | kfree(info); |
147 | } /* ide_detach */ | 151 | } /* ide_detach */ |
@@ -194,6 +198,16 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl, | |||
194 | if (hwif->present) | 198 | if (hwif->present) |
195 | return hwif; | 199 | return hwif; |
196 | 200 | ||
201 | /* retry registration in case device is still spinning up */ | ||
202 | for (i = 0; i < 10; i++) { | ||
203 | msleep(100); | ||
204 | ide_port_scan(hwif); | ||
205 | if (hwif->present) | ||
206 | return hwif; | ||
207 | } | ||
208 | |||
209 | return hwif; | ||
210 | |||
197 | out_release: | 211 | out_release: |
198 | release_region(ctl, 1); | 212 | release_region(ctl, 1); |
199 | release_region(io, 8); | 213 | release_region(io, 8); |
@@ -222,7 +236,7 @@ static int ide_config(struct pcmcia_device *link) | |||
222 | cistpl_cftable_entry_t dflt; | 236 | cistpl_cftable_entry_t dflt; |
223 | } *stk = NULL; | 237 | } *stk = NULL; |
224 | cistpl_cftable_entry_t *cfg; | 238 | cistpl_cftable_entry_t *cfg; |
225 | int i, pass, last_ret = 0, last_fn = 0, is_kme = 0; | 239 | int pass, last_ret = 0, last_fn = 0, is_kme = 0; |
226 | unsigned long io_base, ctl_base; | 240 | unsigned long io_base, ctl_base; |
227 | ide_hwif_t *hwif; | 241 | ide_hwif_t *hwif; |
228 | 242 | ||
@@ -319,30 +333,15 @@ static int ide_config(struct pcmcia_device *link) | |||
319 | if (is_kme) | 333 | if (is_kme) |
320 | outb(0x81, ctl_base+1); | 334 | outb(0x81, ctl_base+1); |
321 | 335 | ||
322 | /* retry registration in case device is still spinning up */ | 336 | hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); |
323 | for (i = 0; i < 10; i++) { | 337 | if (hwif == NULL && link->io.NumPorts1 == 0x20) { |
324 | hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); | ||
325 | if (hwif) | ||
326 | break; | ||
327 | if (link->io.NumPorts1 == 0x20) { | ||
328 | outb(0x02, ctl_base + 0x10); | 338 | outb(0x02, ctl_base + 0x10); |
329 | hwif = idecs_register(io_base + 0x10, ctl_base + 0x10, | 339 | hwif = idecs_register(io_base + 0x10, ctl_base + 0x10, |
330 | link->irq.AssignedIRQ, link); | 340 | link->irq.AssignedIRQ, link); |
331 | if (hwif) { | ||
332 | io_base += 0x10; | ||
333 | ctl_base += 0x10; | ||
334 | break; | ||
335 | } | ||
336 | } | ||
337 | msleep(100); | ||
338 | } | 341 | } |
339 | 342 | ||
340 | if (hwif == NULL) { | 343 | if (hwif == NULL) |
341 | printk(KERN_NOTICE "ide-cs: ide_register() at 0x%3lx & 0x%3lx" | ||
342 | ", irq %u failed\n", io_base, ctl_base, | ||
343 | link->irq.AssignedIRQ); | ||
344 | goto failed; | 344 | goto failed; |
345 | } | ||
346 | 345 | ||
347 | info->ndev = 1; | 346 | info->ndev = 1; |
348 | sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2); | 347 | sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2); |
@@ -411,6 +410,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
411 | PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001), /* Mitsubishi CFA */ | 410 | PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001), /* Mitsubishi CFA */ |
412 | PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), | 411 | PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), |
413 | PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), /* SanDisk CFA */ | 412 | PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), /* SanDisk CFA */ |
413 | PCMCIA_DEVICE_MANF_CARD(0x004f, 0x0000), /* Kingston */ | ||
414 | PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */ | 414 | PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */ |
415 | PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), | 415 | PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), |
416 | PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */ | 416 | PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */ |
@@ -440,6 +440,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
440 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), | 440 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), |
441 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), | 441 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), |
442 | PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b), | 442 | PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b), |
443 | PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee), | ||
443 | PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c), | 444 | PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c), |
444 | PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79), | 445 | PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79), |
445 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591), | 446 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591), |
@@ -450,6 +451,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
450 | PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6), | 451 | PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6), |
451 | PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), | 452 | PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), |
452 | PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443), | 453 | PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443), |
454 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b6f32), | ||
453 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 455 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
454 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 456 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
455 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 457 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index caa2632dd08e..2e84290d0bcc 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
@@ -78,6 +78,8 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
78 | 78 | ||
79 | hw->irq = irq; | 79 | hw->irq = irq; |
80 | hw->ack_intr = ack_intr; | 80 | hw->ack_intr = ack_intr; |
81 | |||
82 | hw->chipset = ide_generic; | ||
81 | } | 83 | } |
82 | 84 | ||
83 | static const char *mac_ide_name[] = | 85 | static const char *mac_ide_name[] = |
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index 6f535d00e638..8ff6e2d20834 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
@@ -70,6 +70,8 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
70 | 70 | ||
71 | hw->irq = irq; | 71 | hw->irq = irq; |
72 | hw->ack_intr = ack_intr; | 72 | hw->ack_intr = ack_intr; |
73 | |||
74 | hw->chipset = ide_generic; | ||
73 | } | 75 | } |
74 | 76 | ||
75 | static void q40ide_input_data(ide_drive_t *drive, struct request *rq, | 77 | static void q40ide_input_data(ide_drive_t *drive, struct request *rq, |