From patchwork Wed Dec 11 00:51:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3321631 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 B5B07C0D4A for ; Wed, 11 Dec 2013 00:51:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF9A82018E for ; Wed, 11 Dec 2013 00:51:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EA0120144 for ; Wed, 11 Dec 2013 00:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417Ab3LKAvf (ORCPT ); Tue, 10 Dec 2013 19:51:35 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:50223 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352Ab3LKAvF (ORCPT ); Tue, 10 Dec 2013 19:51:05 -0500 Received: by mail-pb0-f44.google.com with SMTP id rq2so8812862pbb.31 for ; Tue, 10 Dec 2013 16:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:mime-version:to:cc :content-type; bh=4odhpUe5I21FP/ezrHgCNCnUNBo2gLoD2+1NGJvXvUg=; b=HhfXyj/QYbzh470IAHdws8yYGhBK+gGf+yI/kCDT7Sjm+8UKZQ1QMP3gAcUuFZzk5G AdU9BplSj4PCP8usicOCK8NtGR3I+x080THRMgzOB1DUIC8nf/DykqOY3FIFnlrIEJSo 0tl6YRrJe4ple2fRZClTRP7v6j/kf/ZOeerM4kEpBBwr5VDIIpGLo7Aj7nHJ7Pzt2bGg sc0vwuQ4npYzVWaI0RzNEnjQpgtFhNoYTtnO7sm24nYXfvtZdL05B4JwYNunRhPZOKdO O2ij4GGg6dXZpnofJN6cz6d+/gF9bK31gnV5EP86oZMD7EbkpOAGpt8FVboLNYAevGUr 5tHQ== X-Received: by 10.66.188.203 with SMTP id gc11mr30864547pac.63.1386723065425; Tue, 10 Dec 2013 16:51:05 -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 y9sm39419692pas.10.2013.12.10.16.51.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Dec 2013 16:51:04 -0800 (PST) Date: Tue, 10 Dec 2013 16:51:04 -0800 (PST) Message-ID: <87txegnrbf.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH] ARM: shmobile: r8a7778: add USB Func DMAEngine support User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") To: Simon Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto 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.9 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 HPB-DMAC has 2 channel for USB Func (= D0/D1) D0 is used as Tx, D1 is used as Rx on this patch Signed-off-by: Kuninori Morimoto --- > Simon BockW board will use this patch, but it needs HPB-DMAC fixup patches merge. I will send it when merged, but this patch itself doesn't depend on HPB-DMAC fixup branch. arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++ arch/arm/mach-shmobile/setup-r8a7778.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index a3440e5..5efd89d 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -63,6 +63,8 @@ enum { HPBDMA_SLAVE_HPBIF7_RX, HPBDMA_SLAVE_HPBIF8_TX, HPBDMA_SLAVE_HPBIF8_RX, + HPBDMA_SLAVE_USBFUNC_TX, + HPBDMA_SLAVE_USBFUNC_RX, }; extern void r8a7778_add_standard_devices(void); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index e786338..7ea6308 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -394,6 +394,22 @@ static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { .port = 0x0D0C, .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, .dma_ch = 22, + }, { + .id = HPBDMA_SLAVE_USBFUNC_TX, /* for D0 */ + .addr = 0xffe60018, + .dcr = HPB_DMAE_DCR_SPDS_32BIT | + HPB_DMAE_DCR_DMDL | + HPB_DMAE_DCR_DPDS_32BIT, + .port = 0x0000, + .dma_ch = 14, + }, { + .id = HPBDMA_SLAVE_USBFUNC_RX, /* for D1 */ + .addr = 0xffe6001c, + .dcr = HPB_DMAE_DCR_SMDL | + HPB_DMAE_DCR_SPDS_32BIT | + HPB_DMAE_DCR_DPDS_32BIT, + .port = 0x0101, + .dma_ch = 15, }, HPBDMA_SSI(0), @@ -418,6 +434,8 @@ static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { }; static const struct hpb_dmae_channel hpb_dmae_channels[] = { + HPB_DMAE_CHANNEL(0x7c, HPBDMA_SLAVE_USBFUNC_TX), /* ch. 14 */ + HPB_DMAE_CHANNEL(0x7c, HPBDMA_SLAVE_USBFUNC_RX), /* ch. 15 */ HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI0_TX), /* ch. 28 */