From patchwork Mon Nov 10 11:02:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 5265441 X-Patchwork-Delegate: geert@linux-m68k.org 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 5B74DC11AC for ; Mon, 10 Nov 2014 11:03:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7441820166 for ; Mon, 10 Nov 2014 11:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9330620109 for ; Mon, 10 Nov 2014 11:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752316AbaKJLDU (ORCPT ); Mon, 10 Nov 2014 06:03:20 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:25980 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752014AbaKJLDT (ORCPT ); Mon, 10 Nov 2014 06:03:19 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 10 Nov 2014 20:03:17 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id A8BE44303C; Mon, 10 Nov 2014 20:03:17 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id A4A02480A3; Mon, 10 Nov 2014 20:03:17 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 9FD6548014; Mon, 10 Nov 2014 20:03:17 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id WAA29262; Mon, 10 Nov 2014 20:03:17 +0900 X-IronPort-AV: E=Sophos;i="5.07,351,1413212400"; d="scan'208";a="174433302" Received: from mail-hk1lp0117.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.117]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 10 Nov 2014 20:03:16 +0900 Received: from localhost (211.11.155.147) by SIXPR06MB335.apcprd06.prod.outlook.com (10.141.120.17) with Microsoft SMTP Server (TLS) id 15.1.16.15; Mon, 10 Nov 2014 11:03:15 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH 4/4] usb: renesas_usbhs: expand USB-DMAC channels for R-Car Gen2 Date: Mon, 10 Nov 2014 20:02:47 +0900 Message-ID: <1415617367-3828-5-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1415617367-3828-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1415617367-3828-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.147] X-ClientProxiedBy: SINPR01CA0027.apcprd01.prod.exchangelabs.com (10.141.109.27) To SIXPR06MB335.apcprd06.prod.outlook.com (10.141.120.17) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB335; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB335; X-Forefront-PRVS: 039178EF4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(189002)(199003)(19580405001)(105586002)(64706001)(78352002)(42382002)(87976001)(106356001)(88136002)(40100003)(66066001)(87286001)(47776003)(229853001)(20776003)(19580395003)(104166001)(99396003)(122386002)(120916001)(89996001)(107046002)(93916002)(95666004)(50226001)(4396001)(21056001)(33646002)(92726001)(92566001)(101416001)(42186005)(76176999)(97736003)(76506005)(46102003)(50466002)(77156002)(77096003)(62966003)(31966008)(102836001)(48376002)(36756003)(50986999)(88662002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB335; H:localhost; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:0; A:0; LANG:en; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB335; X-OriginatorOrg: renesas.com 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This patch expands USB-DMAC channels for R-Car Gen2 SoCs. The SoCs have 4 channels. If d{2,3}_{t,x}x_id are not set, this driver never uses the expanded USB-DMAC channels. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/common.h | 4 ++++ drivers/usb/renesas_usbhs/fifo.c | 2 ++ drivers/usb/renesas_usbhs/fifo.h | 2 +- include/linux/usb/renesas_usbhs.h | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index c45667f..0427cdd 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -102,6 +102,10 @@ struct usbhs_priv; #define DEVADD8 0x00E0 #define DEVADD9 0x00E2 #define DEVADDA 0x00E4 +#define D2FIFOSEL 0x00F0 /* for R-Car Gen2 */ +#define D2FIFOCTR 0x00F2 /* for R-Car Gen2 */ +#define D3FIFOSEL 0x00F4 /* for R-Car Gen2 */ +#define D3FIFOCTR 0x00F6 /* for R-Car Gen2 */ /* SYSCFG */ #define SCKE (1 << 10) /* USB Module Clock Enable */ diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index bc9a050..f46271c 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -1234,6 +1234,8 @@ int usbhs_fifo_probe(struct usbhs_priv *priv) /* DFIFO */ USBHS_DFIFO_INIT(priv, fifo, 0); USBHS_DFIFO_INIT(priv, fifo, 1); + USBHS_DFIFO_INIT_NO_PORT(priv, fifo, 2); + USBHS_DFIFO_INIT_NO_PORT(priv, fifo, 3); return 0; } diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h index 899729a..f07037c1 100644 --- a/drivers/usb/renesas_usbhs/fifo.h +++ b/drivers/usb/renesas_usbhs/fifo.h @@ -38,7 +38,7 @@ struct usbhs_fifo { struct sh_dmae_slave rx_slave; }; -#define USBHS_MAX_NUM_DFIFO 2 +#define USBHS_MAX_NUM_DFIFO 4 struct usbhs_fifo_info { struct usbhs_fifo cfifo; struct usbhs_fifo dfifo[USBHS_MAX_NUM_DFIFO]; diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index d5952bb..9fd9e48 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h @@ -145,6 +145,10 @@ struct renesas_usbhs_driver_param { int d0_rx_id; int d1_tx_id; int d1_rx_id; + int d2_tx_id; + int d2_rx_id; + int d3_tx_id; + int d3_rx_id; /* * option: