aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/devices/amba-duart.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mxs/devices/amba-duart.c')
-rw-r--r--arch/arm/mach-mxs/devices/amba-duart.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c
new file mode 100644
index 00000000000..a559db09b49
--- /dev/null
+++ b/arch/arm/mach-mxs/devices/amba-duart.c
@@ -0,0 +1,40 @@
1/*
2 * Copyright (C) 2009-2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License version 2 as published by the
9 * Free Software Foundation.
10 */
11#include <asm/irq.h>
12#include <mach/mx23.h>
13#include <mach/mx28.h>
14#include <mach/devices-common.h>
15
16#define MXS_AMBA_DUART_DEVICE(name, soc) \
17const struct amba_device name##_device __initconst = { \
18 .dev = { \
19 .init_name = "duart", \
20 }, \
21 .res = { \
22 .start = soc ## _DUART_BASE_ADDR, \
23 .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \
24 .flags = IORESOURCE_MEM, \
25 }, \
26 .irq = {soc ## _INT_DUART, NO_IRQ}, \
27}
28
29#ifdef CONFIG_SOC_IMX23
30MXS_AMBA_DUART_DEVICE(mx23_duart, MX23);
31#endif
32
33#ifdef CONFIG_SOC_IMX28
34MXS_AMBA_DUART_DEVICE(mx28_duart, MX28);
35#endif
36
37int __init mxs_add_duart(const struct amba_device *dev)
38{
39 return mxs_add_amba_device(dev);
40}