From patchwork Mon Dec 16 04:50:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3351951 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3DA9AC0D4A for ; Mon, 16 Dec 2013 04:50:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F2C220379 for ; Mon, 16 Dec 2013 04:50:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F8872034D for ; Mon, 16 Dec 2013 04:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752476Ab3LPEuU (ORCPT ); Sun, 15 Dec 2013 23:50:20 -0500 Received: from mail-pb0-f47.google.com ([209.85.160.47]:35339 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240Ab3LPEuT (ORCPT ); Sun, 15 Dec 2013 23:50:19 -0500 Received: by mail-pb0-f47.google.com with SMTP id um1so4943788pbc.34 for ; Sun, 15 Dec 2013 20:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:cc:in-reply-to:references:from:subject :user-agent:mime-version:content-type; bh=2HK9nUzthAPVEn7wdIrsGJhVkRUHXKMLv1srXbGiDac=; b=XISXYpO87v5AZXw5Kx323Wr9xWEtQILVNGtR5Y9sr12d3Ri2N9WOsr6lqY3hXJ6kx5 uPIqgqIrC/NoMGDEOLzObVp4aNBLl2nYa/tdkUX7CzNuHdxW4M6B8QM2L49CsOO7RT1r 5f017DYY7ONaF4Cavl4XtuYlqsIRfW7uuWvKTWeMyVLmjW0awVdw48Y/Fex/WGDSHVi3 81pop2ougeGnv4AmCPiC0yEYKkS3uQJAnYKmhRab2Fu29203FdpjwPLLtM0FbL4ApEQR rsoOMHJcPpMFZ9W9fPlx9wGQBe+laZvopNlf89QCtrKQZnwJA34O5Ns2W64ftvtv4iLx HXUw== X-Received: by 10.66.149.231 with SMTP id ud7mr18239309pab.8.1387169419267; Sun, 15 Dec 2013 20:50:19 -0800 (PST) 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 bh6sm31540214pad.20.2013.12.15.20.50.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 15 Dec 2013 20:50:18 -0800 (PST) Date: Sun, 15 Dec 2013 20:50:18 -0800 (PST) Message-ID: <874n691jso.wl%kuninori.morimoto.gx@gmail.com> To: Simon Cc: Ben Dooks , Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto In-Reply-To: <87a9g11jxt.wl%kuninori.morimoto.gx@gmail.com> References: <87a9g11jxt.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 4/6][RFC] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7790 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 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto This patch updates r8a7790 DT data to have SoC specific settings. Latest Renesas Chip has some SDHI channels and the WP pin availability depends on its channel or HW implementation. Thus, this patch disables it as default, but we can use wp-gpios property to enable it. Signed-off-by: Kuninori Morimoto --- arch/arm/boot/dts/r8a7790.dtsi | 4 ---- drivers/mmc/host/sh_mobile_sdhi.c | 10 +++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 68b7b87..7ac2c9a 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -257,7 +257,6 @@ reg = <0 0xee100000 0 0x100>; interrupt-parent = <&gic>; interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; - cap-sd-highspeed; status = "disabled"; }; @@ -266,7 +265,6 @@ reg = <0 0xee120000 0 0x100>; interrupt-parent = <&gic>; interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; - cap-sd-highspeed; status = "disabled"; }; @@ -275,7 +273,6 @@ reg = <0 0xee140000 0 0x100>; interrupt-parent = <&gic>; interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; - cap-sd-highspeed; status = "disabled"; }; @@ -284,7 +281,6 @@ reg = <0 0xee160000 0 0x100>; interrupt-parent = <&gic>; interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; - cap-sd-highspeed; status = "disabled"; }; }; diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 322cd35..7498f5b 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -38,6 +38,7 @@ struct sh_mobile_sdhi_of_data { unsigned long tmio_flags; unsigned long capabilities; + unsigned long capabilities2; }; static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = { @@ -51,6 +52,12 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen1_compatible = { .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, }; +static const struct sh_mobile_sdhi_of_data of_rcar_gen2_compatible = { + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, + .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, + .capabilities2 = MMC_CAP2_NO_MULTI_READ, +}; + static const struct of_device_id sh_mobile_sdhi_of_match[] = { { .compatible = "renesas,sdhi-shmobile" }, { .compatible = "renesas,sdhi-sh7372" }, @@ -59,7 +66,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = { { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, }, { .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, }, - { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], }, + { .compatible = "renesas,sdhi-r8a7790", .data = &of_rcar_gen2_compatible, }, {}, }; MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match); @@ -219,6 +226,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) const struct sh_mobile_sdhi_of_data *of_data = of_id->data; mmc_data->flags |= of_data->tmio_flags; mmc_data->capabilities |= of_data->capabilities; + mmc_data->capabilities2 |= of_data->capabilities2; } /* SD control register space size is 0x100, 0x200 for bus_shift=1 */