Commit 8b89797f authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Simon Horman

ARM: shmobile: r8a7778: add support HSPI driver

Add a platform device for the r8a7778 HSPI.
Signed-off-by: default avatarYusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 46b9a092
...@@ -25,6 +25,7 @@ extern void r8a7778_add_standard_devices(void); ...@@ -25,6 +25,7 @@ extern void r8a7778_add_standard_devices(void);
extern void r8a7778_add_standard_devices_dt(void); extern void r8a7778_add_standard_devices_dt(void);
extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
extern void r8a7778_add_i2c_device(int id); extern void r8a7778_add_i2c_device(int id);
extern void r8a7778_add_hspi_device(int id);
extern void r8a7778_init_delay(void); extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq(void); extern void r8a7778_init_irq(void);
......
...@@ -151,6 +151,29 @@ void __init r8a7778_add_i2c_device(int id) ...@@ -151,6 +151,29 @@ void __init r8a7778_add_i2c_device(int id)
i2c_resources + (2 * id), 2); i2c_resources + (2 * id), 2);
} }
/* HSPI */
static struct resource hspi_resources[] __initdata = {
/* HSPI0 */
DEFINE_RES_MEM(0xfffc7000, 0x18),
DEFINE_RES_IRQ(gic_iid(0x5f)),
/* HSPI1 */
DEFINE_RES_MEM(0xfffc8000, 0x18),
DEFINE_RES_IRQ(gic_iid(0x74)),
/* HSPI2 */
DEFINE_RES_MEM(0xfffc6000, 0x18),
DEFINE_RES_IRQ(gic_iid(0x75)),
};
void __init r8a7778_add_hspi_device(int id)
{
BUG_ON(id < 0 || id > 2);
platform_device_register_simple(
"sh-hspi", id,
hspi_resources + (2 * id), 2);
}
void __init r8a7778_add_standard_devices(void) void __init r8a7778_add_standard_devices(void)
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment