37 #include <linux/kernel.h>
38 #include <linux/module.h>
39 #include <linux/pci.h>
46 #define DRV_NAME "pata_ninja32"
47 #define DRV_VERSION "0.1.5"
61 static u16 pio_timing[5] = {
62 0xd6, 0x85, 0x44, 0x33, 0x13
65 ap->ioaddr.bmdma_addr + 0x1f);
70 static void ninja32_dev_select(
struct ata_port *ap,
unsigned int device)
74 iowrite8(0xd6, ap->ioaddr.bmdma_addr + 0x1f);
76 ninja32_set_piomode(ap, adev);
85 .inherits = &ata_bmdma_port_ops,
86 .sff_dev_select = ninja32_dev_select,
88 .set_piomode = ninja32_set_piomode,
92 static void ninja32_program(
void __iomem *base)
136 base = host->
iomap[0];
139 ap->
ops = &ninja32_port_ops;
143 ap->ioaddr.cmd_addr = base + 0x10;
144 ap->ioaddr.ctl_addr = base + 0x1E;
145 ap->ioaddr.altstatus_addr = base + 0x1E;
146 ap->ioaddr.bmdma_addr = base;
150 ninja32_program(base);
158 static int ninja32_reinit_one(
struct pci_dev *pdev)
163 rc = ata_pci_device_do_resume(pdev);
166 ninja32_program(host->
iomap[0]);
167 ata_host_resume(host);
182 static struct pci_driver ninja32_pci_driver = {
185 .probe = ninja32_init_one,
186 .remove = ata_pci_remove_one,
188 .suspend = ata_pci_device_suspend,
189 .resume = ninja32_reinit_one,