diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-04-16 22:17:25 -0700 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-07 14:24:48 +0900 |
commit | dab581139c475719caa29356727b930c0245e2af (patch) | |
tree | 7e06303d2548ce50de8bbb4b1228935759e63019 /arch/arm/mach-shmobile/setup-r8a7778.c | |
parent | 1189b1cb50a0f9e039594ccd504f7de641e30bdf (diff) | |
download | op-kernel-dev-dab581139c475719caa29356727b930c0245e2af.zip op-kernel-dev-dab581139c475719caa29356727b930c0245e2af.tar.gz |
ARM: shmobile: r8a7778: Register SDHI device
This patch adds SDHI register function which needs id number (= 0/1/2)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7778.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index d6ee521..f5b2a57 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -102,6 +102,30 @@ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) pdata, sizeof(*pdata)); } +/* SDHI */ +static struct resource sdhi_resources[] = { + /* SDHI0 */ + DEFINE_RES_MEM(0xFFE4C000, 0x100), + DEFINE_RES_IRQ(gic_iid(0x77)), + /* SDHI1 */ + DEFINE_RES_MEM(0xFFE4D000, 0x100), + DEFINE_RES_IRQ(gic_iid(0x78)), + /* SDHI2 */ + DEFINE_RES_MEM(0xFFE4F000, 0x100), + DEFINE_RES_IRQ(gic_iid(0x76)), +}; + +void __init r8a7778_sdhi_init(int id, + struct sh_mobile_sdhi_info *info) +{ + BUG_ON(id < 0 || id > 2); + + platform_device_register_resndata( + &platform_bus, "sh_mobile_sdhi", id, + sdhi_resources + (2 * id), 2, + info, sizeof(*info)); +} + void __init r8a7778_add_standard_devices(void) { int i; |