summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7778.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-14 18:00:00 -0700
committerOlof Johansson <olof@lixom.net>2013-06-14 18:00:00 -0700
commit677b5c48bd524b40120269d973d0633d0d22ee90 (patch)
treefa087d463fafcf2419f6e96fc666a7819cc8a1bb /arch/arm/mach-shmobile/setup-r8a7778.c
parenta1149269646ae95c3985f5cf1c8a15b97bb30d8a (diff)
parent018222f5d32bc5ca9fd830aebfeed10f1be96c93 (diff)
downloadop-kernel-dev-677b5c48bd524b40120269d973d0633d0d22ee90.zip
op-kernel-dev-677b5c48bd524b40120269d973d0633d0d22ee90.tar.gz
Merge tag 'renesas-soc2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
From Simon Horman: Second Round of Renesas ARM-based SoC updates for v3.11 * Ether device name updates for r8a7778 and r8a7779 Sergei Shtylyov * Extended clock and driver coverage for r8a7778 by Goda-san and Morimoto-san * Extended clock and coverage for r8a73a4 and r8a7790 by Guennadi Liakhovetski * HSCIF support for r8a7790 by Ulrich Hecht * tag 'renesas-soc2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: r8a7790: add clock definitions and aliases for MMCIF and SDHI ARM: shmobile: r8a73a4: add clock definitions and aliases for MMCIF and SDHI ARM: shmobile: r8a7778: add support MMC driver ARM: shmobile: r8a7778: add support HSPI driver ARM: shmobile: r8a7778: add support I2C driver ARM: shmobile: r8a7778: add support MMC clock ARM: shmobile: r8a7778: add support HSPI clock ARM: shmobile: r8a7778: add support I2C clock ARM: shmobile: r8a7790: HSCIF support ARM: shmobile: r8a7778: fix Ether device name ARM: shmobile: r8a7779: fix Ether device name Signed-off-by: Olof Johansson <olof@lixom.net> Conflicts: arch/arm/mach-shmobile/clock-r8a7778.c arch/arm/mach-shmobile/include/mach/r8a7778.h
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7778.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c63
1 files changed, 62 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index f84885a..80c2039 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -196,7 +196,7 @@ static struct resource ether_resources[] = {
void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
{
- platform_device_register_resndata(&platform_bus, "sh_eth", -1,
+ platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
ether_resources,
ARRAY_SIZE(ether_resources),
pdata, sizeof(*pdata));
@@ -272,6 +272,67 @@ void __init r8a7778_sdhi_init(int id,
info, sizeof(*info));
}
+/* I2C */
+static struct resource i2c_resources[] __initdata = {
+ /* I2C0 */
+ DEFINE_RES_MEM(0xffc70000, 0x1000),
+ DEFINE_RES_IRQ(gic_iid(0x63)),
+ /* I2C1 */
+ DEFINE_RES_MEM(0xffc71000, 0x1000),
+ DEFINE_RES_IRQ(gic_iid(0x6e)),
+ /* I2C2 */
+ DEFINE_RES_MEM(0xffc72000, 0x1000),
+ DEFINE_RES_IRQ(gic_iid(0x6c)),
+ /* I2C3 */
+ DEFINE_RES_MEM(0xffc73000, 0x1000),
+ DEFINE_RES_IRQ(gic_iid(0x6d)),
+};
+
+void __init r8a7778_add_i2c_device(int id)
+{
+ BUG_ON(id < 0 || id > 3);
+
+ platform_device_register_simple(
+ "i2c-rcar", 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);
+}
+
+/* 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)
{
int i;
OpenPOWER on IntegriCloud