pata_mpiix.c (bb648a0d22908116b4ef168935a160d7f17c4e6d) pata_mpiix.c (a0fcdc0259e98d1c16d96baea9ba8a8603e41791)
1/*
2 * pata_mpiix.c - Intel MPIIX PATA for new ATA layer
3 * (C) 2005-2006 Red Hat Inc
4 * Alan Cox <alan@redhat.com>
5 *
6 * The MPIIX is different enough to the PIIX4 and friends that we give it
7 * a separate driver. The old ide/pci code handles this by just not tuning
8 * MPIIX at all.

--- 21 unchanged lines hidden (view full) ---

30#include <linux/pci.h>
31#include <linux/init.h>
32#include <linux/blkdev.h>
33#include <linux/delay.h>
34#include <scsi/scsi_host.h>
35#include <linux/libata.h>
36
37#define DRV_NAME "pata_mpiix"
1/*
2 * pata_mpiix.c - Intel MPIIX PATA for new ATA layer
3 * (C) 2005-2006 Red Hat Inc
4 * Alan Cox <alan@redhat.com>
5 *
6 * The MPIIX is different enough to the PIIX4 and friends that we give it
7 * a separate driver. The old ide/pci code handles this by just not tuning
8 * MPIIX at all.

--- 21 unchanged lines hidden (view full) ---

30#include <linux/pci.h>
31#include <linux/init.h>
32#include <linux/blkdev.h>
33#include <linux/delay.h>
34#include <scsi/scsi_host.h>
35#include <linux/libata.h>
36
37#define DRV_NAME "pata_mpiix"
38#define DRV_VERSION "0.7.5"
38#define DRV_VERSION "0.7.6"
39
40enum {
41 IDETIM = 0x6C, /* IDE control register */
42 IORDY = (1 << 1),
43 PPE = (1 << 2),
44 FTIM = (1 << 0),
45 ENABLED = (1 << 15),
46 SECONDARY = (1 << 14)
47};
48
49static int mpiix_pre_reset(struct ata_port *ap)
50{
51 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
52 static const struct pci_bits mpiix_enable_bits = { 0x6D, 1, 0x80, 0x80 };
53
54 if (!pci_test_config_bits(pdev, &mpiix_enable_bits))
55 return -ENOENT;
39
40enum {
41 IDETIM = 0x6C, /* IDE control register */
42 IORDY = (1 << 1),
43 PPE = (1 << 2),
44 FTIM = (1 << 0),
45 ENABLED = (1 << 15),
46 SECONDARY = (1 << 14)
47};
48
49static int mpiix_pre_reset(struct ata_port *ap)
50{
51 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
52 static const struct pci_bits mpiix_enable_bits = { 0x6D, 1, 0x80, 0x80 };
53
54 if (!pci_test_config_bits(pdev, &mpiix_enable_bits))
55 return -ENOENT;
56 ap->cbl = ATA_CBL_PATA40;
57 return ata_std_prereset(ap);
58}
59
60/**
61 * mpiix_error_handler - probe reset
62 * @ap: ATA port
63 *
64 * Perform the ATA probe and bus reset sequence plus specific handling

--- 115 unchanged lines hidden (view full) ---

180 .check_status = ata_check_status,
181 .exec_command = ata_exec_command,
182 .dev_select = ata_std_dev_select,
183
184 .freeze = ata_bmdma_freeze,
185 .thaw = ata_bmdma_thaw,
186 .error_handler = mpiix_error_handler,
187 .post_internal_cmd = ata_bmdma_post_internal_cmd,
56 return ata_std_prereset(ap);
57}
58
59/**
60 * mpiix_error_handler - probe reset
61 * @ap: ATA port
62 *
63 * Perform the ATA probe and bus reset sequence plus specific handling

--- 115 unchanged lines hidden (view full) ---

179 .check_status = ata_check_status,
180 .exec_command = ata_exec_command,
181 .dev_select = ata_std_dev_select,
182
183 .freeze = ata_bmdma_freeze,
184 .thaw = ata_bmdma_thaw,
185 .error_handler = mpiix_error_handler,
186 .post_internal_cmd = ata_bmdma_post_internal_cmd,
187 .cable_detect = ata_cable_40wire,
188
189 .qc_prep = ata_qc_prep,
190 .qc_issue = mpiix_qc_issue_prot,
191 .data_xfer = ata_data_xfer,
192
193 .irq_handler = ata_interrupt,
194 .irq_clear = ata_bmdma_irq_clear,
195 .irq_on = ata_irq_on,

--- 103 unchanged lines hidden ---
188
189 .qc_prep = ata_qc_prep,
190 .qc_issue = mpiix_qc_issue_prot,
191 .data_xfer = ata_data_xfer,
192
193 .irq_handler = ata_interrupt,
194 .irq_clear = ata_bmdma_irq_clear,
195 .irq_on = ata_irq_on,

--- 103 unchanged lines hidden ---