From: Huang Shijie Date: Fri, 22 Jul 2011 02:28:03 +0000 (+0800) Subject: ENGR00139247-4 ARM: add APBH-DMA arch code for imx6q X-Git-Tag: v3.0.35-fsl_4.1.0~2338 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d1784b4e3ad44312137f90e08b376746c846169c;p=karo-tx-linux.git ENGR00139247-4 ARM: add APBH-DMA arch code for imx6q add the arch code for APBH-DMA. Signed-off-by: Huang Shijie --- diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c index 74aa0fb78c1d..1c192b7bee69 100644 --- a/arch/arm/mach-mx6/clock.c +++ b/arch/arm/mach-mx6/clock.c @@ -4052,7 +4052,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "hsi_tx", hsi_tx_clk), _REGISTER_CLOCK(NULL, "caam_clk", caam_clk[0]), _REGISTER_CLOCK(NULL, "asrc_clk", asrc_clk), - _REGISTER_CLOCK(NULL, "apbh_dma_clk", apbh_dma_clk), + _REGISTER_CLOCK("mxs-dma-apbh", NULL, apbh_dma_clk), _REGISTER_CLOCK(NULL, "openvg_axi_clk", openvg_axi_clk), _REGISTER_CLOCK(NULL, "gpu3d_clk", gpu3d_core_clk), _REGISTER_CLOCK(NULL, "gpu2d_clk", gpu2d_core_clk), diff --git a/arch/arm/mach-mx6/devices-imx6q.h b/arch/arm/mach-mx6/devices-imx6q.h index 94cfd0c7acdb..3f6a3e075b7a 100644 --- a/arch/arm/mach-mx6/devices-imx6q.h +++ b/arch/arm/mach-mx6/devices-imx6q.h @@ -32,6 +32,9 @@ imx6q_anatop_thermal_imx_data __initconst; #define imx6q_add_anatop_thermal_imx(id, pdata) \ imx_add_anatop_thermal_imx(&imx6q_anatop_thermal_imx_data, pdata) +extern const struct imx_dma_data imx6q_dma_data __initconst; +#define imx6q_add_dma() imx_add_dma(&imx6q_dma_data); + #define imx6q_add_gpmi(platform_data) imx_add_gpmi(platform_data); extern const struct imx_fec_data imx6q_fec_data __initconst; diff --git a/arch/arm/plat-mxc/devices/platform-dma.c b/arch/arm/plat-mxc/devices/platform-dma.c index 7a73c230fd44..b2cba3db6d6d 100644 --- a/arch/arm/plat-mxc/devices/platform-dma.c +++ b/arch/arm/plat-mxc/devices/platform-dma.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #ifdef CONFIG_SOC_IMX50 @@ -18,6 +18,12 @@ const struct imx_dma_data imx50_dma_data __initconst = { }; #endif +#ifdef CONFIG_SOC_IMX6Q +const struct imx_dma_data imx6q_dma_data __initconst = { + .iobase = APBH_DMA_ARB_BASE_ADDR, +}; +#endif + struct platform_device *__init imx_add_dma( const struct imx_dma_data *data) { diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h index ee137b4de1ff..04ab43d87d12 100644 --- a/arch/arm/plat-mxc/include/mach/dma.h +++ b/arch/arm/plat-mxc/include/mach/dma.h @@ -77,4 +77,19 @@ static inline int imx_dma_is_general_purpose(struct dma_chan *chan) !strcmp(dev_name(chan->device->dev), "imx-dma"); } +struct mxs_dma_data { + int chan_irq; +}; + +static inline int mxs_dma_is_apbh(struct dma_chan *chan) +{ + return !strcmp(dev_name(chan->device->dev), "mxs-dma-apbh"); +} + +static inline int mxs_dma_is_apbx(struct dma_chan *chan) +{ + return !strcmp(dev_name(chan->device->dev), "mxs-dma-apbx"); +} + + #endif