Thread (7 messages) 7 messages, 3 authors, 2015-11-23

Re: [PATCH v1 1/2] sata_dwc_460ex: move to generic DMA driver

From: Måns Rullgård <hidden>
Date: 2015-11-22 13:10:50
Also in: linuxppc-dev

Andy Shevchenko [off-list ref] writes:
The SATA implementation based on two actually different devices, i.e. SATA and
DMA controllers.

For Synopsys DesignWare DMA we have already a generic implementation of the
driver. Thus, the patch converts the code to use DMAEngine framework and
dw_dmac driver.

In future it will be better to split the devices inside DTS as well like it's
done on other platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/ata/sata_dwc_460ex.c | 736 +++++++------------------------------------
 1 file changed, 122 insertions(+), 614 deletions(-)
[...]
quoted hunk ↗ jump to hunk
@@ -1721,16 +1227,16 @@ static int sata_dwc_probe(struct platform_device *ofdev)
 		   idr, ver[0], ver[1], ver[2]);

 	/* Get SATA DMA interrupt number */
-	irq = irq_of_parse_and_map(np, 1);
-	if (irq == NO_IRQ) {
+	hsdev->dma->irq = irq_of_parse_and_map(np, 1);
This doesn't look like it has been more than compile-tested.  Nothing
ever allocates hsdev->dma, so it can't possibly work.

Also, has anyone given any thought to getting rid of the dependency on
the DW DMA controller?  Presumably support for old device trees would
need to be retained for compatibility.  Maybe checking for a "dmas"
property and falling back on the current behaviour if it's missing.  My
goal is to get this driver working with another chip using the same SATA
controller but a different DMA engine.

-- 
Måns Rullgård
mans@mansr.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help