summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxs
diff options
context:
space:
mode:
authorFred Fan <r01011@freescale.com>2010-01-29 18:22:10 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-25 11:13:35 +0200
commit341c797a60ccdba9d10a4efe96e296cd694798d4 (patch)
treef2d2b7125905a47a986ce3aa413ac113a8e7da78 /arch/arm/plat-mxs
parent390aa3317eab2dc7be39f70d6726e96ecf373683 (diff)
ENGR00120561-2 i.MX28 Application UART support
Platform driver support Signed-off-by: Fred.fan <r01011@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/plat-mxs')
-rw-r--r--arch/arm/plat-mxs/Kconfig79
-rw-r--r--arch/arm/plat-mxs/device.c67
-rw-r--r--arch/arm/plat-mxs/include/mach/device.h7
-rw-r--r--arch/arm/plat-mxs/include/mach/dmaengine.h2
4 files changed, 154 insertions, 1 deletions
diff --git a/arch/arm/plat-mxs/Kconfig b/arch/arm/plat-mxs/Kconfig
index 562f3dcae1da..6c02d308f173 100644
--- a/arch/arm/plat-mxs/Kconfig
+++ b/arch/arm/plat-mxs/Kconfig
@@ -11,6 +11,7 @@ config ARCH_MX28
select ZONE_DMA
select MXS_ICOLL
select MXS_DMA_ENGINE
+ select MXS_AUART_DMA_SUPPORT
---help---
Support Freescale MX28 chips
@@ -51,4 +52,82 @@ config MXS_LRADC
help
Enable LRADC support
+menu "Freescale Application UART:"
+
+config MXS_AUART_DMA_SUPPORT
+ bool
+ depends on MXS_DMA_ENGINE
+ default y
+
+config MXS_AUART_PORTS
+ int
+ default 5
+
+config MXS_AUART0_DEVICE_ENABLE
+ bool "Application uart 0 enabled"
+ default y
+ help
+ Enable applicatoin uart 0
+
+config MXS_AUART0_DMA_ENABLE
+ bool "Set application uart 0 to dma mode"
+ default n
+ depends on MXS_AUART_DMA_SUPPORT
+ help
+ Set application uart 0 to dma mode
+
+config MXS_AUART1_DEVICE_ENABLE
+ bool "Application uart 1 enabled"
+ default y
+ help
+ Enable applicatoin uart 1
+
+config MXS_AUART1_DMA_ENABLE
+ bool "Set application uart 1 to dma mode"
+ default n
+ depends on MXS_AUART_DMA_SUPPORT
+ help
+ Set application uart 1 to dma mode
+
+config MXS_AUART2_DEVICE_ENABLE
+ bool "Application uart 2 enabled"
+ default y
+ help
+ Enable applicatoin uart 2
+
+config MXS_AUART2_DMA_ENABLE
+ bool "Set application uart 2 to dma mode"
+ default n
+ depends on MXS_AUART_DMA_SUPPORT
+ help
+ Set application uart 2 to dma mode
+
+config MXS_AUART3_DEVICE_ENABLE
+ bool "Application uart 3 enabled"
+ default y
+ help
+ Enable applicatoin uart 3
+
+config MXS_AUART3_DMA_ENABLE
+ bool "Set application uart 3 to dma mode"
+ default n
+ depends on MXS_AUART_DMA_SUPPORT
+ help
+ Set application uart 3 to dma mode
+
+config MXS_AUART4_DEVICE_ENABLE
+ bool "Application uart 4 enabled"
+ default y
+ help
+ Enable applicatoin uart 4
+
+config MXS_AUART4_DMA_ENABLE
+ bool "Set application uart 4 to dma mode"
+ default n
+ depends on MXS_AUART_DMA_SUPPORT
+ help
+ Set application uart 4 to dma mode
+
+endmenu
+
endif
diff --git a/arch/arm/plat-mxs/device.c b/arch/arm/plat-mxs/device.c
index a24862b12af8..165d3e0ad462 100644
--- a/arch/arm/plat-mxs/device.c
+++ b/arch/arm/plat-mxs/device.c
@@ -248,6 +248,66 @@ static struct platform_device mxs_ts = {
};
#endif
+#if defined(CONFIG_SERIAL_MXS_AUART) || defined(CONFIG_SERIAL_MXS_AUART_MODULE)
+static struct platform_device mxs_auart[] = {
+#ifdef CONFIG_MXS_AUART0_DEVICE_ENABLE
+ {
+ .name = "mxs-auart",
+ .id = 0,
+ .dev = {
+ .release = mxs_nop_release,
+ .dma_mask = &common_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ },
+#endif
+#ifdef CONFIG_MXS_AUART1_DEVICE_ENABLE
+ {
+ .name = "mxs-auart",
+ .id = 1,
+ .dev = {
+ .release = mxs_nop_release,
+ .dma_mask = &common_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ },
+#endif
+#ifdef CONFIG_MXS_AUART2_DEVICE_ENABLE
+ {
+ .name = "mxs-auart",
+ .id = 2,
+ .dev = {
+ .release = mxs_nop_release,
+ .dma_mask = &common_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ },
+#endif
+#ifdef CONFIG_MXS_AUART3_DEVICE_ENABLE
+ {
+ .name = "mxs-auart",
+ .id = 3,
+ .dev = {
+ .release = mxs_nop_release,
+ .dma_mask = &common_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ },
+#endif
+#ifdef CONFIG_MXS_AUART4_DEVICE_ENABLE
+ {
+ .name = "mxs-auart",
+ .id = 4,
+ .dev = {
+ .release = mxs_nop_release,
+ .dma_mask = &common_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ },
+#endif
+};
+#endif
+
static struct mxs_dev_lookup dev_lookup[] = {
#if defined(CONFIG_SERIAL_MXS_DUART) || \
defined(CONFIG_SERIAL_MXS_DUART_MODULE)
@@ -346,6 +406,13 @@ static struct mxs_dev_lookup dev_lookup[] = {
},
#endif
+#if defined(CONFIG_SERIAL_MXS_AUART) || defined(CONFIG_SERIAL_MXS_AUART_MODULE)
+ {
+ .name = "mxs-auart",
+ .size = ARRAY_SIZE(mxs_auart),
+ .pdev = mxs_auart,
+ },
+#endif
};
struct platform_device *mxs_get_device(char *name, int id)
diff --git a/arch/arm/plat-mxs/include/mach/device.h b/arch/arm/plat-mxs/include/mach/device.h
index 40a5a5c0a037..a8b59a3a6c81 100644
--- a/arch/arm/plat-mxs/include/mach/device.h
+++ b/arch/arm/plat-mxs/include/mach/device.h
@@ -87,6 +87,13 @@ struct mxs_touchscreen_plat_data {
unsigned int y_minus_mask;
};
+struct mxs_auart_plat_data {
+ unsigned int fifo_size:6;
+ unsigned int dma_mode:1;
+ unsigned int timeout;
+ const char *clk;
+};
+
extern void mxs_timer_init(struct mxs_sys_timer *timer);
extern void mxs_nop_release(struct device *dev);
diff --git a/arch/arm/plat-mxs/include/mach/dmaengine.h b/arch/arm/plat-mxs/include/mach/dmaengine.h
index 7d7ab696f32f..2771aca50e17 100644
--- a/arch/arm/plat-mxs/include/mach/dmaengine.h
+++ b/arch/arm/plat-mxs/include/mach/dmaengine.h
@@ -53,7 +53,7 @@ struct mxs_dma_cmd {
struct mxs_dma_cmd_bits bits;
} cmd;
union {
- unsigned long address;
+ dma_addr_t address;
unsigned long alternate;
};
unsigned long pio_words[DMA_PIO_WORDS];