From patchwork Mon Nov 10 11:02:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 5265431 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 6A32DC11AC for ; Mon, 10 Nov 2014 11:03:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95D0B20166 for ; Mon, 10 Nov 2014 11:03:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B775320109 for ; Mon, 10 Nov 2014 11:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752340AbaKJLDO (ORCPT ); Mon, 10 Nov 2014 06:03:14 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:33366 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751926AbaKJLDM (ORCPT ); Mon, 10 Nov 2014 06:03:12 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 10 Nov 2014 20:03:12 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 5D43F43036; Mon, 10 Nov 2014 20:03:12 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 566332806D; Mon, 10 Nov 2014 20:03:12 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 54D0C2806F; Mon, 10 Nov 2014 20:03:12 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id WAW09923; Mon, 10 Nov 2014 20:03:12 +0900 X-IronPort-AV: E=Sophos;i="5.07,351,1413212400"; d="scan'208";a="174433301" 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:11 +0900 Received: from localhost (211.11.155.147) by HKNPR06MB323.apcprd06.prod.outlook.com (10.141.38.17) with Microsoft SMTP Server (TLS) id 15.1.16.15; Mon, 10 Nov 2014 11:03:10 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH 3/4] usb: renesas_usbhs: add a new macro for extending DnFIFOs Date: Mon, 10 Nov 2014 20:02:46 +0900 Message-ID: <1415617367-3828-4-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: SINPR01CA0041.apcprd01.prod.exchangelabs.com (10.141.109.41) To HKNPR06MB323.apcprd06.prod.outlook.com (10.141.38.17) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB323; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB323; X-Forefront-PRVS: 039178EF4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(6009001)(189002)(199003)(105586002)(93916002)(92726001)(97736003)(92566001)(33646002)(48376002)(122386002)(42382002)(120916001)(229853001)(36756003)(50466002)(99396003)(66066001)(87286001)(101416001)(87976001)(19580405001)(19580395003)(102836001)(106356001)(50226001)(4396001)(88136002)(77096003)(77156002)(62966003)(89996001)(104166001)(20776003)(40100003)(50986999)(76176999)(64706001)(95666004)(47776003)(78352002)(46102003)(107046002)(76506005)(42186005)(21056001)(31966008)(88662002); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB323; H:localhost; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:0; A:0; LANG:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB323; 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 To extend DnFIFOs in the future, this patch adds a new macro because some SoCs don't the "port" address for DnFIFOs. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/fifo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 6c775b7..bc9a050 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -1201,11 +1201,11 @@ void usbhs_fifo_quit(struct usbhs_priv *priv) mod->irq_brdysts = 0; } -#define USBHS_DFIFO_INIT(priv, fifo, channel) \ +#define __USBHS_DFIFO_INIT(priv, fifo, channel, fifo_port) \ do { \ fifo = usbhsf_get_dnfifo(priv, channel); \ fifo->name = "D"#channel"FIFO"; \ - fifo->port = D##channel##FIFO; \ + fifo->port = fifo_port; \ fifo->sel = D##channel##FIFOSEL; \ fifo->ctr = D##channel##FIFOCTR; \ fifo->tx_slave.shdma_slave.slave_id = \ @@ -1215,6 +1215,11 @@ do { \ usbhsf_dma_init(priv, fifo); \ } while (0) +#define USBHS_DFIFO_INIT(priv, fifo, channel) \ + __USBHS_DFIFO_INIT(priv, fifo, channel, D##channel##FIFO) +#define USBHS_DFIFO_INIT_NO_PORT(priv, fifo, channel) \ + __USBHS_DFIFO_INIT(priv, fifo, channel, 0) + int usbhs_fifo_probe(struct usbhs_priv *priv) { struct usbhs_fifo *fifo;