summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/devices-mx23.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-04-03 12:11:50 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-04-19 19:31:33 +0100
commit5002484b8ac93e8d32ca75e8a7504dbb9f7926fe (patch)
tree8a6a52698ba7d1df5138195b38039370590acb65 /arch/arm/mach-mxs/devices-mx23.h
parent6026aa907b16677d32593c5b7dea134380f51f7f (diff)
downloadop-kernel-dev-5002484b8ac93e8d32ca75e8a7504dbb9f7926fe.zip
op-kernel-dev-5002484b8ac93e8d32ca75e8a7504dbb9f7926fe.tar.gz
ARM: 7370/2: mxs: factor out dynamic amba device allocator
Replace the local amba device allocator with the core code from the bus driver. Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-mxs/devices-mx23.h')
-rw-r--r--arch/arm/mach-mxs/devices-mx23.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h
index 4d1329d..9acdd63 100644
--- a/arch/arm/mach-mxs/devices-mx23.h
+++ b/arch/arm/mach-mxs/devices-mx23.h
@@ -11,10 +11,16 @@
#include <mach/mx23.h>
#include <mach/devices-common.h>
#include <mach/mxsfb.h>
+#include <linux/amba/bus.h>
-extern const struct amba_device mx23_duart_device __initconst;
-#define mx23_add_duart() \
- mxs_add_duart(&mx23_duart_device)
+static inline int mx23_add_duart(void)
+{
+ struct amba_device *d;
+
+ d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K,
+ MX23_INT_DUART, 0, 0, 0);
+ return IS_ERR(d) ? PTR_ERR(d) : 0;
+}
extern const struct mxs_auart_data mx23_auart_data[] __initconst;
#define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id])
OpenPOWER on IntegriCloud