diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-06-04 01:12:08 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-11 04:32:24 -0400 |
commit | 8b89797f3273e6e1574e1727f73dc8ac7d5f5a9c (patch) | |
tree | 8d1b8c51938911e5ca7f287c2081972a0bcd5586 | |
parent | 46b9a092dacea4f30dbdfc58ca2c1ac4e97f6255 (diff) |
ARM: shmobile: r8a7778: add support HSPI driver
Add a platform device for the r8a7778 HSPI.
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7778.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 9e5835b326e8..af668c47a3d9 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -25,6 +25,7 @@ extern void r8a7778_add_standard_devices(void); | |||
25 | extern void r8a7778_add_standard_devices_dt(void); | 25 | extern void r8a7778_add_standard_devices_dt(void); |
26 | extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); | 26 | extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); |
27 | extern void r8a7778_add_i2c_device(int id); | 27 | extern void r8a7778_add_i2c_device(int id); |
28 | extern void r8a7778_add_hspi_device(int id); | ||
28 | 29 | ||
29 | extern void r8a7778_init_delay(void); | 30 | extern void r8a7778_init_delay(void); |
30 | extern void r8a7778_init_irq(void); | 31 | extern void r8a7778_init_irq(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 6625a386abaf..a1e693005370 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -151,6 +151,29 @@ void __init r8a7778_add_i2c_device(int id) | |||
151 | i2c_resources + (2 * id), 2); | 151 | i2c_resources + (2 * id), 2); |
152 | } | 152 | } |
153 | 153 | ||
154 | /* HSPI */ | ||
155 | static struct resource hspi_resources[] __initdata = { | ||
156 | /* HSPI0 */ | ||
157 | DEFINE_RES_MEM(0xfffc7000, 0x18), | ||
158 | DEFINE_RES_IRQ(gic_iid(0x5f)), | ||
159 | /* HSPI1 */ | ||
160 | DEFINE_RES_MEM(0xfffc8000, 0x18), | ||
161 | DEFINE_RES_IRQ(gic_iid(0x74)), | ||
162 | /* HSPI2 */ | ||
163 | DEFINE_RES_MEM(0xfffc6000, 0x18), | ||
164 | DEFINE_RES_IRQ(gic_iid(0x75)), | ||
165 | }; | ||
166 | |||
167 | void __init r8a7778_add_hspi_device(int id) | ||
168 | { | ||
169 | BUG_ON(id < 0 || id > 2); | ||
170 | |||
171 | platform_device_register_simple( | ||
172 | "sh-hspi", id, | ||
173 | hspi_resources + (2 * id), 2); | ||
174 | } | ||
175 | |||
176 | |||
154 | void __init r8a7778_add_standard_devices(void) | 177 | void __init r8a7778_add_standard_devices(void) |
155 | { | 178 | { |
156 | int i; | 179 | int i; |