aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ata_piix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r--drivers/ata/ata_piix.c149
1 files changed, 14 insertions, 135 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 9f887b2c92df..bb46b61a7c6b 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -294,155 +294,34 @@ static struct scsi_host_template piix_sht = {
294 ATA_BMDMA_SHT(DRV_NAME), 294 ATA_BMDMA_SHT(DRV_NAME),
295}; 295};
296 296
297static const struct ata_port_operations piix_pata_ops = { 297static struct ata_port_operations piix_pata_ops = {
298 .inherits = &ata_bmdma_port_ops,
299 .cable_detect = ata_cable_40wire,
298 .set_piomode = piix_set_piomode, 300 .set_piomode = piix_set_piomode,
299 .set_dmamode = piix_set_dmamode, 301 .set_dmamode = piix_set_dmamode,
300 .mode_filter = ata_pci_default_filter,
301
302 .tf_load = ata_tf_load,
303 .tf_read = ata_tf_read,
304 .check_status = ata_check_status,
305 .exec_command = ata_exec_command,
306 .dev_select = ata_std_dev_select,
307
308 .bmdma_setup = ata_bmdma_setup,
309 .bmdma_start = ata_bmdma_start,
310 .bmdma_stop = ata_bmdma_stop,
311 .bmdma_status = ata_bmdma_status,
312 .qc_prep = ata_qc_prep,
313 .qc_issue = ata_qc_issue_prot,
314 .data_xfer = ata_data_xfer,
315
316 .freeze = ata_bmdma_freeze,
317 .thaw = ata_bmdma_thaw,
318 .error_handler = piix_pata_error_handler, 302 .error_handler = piix_pata_error_handler,
319 .post_internal_cmd = ata_bmdma_post_internal_cmd, 303};
320 .cable_detect = ata_cable_40wire,
321
322 .irq_clear = ata_bmdma_irq_clear,
323 .irq_on = ata_irq_on,
324 304
325 .port_start = ata_sff_port_start, 305static struct ata_port_operations piix_vmw_ops = {
306 .inherits = &piix_pata_ops,
307 .bmdma_status = piix_vmw_bmdma_status,
326}; 308};
327 309
328static const struct ata_port_operations ich_pata_ops = { 310static struct ata_port_operations ich_pata_ops = {
329 .set_piomode = piix_set_piomode, 311 .inherits = &piix_pata_ops,
330 .set_dmamode = ich_set_dmamode,
331 .mode_filter = ata_pci_default_filter,
332
333 .tf_load = ata_tf_load,
334 .tf_read = ata_tf_read,
335 .check_status = ata_check_status,
336 .exec_command = ata_exec_command,
337 .dev_select = ata_std_dev_select,
338
339 .bmdma_setup = ata_bmdma_setup,
340 .bmdma_start = ata_bmdma_start,
341 .bmdma_stop = ata_bmdma_stop,
342 .bmdma_status = ata_bmdma_status,
343 .qc_prep = ata_qc_prep,
344 .qc_issue = ata_qc_issue_prot,
345 .data_xfer = ata_data_xfer,
346
347 .freeze = ata_bmdma_freeze,
348 .thaw = ata_bmdma_thaw,
349 .error_handler = piix_pata_error_handler,
350 .post_internal_cmd = ata_bmdma_post_internal_cmd,
351 .cable_detect = ich_pata_cable_detect, 312 .cable_detect = ich_pata_cable_detect,
352 313 .set_dmamode = ich_set_dmamode,
353 .irq_clear = ata_bmdma_irq_clear,
354 .irq_on = ata_irq_on,
355
356 .port_start = ata_sff_port_start,
357}; 314};
358 315
359static const struct ata_port_operations piix_sata_ops = { 316static struct ata_port_operations piix_sata_ops = {
360 .tf_load = ata_tf_load, 317 .inherits = &ata_bmdma_port_ops,
361 .tf_read = ata_tf_read,
362 .check_status = ata_check_status,
363 .exec_command = ata_exec_command,
364 .dev_select = ata_std_dev_select,
365
366 .bmdma_setup = ata_bmdma_setup,
367 .bmdma_start = ata_bmdma_start,
368 .bmdma_stop = ata_bmdma_stop,
369 .bmdma_status = ata_bmdma_status,
370 .qc_prep = ata_qc_prep,
371 .qc_issue = ata_qc_issue_prot,
372 .data_xfer = ata_data_xfer,
373
374 .mode_filter = ata_pci_default_filter,
375 .freeze = ata_bmdma_freeze,
376 .thaw = ata_bmdma_thaw,
377 .error_handler = ata_bmdma_error_handler,
378 .post_internal_cmd = ata_bmdma_post_internal_cmd,
379
380 .irq_clear = ata_bmdma_irq_clear,
381 .irq_on = ata_irq_on,
382
383 .port_start = ata_sff_port_start,
384}; 318};
385 319
386static const struct ata_port_operations piix_vmw_ops = { 320static struct ata_port_operations piix_sidpr_sata_ops = {
387 .set_piomode = piix_set_piomode, 321 .inherits = &piix_sata_ops,
388 .set_dmamode = piix_set_dmamode,
389 .mode_filter = ata_pci_default_filter,
390
391 .tf_load = ata_tf_load,
392 .tf_read = ata_tf_read,
393 .check_status = ata_check_status,
394 .exec_command = ata_exec_command,
395 .dev_select = ata_std_dev_select,
396
397 .bmdma_setup = ata_bmdma_setup,
398 .bmdma_start = ata_bmdma_start,
399 .bmdma_stop = ata_bmdma_stop,
400 .bmdma_status = piix_vmw_bmdma_status,
401 .qc_prep = ata_qc_prep,
402 .qc_issue = ata_qc_issue_prot,
403 .data_xfer = ata_data_xfer,
404
405 .freeze = ata_bmdma_freeze,
406 .thaw = ata_bmdma_thaw,
407 .error_handler = piix_pata_error_handler,
408 .post_internal_cmd = ata_bmdma_post_internal_cmd,
409 .cable_detect = ata_cable_40wire,
410
411 .irq_handler = ata_interrupt,
412 .irq_clear = ata_bmdma_irq_clear,
413 .irq_on = ata_irq_on,
414
415 .port_start = ata_sff_port_start,
416};
417
418static const struct ata_port_operations piix_sidpr_sata_ops = {
419 .tf_load = ata_tf_load,
420 .tf_read = ata_tf_read,
421 .check_status = ata_check_status,
422 .exec_command = ata_exec_command,
423 .dev_select = ata_std_dev_select,
424
425 .bmdma_setup = ata_bmdma_setup,
426 .bmdma_start = ata_bmdma_start,
427 .bmdma_stop = ata_bmdma_stop,
428 .bmdma_status = ata_bmdma_status,
429 .qc_prep = ata_qc_prep,
430 .qc_issue = ata_qc_issue_prot,
431 .data_xfer = ata_data_xfer,
432
433 .scr_read = piix_sidpr_scr_read, 322 .scr_read = piix_sidpr_scr_read,
434 .scr_write = piix_sidpr_scr_write, 323 .scr_write = piix_sidpr_scr_write,
435
436 .mode_filter = ata_pci_default_filter,
437 .freeze = ata_bmdma_freeze,
438 .thaw = ata_bmdma_thaw,
439 .error_handler = piix_sidpr_error_handler, 324 .error_handler = piix_sidpr_error_handler,
440 .post_internal_cmd = ata_bmdma_post_internal_cmd,
441
442 .irq_clear = ata_bmdma_irq_clear,
443 .irq_on = ata_irq_on,
444
445 .port_start = ata_sff_port_start,
446}; 325};
447 326
448static const struct piix_map_db ich5_map_db = { 327static const struct piix_map_db ich5_map_db = {