diff options
Diffstat (limited to 'arch/arm/mach-ux500/devices-common.h')
-rw-r--r-- | arch/arm/mach-ux500/devices-common.h | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index f8adff891a91..39c74ec82add 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -8,14 +8,15 @@ | |||
8 | #ifndef __DEVICES_COMMON_H | 8 | #ifndef __DEVICES_COMMON_H |
9 | #define __DEVICES_COMMON_H | 9 | #define __DEVICES_COMMON_H |
10 | 10 | ||
11 | extern struct amba_device * | 11 | #include <linux/platform_device.h> |
12 | dbx500_add_amba_device(struct device *parent, const char *name, resource_size_t base, | 12 | #include <linux/dma-mapping.h> |
13 | int irq, void *pdata, unsigned int periphid); | 13 | #include <linux/sys_soc.h> |
14 | #include <plat/i2c.h> | ||
14 | 15 | ||
15 | extern struct platform_device * | 16 | extern struct amba_device * |
16 | dbx500_add_platform_device_4k1irq(const char *name, int id, | 17 | dbx500_add_amba_device(struct device *parent, const char *name, |
17 | resource_size_t base, | 18 | resource_size_t base, int irq, void *pdata, |
18 | int irq, void *pdata); | 19 | unsigned int periphid); |
19 | 20 | ||
20 | struct spi_master_cntlr; | 21 | struct spi_master_cntlr; |
21 | 22 | ||
@@ -60,20 +61,25 @@ struct nmk_i2c_controller; | |||
60 | 61 | ||
61 | static inline struct platform_device * | 62 | static inline struct platform_device * |
62 | dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, | 63 | dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, |
63 | struct nmk_i2c_controller *pdata) | 64 | struct nmk_i2c_controller *data) |
64 | { | ||
65 | return dbx500_add_platform_device_4k1irq("nmk-i2c", id, base, irq, | ||
66 | pdata); | ||
67 | } | ||
68 | |||
69 | struct msp_i2s_platform_data; | ||
70 | |||
71 | static inline struct platform_device * | ||
72 | dbx500_add_msp_i2s(int id, resource_size_t base, int irq, | ||
73 | struct msp_i2s_platform_data *pdata) | ||
74 | { | 65 | { |
75 | return dbx500_add_platform_device_4k1irq("MSP_I2S", id, base, irq, | 66 | struct resource res[] = { |
76 | pdata); | 67 | DEFINE_RES_MEM(base, SZ_4K), |
68 | DEFINE_RES_IRQ(irq), | ||
69 | }; | ||
70 | |||
71 | struct platform_device_info pdevinfo = { | ||
72 | .parent = parent, | ||
73 | .name = "nmk-i2c", | ||
74 | .id = id, | ||
75 | .res = res, | ||
76 | .num_res = ARRAY_SIZE(res), | ||
77 | .data = data, | ||
78 | .size_data = sizeof(*data), | ||
79 | .dma_mask = DMA_BIT_MASK(32), | ||
80 | }; | ||
81 | |||
82 | return platform_device_register_full(&pdevinfo); | ||
77 | } | 83 | } |
78 | 84 | ||
79 | static inline struct amba_device * | 85 | static inline struct amba_device * |