From patchwork Tue Jun 4 05:12:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2656791 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7852DDF2A1 for ; Tue, 4 Jun 2013 05:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754145Ab3FDFMY (ORCPT ); Tue, 4 Jun 2013 01:12:24 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:55081 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026Ab3FDFMX (ORCPT ); Tue, 4 Jun 2013 01:12:23 -0400 Received: by mail-pa0-f41.google.com with SMTP id tj12so131240pac.0 for ; Mon, 03 Jun 2013 22:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:to:cc:in-reply-to:references:from:subject :user-agent:mime-version:content-type; bh=iI9E4JY7QKsvvS9ta206RhsHr4Ut5uBePrsAyN+yEKQ=; b=QPPWLJrqDRvXP1iga0yDRo5cIdbYRF3M2zslDZojwIrJ/Ys/dHYEiD39u7hlY68jEm 8qhg8yXgY2GxJvpQMGaCuLYqJVF1bvd2guOsmqP9d0mNfhJH+EcL6aWUegOJm/bG5wv1 xo86+0LOaTad5K8EdO/vIWdHejnDGKutv8QhZbZSXOm5FM1ahgvdORgEdvbsczyaa2A7 DH9L8wW3SUiwfC0gZqFqt9XGl8YzSqgy5HPn9/n3tFVaQaT/QRC6Tw7QPumQUzXcvk7n kHCUq65LWMIGsIwZ+Wlh8XjF+JIPLtra12D4D3YOoQx3zLc3Bj8uspUK5bsJmNUiDisA eVjw== X-Received: by 10.68.202.99 with SMTP id kh3mr26454278pbc.74.1370322743136; Mon, 03 Jun 2013 22:12:23 -0700 (PDT) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id fn9sm65935650pab.2.2013.06.03.22.12.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Jun 2013 22:12:22 -0700 (PDT) Date: Mon, 03 Jun 2013 22:12:22 -0700 (PDT) Message-ID: <871u8i5uj1.wl%kuninori.morimoto.gx@renesas.com> To: Simon Cc: Magnus , Linux-SH , Kuninori Morimoto , (RSO) goda In-Reply-To: <87a9n65uti.wl%kuninori.morimoto.gx@renesas.com> References: <87li7fwgk8.wl%kuninori.morimoto.gx@renesas.com> <87a9n65uti.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 6/6 v4] ARM: shmobile: r8a7778: add support MMC driver User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Add a platform device for the r8a7778 MMC. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto --- v3 -> v4 - separated into "driver" support arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++ arch/arm/mach-shmobile/setup-r8a7778.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index ca8bc14..fcf3c90 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -18,6 +18,7 @@ #ifndef __ASM_R8A7778_H__ #define __ASM_R8A7778_H__ +#include #include #include @@ -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); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index fdc483d..17bc1d2 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -220,6 +220,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) {