11 #include <linux/kernel.h>
12 #include <linux/module.h>
13 #include <linux/pci.h>
17 #include <linux/device.h>
22 #define DRV_NAME "pata_marvell"
23 #define DRV_VERSION "0.1.6"
33 static int marvell_pata_active(
struct pci_dev *pdev)
40 if (pdev->
device != 0x6145)
43 barp = pci_iomap(pdev, 5, 0x10);
48 for(i = 0; i <= 0x0F; i++)
68 static int marvell_pre_reset(
struct ata_link *
link,
unsigned long deadline)
74 !marvell_pata_active(pdev))
80 static int marvell_cable_detect(
struct ata_port *ap)
86 if (
ioread8(ap->ioaddr.bmdma_addr + 1) & 1)
104 .inherits = &ata_bmdma_port_ops,
105 .cable_detect = marvell_cable_detect,
106 .prereset = marvell_pre_reset,
133 .port_ops = &marvell_ops,
143 .port_ops = &marvell_ops,
147 if (pdev->
device == 0x6101)
150 #if defined(CONFIG_SATA_AHCI) || defined(CONFIG_SATA_AHCI_MODULE)
151 if (!marvell_pata_active(pdev)) {
156 return ata_pci_bmdma_init_one(pdev, ppi, &marvell_sht,
NULL, 0);
170 static struct pci_driver marvell_pci_driver = {
172 .id_table = marvell_pci_tbl,
173 .probe = marvell_init_one,
174 .remove = ata_pci_remove_one,
176 .suspend = ata_pci_device_suspend,
177 .resume = ata_pci_device_resume,