Skip to content

Commit

Permalink
ARM: shmobile: r8a7778: add support MMC driver
Browse files Browse the repository at this point in the history
Add a platform device for the r8a7778 MMC.

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 8b89797 commit 31b2eac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-shmobile/include/mach/r8a7778.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef __ASM_R8A7778_H__
#define __ASM_R8A7778_H__

#include <linux/mmc/sh_mmcif.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/sh_eth.h>

Expand All @@ -26,6 +27,7 @@ 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_add_mmc_device(struct sh_mmcif_plat_data *info);

extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq(void);
Expand Down
13 changes: 13 additions & 0 deletions arch/arm/mach-shmobile/setup-r8a7778.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ void __init r8a7778_add_hspi_device(int id)
hspi_resources + (2 * id), 2);
}

/* MMC */
static struct resource mmc_resources[] __initdata = {
DEFINE_RES_MEM(0xffe4e000, 0x100),
DEFINE_RES_IRQ(gic_iid(0x5d)),
};

void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info)
{
platform_device_register_resndata(
&platform_bus, "sh_mmcif", -1,
mmc_resources, ARRAY_SIZE(mmc_resources),
info, sizeof(*info));
}

void __init r8a7778_add_standard_devices(void)
{
Expand Down

0 comments on commit 31b2eac

Please sign in to comment.