Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: edma: DT: Change memcpy channel array from 16bit to 32bit type

This change makes the DT file to be easier to read since the memcpy
channels array does not need the '/bits/ 16' to be specified, which might
confuse some people.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Peter Ujfalusi and committed by
Vinod Koul
ecb7dece 8005c49d

+13 -16
+2 -3
Documentation/devicetree/bindings/dma/ti-edma.txt
··· 22 22 Optional properties: 23 23 - ti,hwmods: Name of the hwmods associated to the eDMA CC 24 24 - ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow 25 - these channels will be SW triggered channels. The list must 26 - contain 16 bits numbers, see example. 25 + these channels will be SW triggered channels. See example. 27 26 - ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by 28 27 the driver, they are allocated to be used by for example the 29 28 DSP. See example. ··· 55 56 ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>; 56 57 57 58 /* Channel 20 and 21 is allocated for memcpy */ 58 - ti,edma-memcpy-channels = /bits/ 16 <20 21>; 59 + ti,edma-memcpy-channels = <20 21>; 59 60 /* The following PaRAM slots are reserved: 35-45 and 100-110 */ 60 61 ti,edma-reserved-slot-ranges = /bits/ 16 <35 10>, 61 62 /bits/ 16 <100 10>;
+10 -12
drivers/dma/edma.c
··· 1752 1752 return ret; 1753 1753 } 1754 1754 1755 - static bool edma_is_memcpy_channel(int ch_num, u16 *memcpy_channels) 1755 + static bool edma_is_memcpy_channel(int ch_num, s32 *memcpy_channels) 1756 1756 { 1757 - s16 *memcpy_ch = memcpy_channels; 1758 - 1759 1757 if (!memcpy_channels) 1760 1758 return false; 1761 - while (*memcpy_ch != -1) { 1762 - if (*memcpy_ch == ch_num) 1759 + while (*memcpy_channels != -1) { 1760 + if (*memcpy_channels == ch_num) 1763 1761 return true; 1764 - memcpy_ch++; 1762 + memcpy_channels++; 1765 1763 } 1766 1764 return false; 1767 1765 } ··· 1773 1775 { 1774 1776 struct dma_device *s_ddev = &ecc->dma_slave; 1775 1777 struct dma_device *m_ddev = NULL; 1776 - s16 *memcpy_channels = ecc->info->memcpy_channels; 1778 + s32 *memcpy_channels = ecc->info->memcpy_channels; 1777 1779 int i, j; 1778 1780 1779 1781 dma_cap_zero(s_ddev->cap_mask); ··· 1994 1996 prop = of_find_property(dev->of_node, "ti,edma-memcpy-channels", &sz); 1995 1997 if (prop) { 1996 1998 const char pname[] = "ti,edma-memcpy-channels"; 1997 - size_t nelm = sz / sizeof(s16); 1998 - s16 *memcpy_ch; 1999 + size_t nelm = sz / sizeof(s32); 2000 + s32 *memcpy_ch; 1999 2001 2000 - memcpy_ch = devm_kcalloc(dev, nelm + 1, sizeof(s16), 2002 + memcpy_ch = devm_kcalloc(dev, nelm + 1, sizeof(s32), 2001 2003 GFP_KERNEL); 2002 2004 if (!memcpy_ch) 2003 2005 return ERR_PTR(-ENOMEM); 2004 2006 2005 - ret = of_property_read_u16_array(dev->of_node, pname, 2006 - (u16 *)memcpy_ch, nelm); 2007 + ret = of_property_read_u32_array(dev->of_node, pname, 2008 + (u32 *)memcpy_ch, nelm); 2007 2009 if (ret) 2008 2010 return ERR_PTR(ret); 2009 2011
+1 -1
include/linux/platform_data/edma.h
··· 72 72 struct edma_rsv_info *rsv; 73 73 74 74 /* List of channels allocated for memcpy, terminated with -1 */ 75 - s16 *memcpy_channels; 75 + s32 *memcpy_channels; 76 76 77 77 s8 (*queue_priority_mapping)[2]; 78 78 const s16 (*xbar_chans)[2];