add dma device for mx50.
Signed-off-by: Huang Shijie <b32955@freescale.com>
imx50_add_cspi(3, &mx50_rdp_spi_pdata);
+ imx50_add_dma();
imx50_add_imx_uart(0, NULL);
imx50_add_imx_uart(1, NULL);
imx50_add_srtc();
_REGISTER_CLOCK(NULL, "dcp_clk", dcp_clk),
_REGISTER_CLOCK(NULL, "ocotp_ctrl_apb", ocotp_clk),
_REGISTER_CLOCK(NULL, "ocram_clk", ocram_clk),
- _REGISTER_CLOCK(NULL, "apbh_dma_clk", apbh_dma_clk),
+ _REGISTER_CLOCK("mxs-dma-apbh", NULL, apbh_dma_clk),
_REGISTER_CLOCK(NULL, "sys_clk", sys_clk),
_REGISTER_CLOCK(NULL, "elcdif_pix", elcdif_pix_clk),
_REGISTER_CLOCK(NULL, "display_axi", display_axi_clk),
#define imx50_add_srtc() \
imx_add_srtc(&imx50_imx_srtc_data)
+extern const struct imx_dma_data imx50_dma_data __initconst;
+#define imx50_add_dma() imx_add_dma(&imx50_dma_data);
+
extern const struct imx_fec_data imx50_fec_data;
#define imx50_add_fec(pdata) \
imx_add_fec(&imx50_fec_data, pdata)
+config IMX_HAVE_PLATFORM_DMA
+ bool
+
config IMX_HAVE_PLATFORM_FEC
bool
default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
+obj-$(CONFIG_IMX_HAVE_PLATFORM_DMA) += platform-dma.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o
--- /dev/null
+/*
+ * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/compiler.h>
+#include <linux/err.h>
+#include <linux/init.h>
+
+#include <mach/mx50.h>
+#include <mach/devices-common.h>
+
+#ifdef CONFIG_SOC_IMX50
+const struct imx_dma_data imx50_dma_data __initconst = {
+ .iobase = MX50_APBHDMA_BASE_ADDR,
+};
+#endif
+
+struct platform_device *__init imx_add_dma(
+ const struct imx_dma_data *data)
+{
+ struct resource res[] = {
+ {
+ .start = data->iobase,
+ .end = data->iobase + SZ_8K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ };
+
+ return imx_add_platform_device_dmamask("mxs-dma-apbh", -1,
+ res, ARRAY_SIZE(res), NULL, 0,
+ DMA_BIT_MASK(32));
+}
name, id, res, num_resources, data, size_data, 0);
}
+struct imx_dma_data {
+ resource_size_t iobase;
+};
+struct platform_device *__init imx_add_dma(const struct imx_dma_data *data);
+
#include <linux/fec.h>
struct imx_fec_data {
resource_size_t iobase;