Skip to content

Commit

Permalink
ARM: shmobile: r8a7778: add support HSPI driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Simon Horman committed Jun 11, 2013
1 parent 46b9a09 commit 8b89797
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/include/mach/r8a7778.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern void r8a7778_add_standard_devices(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_i2c_device(int id);
extern void r8a7778_add_hspi_device(int id);

extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq(void);
Expand Down
23 changes: 23 additions & 0 deletions arch/arm/mach-shmobile/setup-r8a7778.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,29 @@ void __init r8a7778_add_i2c_device(int id)
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)
{
int i;
Expand Down

0 comments on commit 8b89797

Please sign in to comment.