]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-mxs/devices-mx23.h
Merge branch 'regulator-drivers' into regulator-next
[~andy/linux] / arch / arm / mach-mxs / devices-mx23.h
index 4d1329d59287f543a845f453aac239c0bfc1875a..9acdd6387047dd89663b90ab1cb80cca3245260d 100644 (file)
 #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])