diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-04-03 12:11:50 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-04-19 19:31:33 +0100 |
commit | 5002484b8ac93e8d32ca75e8a7504dbb9f7926fe (patch) | |
tree | 8a6a52698ba7d1df5138195b38039370590acb65 /arch/arm/mach-mxs/devices-mx28.h | |
parent | 6026aa907b16677d32593c5b7dea134380f51f7f (diff) |
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-mx28.h')
-rw-r--r-- | arch/arm/mach-mxs/devices-mx28.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9dbeae130842..84b2960df117 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h @@ -11,10 +11,16 @@ #include <mach/mx28.h> #include <mach/devices-common.h> #include <mach/mxsfb.h> +#include <linux/amba/bus.h> -extern const struct amba_device mx28_duart_device __initconst; -#define mx28_add_duart() \ - mxs_add_duart(&mx28_duart_device) +static inline int mx28_add_duart(void) +{ + struct amba_device *d; + + d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K, + MX28_INT_DUART, 0, 0, 0); + return IS_ERR(d) ? PTR_ERR(d) : 0; +} extern const struct mxs_auart_data mx28_auart_data[] __initconst; #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) |