From patchwork Wed Jun 25 00:41:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4415391 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 E1208BEEAA for ; Wed, 25 Jun 2014 00:39:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB6A52037A for ; Wed, 25 Jun 2014 00:39:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9C4320170 for ; Wed, 25 Jun 2014 00:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186AbaFYAjF (ORCPT ); Tue, 24 Jun 2014 20:39:05 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:47463 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbaFYAjF (ORCPT ); Tue, 24 Jun 2014 20:39:05 -0400 Received: by mail-pd0-f173.google.com with SMTP id r10so898983pdi.18 for ; Tue, 24 Jun 2014 17:39:04 -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=QmSX9k5jC+f0Ycn/LA7faTXXZ24i5AEK58sOiSTd3Mo=; b=Jv/Xbp+GjPGg2bHqx2DKZoyeX4h6vWbDm1Z3Ho3awWBLhoyDdi0TsI2I5T9FWU6wSN X+z6s0lHlsG0HEhT0fpSecElFO6CIQevtChlVmoPxg/8MzREP82FHf9C8E0EfXf1LZDZ lv5uRg/jfU88HhGhsO0v9jrSB7Hkda9RbfLDxI+HQRXqwuzGqcaiq55eZe6lV0RWYPFT YNEuUKJ9Z5WybH1k2mbyLyIyCTx5qtTW33p/E3btPtzniEyX2GW/vO7TF36drLGUgzS6 STULmUTzEF3IWmCFtcAgzFmK7QydtdjmO60M0a5zFii81bImzH9DjLNYbdv1XkiYU0uH 0MwQ== X-Received: by 10.67.15.40 with SMTP id fl8mr6293122pad.69.1403656743972; Tue, 24 Jun 2014 17:39:03 -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 g6sm8901524pat.2.2014.06.24.17.39.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jun 2014 17:39:02 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , geert+renesas@glider.be Date: Wed, 25 Jun 2014 09:41:10 +0900 Message-Id: <20140625004110.18295.98130.sendpatchset@w520> In-Reply-To: <20140625004027.18295.39707.sendpatchset@w520> References: <20140625004027.18295.39707.sendpatchset@w520> Subject: [PATCH 05/05] ARM: shmobile: Koelsch SYS-DMAC and MSIOF 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=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Enable DMA for MSIOF on r8a7791 Koelsch. Signed-off-by: Magnus Damm --- arch/arm/boot/dts/r8a7791.dtsi | 6 +++--- arch/arm/mach-shmobile/board-koelsch-reference.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) -- 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 --- 0001/arch/arm/boot/dts/r8a7791.dtsi +++ work/arch/arm/boot/dts/r8a7791.dtsi 2014-06-25 09:12:54.000000000 +0900 @@ -933,7 +933,7 @@ msiof0: spi@e6e20000 { compatible = "renesas,msiof-r8a7791"; - reg = <0 0xe6e20000 0 0x0064>; + reg = <0 0xe6e20000 0 0x0064>, <0 0xe7e20000 0 0x0064>; interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>; #address-cells = <1>; @@ -943,7 +943,7 @@ msiof1: spi@e6e10000 { compatible = "renesas,msiof-r8a7791"; - reg = <0 0xe6e10000 0 0x0064>; + reg = <0 0xe6e10000 0 0x0064>, <0 0xe7e10000 0 0x0064>; interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp2_clks R8A7791_CLK_MSIOF1>; #address-cells = <1>; @@ -953,7 +953,7 @@ msiof2: spi@e6e00000 { compatible = "renesas,msiof-r8a7791"; - reg = <0 0xe6e00000 0 0x0064>; + reg = <0 0xe6e00000 0 0x0064>, <0 0xe7e00000 0 0x0064>; interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp2_clks R8A7791_CLK_MSIOF2>; #address-cells = <1>; --- 0015/arch/arm/mach-shmobile/board-koelsch-reference.c +++ work/arch/arm/mach-shmobile/board-koelsch-reference.c 2014-06-25 09:13:44.000000000 +0900 @@ -72,6 +72,7 @@ static const struct resource du_resource #include #include #include +#include /* Local DMA slave IDs */ enum { @@ -118,6 +119,12 @@ enum { SYS_DMAC_SLAVE_HSCIF1_RX, SYS_DMAC_SLAVE_HSCIF2_TX, SYS_DMAC_SLAVE_HSCIF2_RX, + SYS_DMAC_SLAVE_MSIOF0_TX, + SYS_DMAC_SLAVE_MSIOF0_RX, + SYS_DMAC_SLAVE_MSIOF1_TX, + SYS_DMAC_SLAVE_MSIOF1_RX, + SYS_DMAC_SLAVE_MSIOF2_TX, + SYS_DMAC_SLAVE_MSIOF2_RX, }; #define DMAE_CHANNEL(a, b) \ @@ -172,6 +179,9 @@ static const struct sh_dmae_slave_config SYS_DMAC_SLAVE_TX(HSCIF0, 8, 0xe62c0000, 0xc, 0x14, 0x39, 0x3a), SYS_DMAC_SLAVE_TX(HSCIF1, 8, 0xe62c8000, 0xc, 0x14, 0x4d, 0x4e), SYS_DMAC_SLAVE_TX(HSCIF2, 8, 0xe62d0000, 0xc, 0x14, 0x3b, 0x3c), + SYS_DMAC_SLAVE(MSIOF0, 32, 0xe7e20000, 0x50, 0x60, 0x51, 0x52), + SYS_DMAC_SLAVE(MSIOF1, 32, 0xe7e10000, 0x50, 0x60, 0x55, 0x56), + SYS_DMAC_SLAVE(MSIOF2, 32, 0xe7e00000, 0x50, 0x60, 0x41, 0x42), }; static const struct sh_dmae_channel r8a7791_sys_dmac_channels[] = { @@ -312,6 +322,13 @@ PDATA_HSCIF(17, 0xe6cd0000, gic_spi(21), #define AUXDATA_SCIFB(index, baseaddr, irq) SCIF_AD("scifb", index, baseaddr) #define AUXDATA_HSCIF(index, baseaddr, irq) SCIF_AD("hscif", index, baseaddr) +static struct sh_msiof_spi_info msiof0_info = { + .rx_fifo_override = 256, + .num_chipselect = 1, + .dma_tx_id = SYS_DMAC_SLAVE_MSIOF0_TX, + .dma_rx_id = SYS_DMAC_SLAVE_MSIOF0_RX, +}; + static struct of_dev_auxdata koelsch_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("renesas,sdhi-r8a7791", 0xee100000, "sdhi0", &sdhi0_info), @@ -337,6 +354,8 @@ static struct of_dev_auxdata koelsch_aux AUXDATA_HSCIF(15, 0xe62c0000, gic_spi(154)), /* HSCIF0 */ AUXDATA_HSCIF(16, 0xe62c8000, gic_spi(155)), /* HSCIF1 */ AUXDATA_HSCIF(17, 0xe6cd0000, gic_spi(21)), /* HSCIF2 */ + OF_DEV_AUXDATA("renesas,msiof-r8a7791", 0xe6e20000, + "spi_r8a7791_msiof.0", &msiof0_info), {}, };