aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mxs/devices.c')
-rw-r--r--arch/arm/mach-mxs/devices.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c
index 6b60f02ca2e3..c20d54740b0b 100644
--- a/arch/arm/mach-mxs/devices.c
+++ b/arch/arm/mach-mxs/devices.c
@@ -19,9 +19,8 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/err.h>
23#include <linux/platform_device.h> 22#include <linux/platform_device.h>
24#include <mach/common.h> 23#include <linux/amba/bus.h>
25 24
26struct platform_device *__init mxs_add_platform_device_dmamask( 25struct platform_device *__init mxs_add_platform_device_dmamask(
27 const char *name, int id, 26 const char *name, int id,
@@ -73,3 +72,17 @@ err:
73 72
74 return pdev; 73 return pdev;
75} 74}
75
76int __init mxs_add_amba_device(const struct amba_device *dev)
77{
78 struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL);
79
80 if (!adev) {
81 pr_err("%s: failed to allocate memory", __func__);
82 return -ENOMEM;
83 }
84
85 *adev = *dev;
86
87 return amba_device_register(adev, &iomem_resource);
88}