From patchwork Tue Jun 10 23:03:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4332551 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E5CA19F314 for ; Tue, 10 Jun 2014 23:01:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21FF32028D for ; Tue, 10 Jun 2014 23:01:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46AFD2012F for ; Tue, 10 Jun 2014 23:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948AbaFJXBs (ORCPT ); Tue, 10 Jun 2014 19:01:48 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:54052 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbaFJXBr (ORCPT ); Tue, 10 Jun 2014 19:01:47 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so6654327pbb.5 for ; Tue, 10 Jun 2014 16:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=iFi0ys2IlTAkOsbaVin8L2Ne44n5/sDLBhlh32nyNIA=; b=Fj98D5O1cGPTx/upCnt7QTjRTei0rueEBu4VsqbT/7JK/igdACXrZIeZY6a/nXPClb bC4W5qddZ89wA4Z4g5JFeKDbZuXkDNrsoII0GEXijUumgaNqJQT3Jep2qcA5SokXoJIg QM6LFODHWRzQmxXDHnVgQu5Hr+hDQYTVqHQ5+otYBu+uj7Ygy5dHJQgV8GyeMnBGV6// CMSKwLqIpjbm6gYYobBlaUAtiCgN2l2ZLaheVkid5n8LrykgB8cwigqwwv2WZMpWUMvi ubpQMQTOhm79HmrmATdeQyXu2N+n9tbksNT5SbY30recdsesA7MZDh/nxYXNpVIYJ48l 7+Vg== X-Received: by 10.68.219.162 with SMTP id pp2mr214572pbc.47.1402441307246; Tue, 10 Jun 2014 16:01:47 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id iq10sm71459008pbc.14.2014.06.10.16.01.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jun 2014 16:01:46 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm Date: Wed, 11 Jun 2014 08:03:52 +0900 Message-Id: <20140610230352.13594.34731.sendpatchset@w520> In-Reply-To: <20140610230314.13594.91830.sendpatchset@w520> References: <20140610230314.13594.91830.sendpatchset@w520> Subject: [PATCH 05/07] ARM: shmobile: Lager SYS-DMAC and SDHI prototype 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.4 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: Magnus Damm Hook up SYS-DMAC prototype support for SDHI on Lager. Local platform device version of SYS-DMAC and local slave IDs are used together with AUXDATA. CD and WP pins, regulators and clocks are provided via DT. Only the DT reference case is covered. Not for upstream merge. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-lager-reference.c | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0006/arch/arm/mach-shmobile/board-lager-reference.c +++ work/arch/arm/mach-shmobile/board-lager-reference.c 2014-06-10 22:00:10.000000000 +0900 @@ -74,6 +74,8 @@ static const struct resource du_resource #include #include #include +#include +#include /* Local DMA slave IDs */ enum { @@ -82,6 +84,10 @@ enum { SYS_DMAC_SLAVE_MMCIF0_RX, SYS_DMAC_SLAVE_MMCIF1_TX, SYS_DMAC_SLAVE_MMCIF1_RX, + SYS_DMAC_SLAVE_SDHI0_TX, + SYS_DMAC_SLAVE_SDHI0_RX, + SYS_DMAC_SLAVE_SDHI2_TX, + SYS_DMAC_SLAVE_SDHI2_RX, }; #define DMAE_CHANNEL(a, b) \ @@ -109,6 +115,8 @@ enum { static const struct sh_dmae_slave_config r8a7790_sys_dmac_slaves[] = { SYS_DMAC_SLAVE(MMCIF0, 32, 0xee200000, 0x34, 0x34, 0xd1, 0xd2), SYS_DMAC_SLAVE(MMCIF1, 32, 0xee220000, 0x34, 0x34, 0xe1, 0xe2), + SYS_DMAC_SLAVE(SDHI0, 16, 0xee100000, 0x60, 0x2060, 0xcd, 0xce), + SYS_DMAC_SLAVE(SDHI2, 16, 0xee140000, 0x30, 0x2030, 0xc1, 0xc2), }; static const struct sh_dmae_channel r8a7790_sys_dmac_channels[] = { @@ -178,9 +186,37 @@ static struct sh_mmcif_plat_data mmcif1_ .slave_id_rx = SYS_DMAC_SLAVE_MMCIF1_RX, }; +static struct sh_mobile_sdhi_info sdhi0_info __initdata = { + .dma_slave_tx = SYS_DMAC_SLAVE_SDHI0_TX, + .dma_slave_rx = SYS_DMAC_SLAVE_SDHI0_RX, + .dma_rx_offset = 0x2000, + + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | + TMIO_MMC_WRPROTECT_DISABLE, +}; + +static struct sh_mobile_sdhi_info sdhi2_info __initdata = { + .dma_slave_tx = SYS_DMAC_SLAVE_SDHI2_TX, + .dma_slave_rx = SYS_DMAC_SLAVE_SDHI2_RX, + .dma_rx_offset = 0x2000, + + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | + TMIO_MMC_WRPROTECT_DISABLE, +}; + static struct of_dev_auxdata lager_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("renesas,mmcif-r8a7790", 0xee220000, "sh_mmcif", &mmcif1_pdata), + OF_DEV_AUXDATA("renesas,sdhi-r8a7790", 0xee100000, "sdhi0", + &sdhi0_info), + OF_DEV_AUXDATA("renesas,sdhi-r8a7790", 0xee140000, "sdhi2", + &sdhi2_info), {}, };