pata_sil680.c (bb648a0d22908116b4ef168935a160d7f17c4e6d) | pata_sil680.c (a0fcdc0259e98d1c16d96baea9ba8a8603e41791) |
---|---|
1/* 2 * pata_sil680.c - SIL680 PATA for new ATA layer 3 * (C) 2005 Red Hat Inc 4 * Alan Cox <alan@redhat.com> 5 * 6 * based upon 7 * 8 * linux/drivers/ide/pci/siimage.c Version 1.07 Nov 30, 2003 --- 19 unchanged lines hidden (view full) --- 28#include <linux/pci.h> 29#include <linux/init.h> 30#include <linux/blkdev.h> 31#include <linux/delay.h> 32#include <scsi/scsi_host.h> 33#include <linux/libata.h> 34 35#define DRV_NAME "pata_sil680" | 1/* 2 * pata_sil680.c - SIL680 PATA for new ATA layer 3 * (C) 2005 Red Hat Inc 4 * Alan Cox <alan@redhat.com> 5 * 6 * based upon 7 * 8 * linux/drivers/ide/pci/siimage.c Version 1.07 Nov 30, 2003 --- 19 unchanged lines hidden (view full) --- 28#include <linux/pci.h> 29#include <linux/init.h> 30#include <linux/blkdev.h> 31#include <linux/delay.h> 32#include <scsi/scsi_host.h> 33#include <linux/libata.h> 34 35#define DRV_NAME "pata_sil680" |
36#define DRV_VERSION "0.4.5" | 36#define DRV_VERSION "0.4.6" |
37 38/** 39 * sil680_selreg - return register base 40 * @hwif: interface 41 * @r: config offset 42 * 43 * Turn a config register offset into the right address in either 44 * PCI space or MMIO space to access the control register in question --- 41 unchanged lines hidden (view full) --- 86 u8 ata66; 87 pci_read_config_byte(pdev, addr, &ata66); 88 if (ata66 & 1) 89 return ATA_CBL_PATA80; 90 else 91 return ATA_CBL_PATA40; 92} 93 | 37 38/** 39 * sil680_selreg - return register base 40 * @hwif: interface 41 * @r: config offset 42 * 43 * Turn a config register offset into the right address in either 44 * PCI space or MMIO space to access the control register in question --- 41 unchanged lines hidden (view full) --- 86 u8 ata66; 87 pci_read_config_byte(pdev, addr, &ata66); 88 if (ata66 & 1) 89 return ATA_CBL_PATA80; 90 else 91 return ATA_CBL_PATA40; 92} 93 |
94static int sil680_pre_reset(struct ata_port *ap) 95{ 96 ap->cbl = sil680_cable_detect(ap); 97 return ata_std_prereset(ap); 98} 99 | |
100/** 101 * sil680_bus_reset - reset the SIL680 bus 102 * @ap: ATA port to reset 103 * 104 * Perform the SIL680 housekeeping when doing an ATA bus reset 105 */ 106 107static int sil680_bus_reset(struct ata_port *ap,unsigned int *classes) --- 6 unchanged lines hidden (view full) --- 114 pci_write_config_byte(pdev, addr, reset | 0x03); 115 udelay(25); 116 pci_write_config_byte(pdev, addr, reset); 117 return ata_std_softreset(ap, classes); 118} 119 120static void sil680_error_handler(struct ata_port *ap) 121{ | 94/** 95 * sil680_bus_reset - reset the SIL680 bus 96 * @ap: ATA port to reset 97 * 98 * Perform the SIL680 housekeeping when doing an ATA bus reset 99 */ 100 101static int sil680_bus_reset(struct ata_port *ap,unsigned int *classes) --- 6 unchanged lines hidden (view full) --- 108 pci_write_config_byte(pdev, addr, reset | 0x03); 109 udelay(25); 110 pci_write_config_byte(pdev, addr, reset); 111 return ata_std_softreset(ap, classes); 112} 113 114static void sil680_error_handler(struct ata_port *ap) 115{ |
122 ata_bmdma_drive_eh(ap, sil680_pre_reset, sil680_bus_reset, NULL, ata_std_postreset); | 116 ata_bmdma_drive_eh(ap, ata_std_prereset, sil680_bus_reset, NULL, ata_std_postreset); |
123} 124 125/** 126 * sil680_set_piomode - set initial PIO mode data 127 * @ap: ATA interface 128 * @adev: ATA device 129 * 130 * Program the SIL680 registers for PIO mode. Note that the task speed --- 121 unchanged lines hidden (view full) --- 252 .check_status = ata_check_status, 253 .exec_command = ata_exec_command, 254 .dev_select = ata_std_dev_select, 255 256 .freeze = ata_bmdma_freeze, 257 .thaw = ata_bmdma_thaw, 258 .error_handler = sil680_error_handler, 259 .post_internal_cmd = ata_bmdma_post_internal_cmd, | 117} 118 119/** 120 * sil680_set_piomode - set initial PIO mode data 121 * @ap: ATA interface 122 * @adev: ATA device 123 * 124 * Program the SIL680 registers for PIO mode. Note that the task speed --- 121 unchanged lines hidden (view full) --- 246 .check_status = ata_check_status, 247 .exec_command = ata_exec_command, 248 .dev_select = ata_std_dev_select, 249 250 .freeze = ata_bmdma_freeze, 251 .thaw = ata_bmdma_thaw, 252 .error_handler = sil680_error_handler, 253 .post_internal_cmd = ata_bmdma_post_internal_cmd, |
254 .cable_detect = sil680_cable_detect, |
|
260 261 .bmdma_setup = ata_bmdma_setup, 262 .bmdma_start = ata_bmdma_start, 263 .bmdma_stop = ata_bmdma_stop, 264 .bmdma_status = ata_bmdma_status, 265 266 .qc_prep = ata_qc_prep, 267 .qc_issue = ata_qc_issue_prot, --- 159 unchanged lines hidden --- | 255 256 .bmdma_setup = ata_bmdma_setup, 257 .bmdma_start = ata_bmdma_start, 258 .bmdma_stop = ata_bmdma_stop, 259 .bmdma_status = ata_bmdma_status, 260 261 .qc_prep = ata_qc_prep, 262 .qc_issue = ata_qc_issue_prot, --- 159 unchanged lines hidden --- |