21 #include <linux/kernel.h>
22 #include <linux/module.h>
29 #include <linux/slab.h>
38 #define DRV_NAME "pata_pxa"
39 #define DRV_VERSION "0.1"
72 seg_len = (cpu_len > 0x1000) ? 0x1000 : cpu_len;
121 pxa_load_dmac(sg, qc);
139 qc->ap->ops->sff_exec_command(qc->ap, &qc->tf);
161 dev_err(qc->
ap->dev,
"Timeout waiting for DMA completion!");
170 static unsigned char pxa_bmdma_status(
struct ata_port *ap)
184 static void pxa_irq_clear(
struct ata_port *ap)
202 .inherits = &ata_bmdma_port_ops,
205 .bmdma_setup = pxa_bmdma_setup,
206 .bmdma_start = pxa_bmdma_start,
207 .bmdma_stop = pxa_bmdma_stop,
208 .bmdma_status = pxa_bmdma_status,
210 .check_atapi_dma = pxa_check_atapi_dma,
212 .sff_irq_clear = pxa_irq_clear,
214 .qc_prep = pxa_qc_prep,
220 static void pxa_ata_dma_irq(
int dma,
void *
port)
252 dev_err(&pdev->
dev,
"invalid number of resources\n");
292 ap->
ops = &pxa_ata_port_ops;
297 resource_size(cmd_res));
299 resource_size(ctl_res));
301 resource_size(dma_res));
306 ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
307 ap->ioaddr.data_addr = ap->ioaddr.cmd_addr +
309 ap->ioaddr.error_addr = ap->ioaddr.cmd_addr +
311 ap->ioaddr.feature_addr = ap->ioaddr.cmd_addr +
313 ap->ioaddr.nsect_addr = ap->ioaddr.cmd_addr +
315 ap->ioaddr.lbal_addr = ap->ioaddr.cmd_addr +
317 ap->ioaddr.lbam_addr = ap->ioaddr.cmd_addr +
319 ap->ioaddr.lbah_addr = ap->ioaddr.cmd_addr +
321 ap->ioaddr.device_addr = ap->ioaddr.cmd_addr +
323 ap->ioaddr.status_addr = ap->ioaddr.cmd_addr +
325 ap->ioaddr.command_addr = ap->ioaddr.cmd_addr +
352 pxa_ata_dma_irq, ap);
385 .probe = pxa_ata_probe,