Pass dma_slave_map data to EDMA driver. This will help
migration to new DMA engine API for requesting slave channels dma_request_chan(). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJWzCkLAAoJEGFBu2jqvgRN0foP/RHPIoLbwmQKXguh2j/vxLSP GANjOsJTn9AzINSH0emDZF9MpJMqdSf2OTAvt6FuGtToxmZUpmM575Ye9wWZ2V22 7cXb3S/VUga4mczkaYvFsJYxcp9VFEphKD+jZ9MCNhhgPs/xSi++XQc4D+RnN5VX 95Z6AhwFWyITkllfVh+J3b6Rqnb/JBka43KQWQDsYSSw0w7QvOOFW8L7n4oFEy30 mVarxDk6cFd2oXDm42N+CDO6143QJWlt1sy8xoSNKJGjjVbJ5Pu5kofzVWEtezrZ r5Sg3+8ZobKman8jlL/ZyjgXOhP24dXD7eUXsbYZXaSEwG2LmXzZvo3yxlXoiUfP CgRvmlRqJKNO0/OtNp5qBIKpPJrp9lrSHtAtYdETMkrTel91rEq4AXB5XeIA/HNZ kWakX7WEhj9KP85n5DdA23ygDr1uRG8jZmzp6ChJtUv8POzN5LnjGq4eS3Tl+VHs K0LGD7PXe+w1dD1Sc9W0whDuJ0UihlMVyqHqOV6dQiX5VrDB/4pPJvPaWfvffKeM uHJAf5W46tU8eiqMZe1PdnXkKipqpg0iUR++u8TRixzfAWULrDH19p0xCevWyfo3 mXjMG1/9/O3eqIreR6xkHPEg0vreEmCuuManA2zN+W7hBBK/n2dEHNeSfkh9FvF1 cY6vVpTN+J407/zzX1bT =p7iU -----END PGP SIGNATURE----- Merge tag 'davinci-for-v4.6/edma' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Merge "DaVinci EDMA enhancements for v4.6" from Sekhar Nori: Pass dma_slave_map data to EDMA driver. This will help migration to new DMA engine API for requesting slave channels dma_request_chan(). * tag 'davinci-for-v4.6/edma' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: dm646x: Add dma_slave_map to edma ARM: davinci: dm644x: Add dma_slave_map to edma ARM: davinci: dm365: Add dma_slave_map to edma ARM: davinci: dm355: Add dma_slave_map to edma ARM: davinci: devices-da8xx: Add dma_slave_map to edma
This commit is contained in:
commit
8bba98a8c1
|
@ -17,6 +17,7 @@
|
|||
#include <linux/ahci_platform.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
#include <mach/cputype.h>
|
||||
#include <mach/common.h>
|
||||
|
@ -233,16 +234,54 @@ static const struct platform_device_info da850_edma1_device __initconst = {
|
|||
.size_data = sizeof(da850_edma1_pdata),
|
||||
};
|
||||
|
||||
static const struct dma_slave_map da830_edma_map[] = {
|
||||
{ "davinci-mcasp.0", "rx", EDMA_FILTER_PARAM(0, 0) },
|
||||
{ "davinci-mcasp.0", "tx", EDMA_FILTER_PARAM(0, 1) },
|
||||
{ "davinci-mcasp.1", "rx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci-mcasp.1", "tx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "davinci-mcasp.2", "rx", EDMA_FILTER_PARAM(0, 4) },
|
||||
{ "davinci-mcasp.2", "tx", EDMA_FILTER_PARAM(0, 5) },
|
||||
{ "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 14) },
|
||||
{ "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 15) },
|
||||
{ "da830-mmc.0", "rx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "da830-mmc.0", "tx", EDMA_FILTER_PARAM(0, 17) },
|
||||
{ "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 18) },
|
||||
{ "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 19) },
|
||||
};
|
||||
|
||||
int __init da830_register_edma(struct edma_rsv_info *rsv)
|
||||
{
|
||||
struct platform_device *edma_pdev;
|
||||
|
||||
da8xx_edma0_pdata.rsv = rsv;
|
||||
|
||||
da8xx_edma0_pdata.slave_map = da830_edma_map;
|
||||
da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da830_edma_map);
|
||||
|
||||
edma_pdev = platform_device_register_full(&da8xx_edma0_device);
|
||||
return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0;
|
||||
}
|
||||
|
||||
static const struct dma_slave_map da850_edma0_map[] = {
|
||||
{ "davinci-mcasp.0", "rx", EDMA_FILTER_PARAM(0, 0) },
|
||||
{ "davinci-mcasp.0", "tx", EDMA_FILTER_PARAM(0, 1) },
|
||||
{ "davinci-mcbsp.0", "rx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci-mcbsp.0", "tx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "davinci-mcbsp.1", "rx", EDMA_FILTER_PARAM(0, 4) },
|
||||
{ "davinci-mcbsp.1", "tx", EDMA_FILTER_PARAM(0, 5) },
|
||||
{ "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 14) },
|
||||
{ "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 15) },
|
||||
{ "da830-mmc.0", "rx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "da830-mmc.0", "tx", EDMA_FILTER_PARAM(0, 17) },
|
||||
{ "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 18) },
|
||||
{ "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 19) },
|
||||
};
|
||||
|
||||
static const struct dma_slave_map da850_edma1_map[] = {
|
||||
{ "da830-mmc.1", "rx", EDMA_FILTER_PARAM(1, 28) },
|
||||
{ "da830-mmc.1", "tx", EDMA_FILTER_PARAM(1, 29) },
|
||||
};
|
||||
|
||||
int __init da850_register_edma(struct edma_rsv_info *rsv[2])
|
||||
{
|
||||
struct platform_device *edma_pdev;
|
||||
|
@ -252,11 +291,18 @@ int __init da850_register_edma(struct edma_rsv_info *rsv[2])
|
|||
da850_edma1_pdata.rsv = rsv[1];
|
||||
}
|
||||
|
||||
da8xx_edma0_pdata.slave_map = da850_edma0_map;
|
||||
da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da850_edma0_map);
|
||||
|
||||
edma_pdev = platform_device_register_full(&da8xx_edma0_device);
|
||||
if (IS_ERR(edma_pdev)) {
|
||||
pr_warn("%s: Failed to register eDMA0\n", __func__);
|
||||
return PTR_ERR(edma_pdev);
|
||||
}
|
||||
|
||||
da850_edma1_pdata.slave_map = da850_edma1_map;
|
||||
da850_edma1_pdata.slavecnt = ARRAY_SIZE(da850_edma1_map);
|
||||
|
||||
edma_pdev = platform_device_register_full(&da850_edma1_device);
|
||||
return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/serial_8250.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
#include <linux/platform_data/gpio-davinci.h>
|
||||
|
@ -576,9 +577,28 @@ static s8 queue_priority_mapping[][2] = {
|
|||
{-1, -1},
|
||||
};
|
||||
|
||||
static const struct dma_slave_map dm355_edma_map[] = {
|
||||
{ "davinci-mcbsp.0", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci-mcbsp.0", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "davinci-mcbsp.1", "tx", EDMA_FILTER_PARAM(0, 8) },
|
||||
{ "davinci-mcbsp.1", "rx", EDMA_FILTER_PARAM(0, 9) },
|
||||
{ "spi_davinci.2", "tx", EDMA_FILTER_PARAM(0, 10) },
|
||||
{ "spi_davinci.2", "rx", EDMA_FILTER_PARAM(0, 11) },
|
||||
{ "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 14) },
|
||||
{ "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 15) },
|
||||
{ "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 17) },
|
||||
{ "dm6441-mmc.0", "rx", EDMA_FILTER_PARAM(0, 26) },
|
||||
{ "dm6441-mmc.0", "tx", EDMA_FILTER_PARAM(0, 27) },
|
||||
{ "dm6441-mmc.1", "rx", EDMA_FILTER_PARAM(0, 30) },
|
||||
{ "dm6441-mmc.1", "tx", EDMA_FILTER_PARAM(0, 31) },
|
||||
};
|
||||
|
||||
static struct edma_soc_info dm355_edma_pdata = {
|
||||
.queue_priority_mapping = queue_priority_mapping,
|
||||
.default_queue = EVENTQ_1,
|
||||
.slave_map = dm355_edma_map,
|
||||
.slavecnt = ARRAY_SIZE(dm355_edma_map),
|
||||
};
|
||||
|
||||
static struct resource edma_resources[] = {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/serial_8250.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
#include <linux/platform_data/gpio-davinci.h>
|
||||
|
@ -862,9 +863,30 @@ static s8 dm365_queue_priority_mapping[][2] = {
|
|||
{-1, -1},
|
||||
};
|
||||
|
||||
static const struct dma_slave_map dm365_edma_map[] = {
|
||||
{ "davinci-mcbsp.0", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci-mcbsp.0", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "davinci_voicecodec", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci_voicecodec", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "spi_davinci.2", "tx", EDMA_FILTER_PARAM(0, 10) },
|
||||
{ "spi_davinci.2", "rx", EDMA_FILTER_PARAM(0, 11) },
|
||||
{ "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 14) },
|
||||
{ "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 15) },
|
||||
{ "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 17) },
|
||||
{ "spi_davinci.3", "tx", EDMA_FILTER_PARAM(0, 18) },
|
||||
{ "spi_davinci.3", "rx", EDMA_FILTER_PARAM(0, 19) },
|
||||
{ "dm6441-mmc.0", "rx", EDMA_FILTER_PARAM(0, 26) },
|
||||
{ "dm6441-mmc.0", "tx", EDMA_FILTER_PARAM(0, 27) },
|
||||
{ "dm6441-mmc.1", "rx", EDMA_FILTER_PARAM(0, 30) },
|
||||
{ "dm6441-mmc.1", "tx", EDMA_FILTER_PARAM(0, 31) },
|
||||
};
|
||||
|
||||
static struct edma_soc_info dm365_edma_pdata = {
|
||||
.queue_priority_mapping = dm365_queue_priority_mapping,
|
||||
.default_queue = EVENTQ_3,
|
||||
.slave_map = dm365_edma_map,
|
||||
.slavecnt = ARRAY_SIZE(dm365_edma_map),
|
||||
};
|
||||
|
||||
static struct resource edma_resources[] = {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
#include <linux/platform_data/gpio-davinci.h>
|
||||
|
@ -505,9 +506,20 @@ static s8 queue_priority_mapping[][2] = {
|
|||
{-1, -1},
|
||||
};
|
||||
|
||||
static const struct dma_slave_map dm644x_edma_map[] = {
|
||||
{ "davinci-mcbsp", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||
{ "davinci-mcbsp", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||
{ "spi_davinci", "tx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "spi_davinci", "rx", EDMA_FILTER_PARAM(0, 17) },
|
||||
{ "dm6441-mmc.0", "rx", EDMA_FILTER_PARAM(0, 26) },
|
||||
{ "dm6441-mmc.0", "tx", EDMA_FILTER_PARAM(0, 27) },
|
||||
};
|
||||
|
||||
static struct edma_soc_info dm644x_edma_pdata = {
|
||||
.queue_priority_mapping = queue_priority_mapping,
|
||||
.default_queue = EVENTQ_1,
|
||||
.slave_map = dm644x_edma_map,
|
||||
.slavecnt = ARRAY_SIZE(dm644x_edma_map),
|
||||
};
|
||||
|
||||
static struct resource edma_resources[] = {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* or implied.
|
||||
*/
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/serial_8250.h>
|
||||
|
@ -540,9 +541,19 @@ static s8 dm646x_queue_priority_mapping[][2] = {
|
|||
{-1, -1},
|
||||
};
|
||||
|
||||
static const struct dma_slave_map dm646x_edma_map[] = {
|
||||
{ "davinci-mcasp.0", "tx", EDMA_FILTER_PARAM(0, 6) },
|
||||
{ "davinci-mcasp.0", "rx", EDMA_FILTER_PARAM(0, 9) },
|
||||
{ "davinci-mcasp.1", "tx", EDMA_FILTER_PARAM(0, 12) },
|
||||
{ "spi_davinci", "tx", EDMA_FILTER_PARAM(0, 16) },
|
||||
{ "spi_davinci", "rx", EDMA_FILTER_PARAM(0, 17) },
|
||||
};
|
||||
|
||||
static struct edma_soc_info dm646x_edma_pdata = {
|
||||
.queue_priority_mapping = dm646x_queue_priority_mapping,
|
||||
.default_queue = EVENTQ_1,
|
||||
.slave_map = dm646x_edma_map,
|
||||
.slavecnt = ARRAY_SIZE(dm646x_edma_map),
|
||||
};
|
||||
|
||||
static struct resource edma_resources[] = {
|
||||
|
|
Loading…
Reference in New Issue