sh: DMA driver has to specify its alignment requirements
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 4 Dec 2009 18:44:41 +0000 (19:44 +0100)
committerDan Williams <dan.j.williams@intel.com>
Fri, 11 Dec 2009 06:25:58 +0000 (23:25 -0700)
The SH DMA driver by default uses 32-byte transfers, in this mode buffers and
sizes have to be 32-byte aligned. Specifying this requirement also fixes Oopses
with dmatest.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/shdma.c

index b3b065c4e5c1f4eb0990c5e81286a8191e81edee..f5fae1258b5476f2392bcbebd059a800b1c91d22 100644 (file)
@@ -677,6 +677,8 @@ static int __init sh_dmae_probe(struct platform_device *pdev)
        shdev->common.device_is_tx_complete = sh_dmae_is_complete;
        shdev->common.device_issue_pending = sh_dmae_memcpy_issue_pending;
        shdev->common.dev = &pdev->dev;
+       /* Default transfer size of 32 bytes requires 32-byte alignment */
+       shdev->common.copy_align = 5;
 
 #if defined(CONFIG_CPU_SH4)
        /* Non Mix IRQ mode SH7722/SH7730 etc... */