aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/devices-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/devices-common.h')
-rw-r--r--arch/arm/mach-ux500/devices-common.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h
index 7cbccfd9e158..6e4706560266 100644
--- a/arch/arm/mach-ux500/devices-common.h
+++ b/arch/arm/mach-ux500/devices-common.h
@@ -13,6 +13,7 @@
13#include <linux/sys_soc.h> 13#include <linux/sys_soc.h>
14#include <linux/amba/bus.h> 14#include <linux/amba/bus.h>
15#include <plat/i2c.h> 15#include <plat/i2c.h>
16#include <mach/crypto-ux500.h>
16 17
17struct spi_master_cntlr; 18struct spi_master_cntlr;
18 19
@@ -85,6 +86,55 @@ dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
85 0, NULL, 0); 86 0, NULL, 0);
86} 87}
87 88
89struct cryp_platform_data;
90
91static inline struct platform_device *
92dbx500_add_cryp1(struct device *parent, int id, resource_size_t base, int irq,
93 struct cryp_platform_data *pdata)
94{
95 struct resource res[] = {
96 DEFINE_RES_MEM(base, SZ_4K),
97 DEFINE_RES_IRQ(irq),
98 };
99
100 struct platform_device_info pdevinfo = {
101 .parent = parent,
102 .name = "cryp1",
103 .id = id,
104 .res = res,
105 .num_res = ARRAY_SIZE(res),
106 .data = pdata,
107 .size_data = sizeof(*pdata),
108 .dma_mask = DMA_BIT_MASK(32),
109 };
110
111 return platform_device_register_full(&pdevinfo);
112}
113
114struct hash_platform_data;
115
116static inline struct platform_device *
117dbx500_add_hash1(struct device *parent, int id, resource_size_t base,
118 struct hash_platform_data *pdata)
119{
120 struct resource res[] = {
121 DEFINE_RES_MEM(base, SZ_4K),
122 };
123
124 struct platform_device_info pdevinfo = {
125 .parent = parent,
126 .name = "hash1",
127 .id = id,
128 .res = res,
129 .num_res = ARRAY_SIZE(res),
130 .data = pdata,
131 .size_data = sizeof(*pdata),
132 .dma_mask = DMA_BIT_MASK(32),
133 };
134
135 return platform_device_register_full(&pdevinfo);
136}
137
88struct nmk_gpio_platform_data; 138struct nmk_gpio_platform_data;
89 139
90void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, 140void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,