pata_it821x.c (cd0d3bbcdd650651b7ccfaf55d107e3fc237d95a) | pata_it821x.c (a0fcdc0259e98d1c16d96baea9ba8a8603e41791) |
---|---|
1/* 2 * ata-it821x.c - IT821x PATA for new ATA layer 3 * (C) 2005 Red Hat Inc 4 * Alan Cox <alan@redhat.com> 5 * 6 * based upon 7 * 8 * it821x.c --- 66 unchanged lines hidden (view full) --- 75#include <linux/init.h> 76#include <linux/blkdev.h> 77#include <linux/delay.h> 78#include <scsi/scsi_host.h> 79#include <linux/libata.h> 80 81 82#define DRV_NAME "pata_it821x" | 1/* 2 * ata-it821x.c - IT821x PATA for new ATA layer 3 * (C) 2005 Red Hat Inc 4 * Alan Cox <alan@redhat.com> 5 * 6 * based upon 7 * 8 * it821x.c --- 66 unchanged lines hidden (view full) --- 75#include <linux/init.h> 76#include <linux/blkdev.h> 77#include <linux/delay.h> 78#include <scsi/scsi_host.h> 79#include <linux/libata.h> 80 81 82#define DRV_NAME "pata_it821x" |
83#define DRV_VERSION "0.3.4" | 83#define DRV_VERSION "0.3.6" |
84 85struct it821x_dev 86{ 87 unsigned int smart:1, /* Are we in smart raid mode */ 88 timing10:1; /* Rev 0x10 */ 89 u8 clock_mode; /* 0, ATA_50 or ATA_66 */ 90 u8 want[2][2]; /* Mode/Pri log for master slave */ 91 /* We need these for switching the clock when DMA goes on/off --- 16 unchanged lines hidden (view full) --- 108 * flashing the alternative BIOS. This is also neccessary right now 109 * for embedded platforms that cannot run a PC BIOS but are using this 110 * device. 111 */ 112 113static int it8212_noraid; 114 115/** | 84 85struct it821x_dev 86{ 87 unsigned int smart:1, /* Are we in smart raid mode */ 88 timing10:1; /* Rev 0x10 */ 89 u8 clock_mode; /* 0, ATA_50 or ATA_66 */ 90 u8 want[2][2]; /* Mode/Pri log for master slave */ 91 /* We need these for switching the clock when DMA goes on/off --- 16 unchanged lines hidden (view full) --- 108 * flashing the alternative BIOS. This is also neccessary right now 109 * for embedded platforms that cannot run a PC BIOS but are using this 110 * device. 111 */ 112 113static int it8212_noraid; 114 115/** |
116 * it821x_pre_reset - probe 117 * @ap: ATA port 118 * 119 * Set the cable type 120 */ 121 122static int it821x_pre_reset(struct ata_port *ap) 123{ 124 ap->cbl = ATA_CBL_PATA80; 125 return ata_std_prereset(ap); 126} 127 128/** 129 * it821x_error_handler - probe/reset 130 * @ap: ATA port 131 * 132 * Set the cable type and trigger a probe 133 */ 134 135static void it821x_error_handler(struct ata_port *ap) 136{ 137 return ata_bmdma_drive_eh(ap, it821x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); 138} 139 140/** | |
141 * it821x_program - program the PIO/MWDMA registers 142 * @ap: ATA port 143 * @adev: Device to program 144 * @timing: Timing value (66Mhz in top 8bits, 50 in the low 8) 145 * 146 * Program the PIO/MWDMA timing for this channel according to the 147 * current clock. These share the same register so are managed by 148 * the DMA start/stop sequence as with the old driver. --- 512 unchanged lines hidden (view full) --- 661 .check_status = ata_check_status, 662 .check_atapi_dma= it821x_check_atapi_dma, 663 .exec_command = ata_exec_command, 664 .dev_select = ata_std_dev_select, 665 .dev_config = it821x_dev_config, 666 667 .freeze = ata_bmdma_freeze, 668 .thaw = ata_bmdma_thaw, | 116 * it821x_program - program the PIO/MWDMA registers 117 * @ap: ATA port 118 * @adev: Device to program 119 * @timing: Timing value (66Mhz in top 8bits, 50 in the low 8) 120 * 121 * Program the PIO/MWDMA timing for this channel according to the 122 * current clock. These share the same register so are managed by 123 * the DMA start/stop sequence as with the old driver. --- 512 unchanged lines hidden (view full) --- 636 .check_status = ata_check_status, 637 .check_atapi_dma= it821x_check_atapi_dma, 638 .exec_command = ata_exec_command, 639 .dev_select = ata_std_dev_select, 640 .dev_config = it821x_dev_config, 641 642 .freeze = ata_bmdma_freeze, 643 .thaw = ata_bmdma_thaw, |
669 .error_handler = it821x_error_handler, | 644 .error_handler = ata_bmdma_error_handler, |
670 .post_internal_cmd = ata_bmdma_post_internal_cmd, | 645 .post_internal_cmd = ata_bmdma_post_internal_cmd, |
646 .cable_detect = ata_cable_unknown, |
|
671 672 .bmdma_setup = ata_bmdma_setup, 673 .bmdma_start = ata_bmdma_start, 674 .bmdma_stop = ata_bmdma_stop, 675 .bmdma_status = ata_bmdma_status, 676 677 .qc_prep = ata_qc_prep, 678 .qc_issue = it821x_smart_qc_issue_prot, --- 18 unchanged lines hidden (view full) --- 697 .tf_read = ata_tf_read, 698 .check_status = ata_check_status, 699 .exec_command = ata_exec_command, 700 .check_atapi_dma= it821x_check_atapi_dma, 701 .dev_select = it821x_passthru_dev_select, 702 703 .freeze = ata_bmdma_freeze, 704 .thaw = ata_bmdma_thaw, | 647 648 .bmdma_setup = ata_bmdma_setup, 649 .bmdma_start = ata_bmdma_start, 650 .bmdma_stop = ata_bmdma_stop, 651 .bmdma_status = ata_bmdma_status, 652 653 .qc_prep = ata_qc_prep, 654 .qc_issue = it821x_smart_qc_issue_prot, --- 18 unchanged lines hidden (view full) --- 673 .tf_read = ata_tf_read, 674 .check_status = ata_check_status, 675 .exec_command = ata_exec_command, 676 .check_atapi_dma= it821x_check_atapi_dma, 677 .dev_select = it821x_passthru_dev_select, 678 679 .freeze = ata_bmdma_freeze, 680 .thaw = ata_bmdma_thaw, |
705 .error_handler = it821x_error_handler, | 681 .error_handler = ata_bmdma_error_handler, |
706 .post_internal_cmd = ata_bmdma_post_internal_cmd, | 682 .post_internal_cmd = ata_bmdma_post_internal_cmd, |
683 .cable_detect = ata_cable_unknown, |
|
707 708 .bmdma_setup = ata_bmdma_setup, 709 .bmdma_start = it821x_passthru_bmdma_start, 710 .bmdma_stop = it821x_passthru_bmdma_stop, 711 .bmdma_status = ata_bmdma_status, 712 713 .qc_prep = ata_qc_prep, 714 .qc_issue = it821x_passthru_qc_issue_prot, --- 119 unchanged lines hidden --- | 684 685 .bmdma_setup = ata_bmdma_setup, 686 .bmdma_start = it821x_passthru_bmdma_start, 687 .bmdma_stop = it821x_passthru_bmdma_stop, 688 .bmdma_status = ata_bmdma_status, 689 690 .qc_prep = ata_qc_prep, 691 .qc_issue = it821x_passthru_qc_issue_prot, --- 119 unchanged lines hidden --- |