This driver is currently implemented as a user to the old i.MX DMA API. This allows us to convert each user of the old API to the dmaengine API one by one. Once this is done the old DMA driver can be merged into the i.MX dmaengine driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/dma/Kconfig | 8 + drivers/dma/Makefile | 1 + drivers/dma/imx-dma.c | 426 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 435 insertions(+), 0 deletions(-) create mode 100644 drivers/dma/imx-dma.c diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 3cf1d12..e0e1f40 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -203,6 +203,14 @@ config IMX_SDMA Support the i.MX SDMA engine. This engine is integrated into Freescale i.MX25/31/35/51 chips. +config IMX_DMA + tristate "i.MX DMA support" + depends on ARCH_MX1 || ARCH_MX21 || MACH_MX27 + select DMA_ENGINE + help + Support the i.MX DMA engine. This engine is integrated into + Freescale i.MX1/21/27 chips. + config DMA_ENGINE bool diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index 14d7a1b..a65801c 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -26,3 +26,4 @@ obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o obj-$(CONFIG_PL330_DMA) += pl330.o obj-$(CONFIG_PCH_DMA) += pch_dma.o obj-$(CONFIG_IMX_SDMA) += imx-sdma.o +obj-$(CONFIG_IMX_DMA) += imx-dma.o diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c new file mode 100644 index 0000000..6ef82ba --- /dev/null +++ b/drivers/dma/imx-dma.c @@ -0,0 +1,426 @@ +/* + * drivers/dma/imx-dma.c + * + * This file contains a driver for the Freescale i.MX DMA engine + * found on i.MX1/21/27 + * + * Copyright 2010 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * ...
Hi Javier, This is by intention. I want to reserve 8 channels for the old driver and the remaining 8 for the dmaengine driver. This way we can have both in the tree and use both drivers parallel. This can be changed to the real value once the old driver is gone. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --
Seems like a nice path forward so FWIW Acked-by: Linus Walleij <linus.walleij@stericsson.com> Yours, Linus Walleij --
Why does the channel have a direction isn't that a function of the If you want to keep this I think it is better as a WARN(1, "%s 0x%08x\n", __func__, error) ...assuming that errors are rare. -- Dan --
Sorry, it seems I was a bit too fast posting it. I'll send an updated version. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --
This driver is currently implemented as a user to the old i.MX DMA API. This allows us to convert each user of the old API to the dmaengine API one by one. Once this is done the old DMA driver can be merged into the i.MX dmaengine driver. V2: remove some debug leftovers and unused variables Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@stericsson.com> --- drivers/dma/Kconfig | 8 + drivers/dma/Makefile | 1 + drivers/dma/imx-dma.c | 422 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 431 insertions(+), 0 deletions(-) create mode 100644 drivers/dma/imx-dma.c diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 3cf1d12..e0e1f40 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -203,6 +203,14 @@ config IMX_SDMA Support the i.MX SDMA engine. This engine is integrated into Freescale i.MX25/31/35/51 chips. +config IMX_DMA + tristate "i.MX DMA support" + depends on ARCH_MX1 || ARCH_MX21 || MACH_MX27 + select DMA_ENGINE + help + Support the i.MX DMA engine. This engine is integrated into + Freescale i.MX1/21/27 chips. + config DMA_ENGINE bool diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index 14d7a1b..a65801c 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -26,3 +26,4 @@ obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o obj-$(CONFIG_PL330_DMA) += pl330.o obj-$(CONFIG_PCH_DMA) += pch_dma.o obj-$(CONFIG_IMX_SDMA) += imx-sdma.o +obj-$(CONFIG_IMX_DMA) += imx-dma.o diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c new file mode 100644 index 0000000..346be62 --- /dev/null +++ b/drivers/dma/imx-dma.c @@ -0,0 +1,422 @@ +/* + * drivers/dma/imx-dma.c + * + * This file contains a driver for the Freescale i.MX DMA engine + * found on i.MX1/21/27 + * + * Copyright 2010 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> + * + * The code contained herein is licensed under the GNU General Public + * License. You ...
