From patchwork Mon Nov 10 11:02:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 5265411 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 3C718C11AC for ; Mon, 10 Nov 2014 11:03:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6425A20172 for ; Mon, 10 Nov 2014 11:03:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85F5B20166 for ; Mon, 10 Nov 2014 11:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbaKJLDD (ORCPT ); Mon, 10 Nov 2014 06:03:03 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:23652 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752014AbaKJLDC (ORCPT ); Mon, 10 Nov 2014 06:03:02 -0500 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 10 Nov 2014 20:03:01 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 95FBA44A7B; Mon, 10 Nov 2014 20:03:01 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 7DA4F2806E; Mon, 10 Nov 2014 20:03:01 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 77AE42806D; Mon, 10 Nov 2014 20:03:01 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id WAN09923; Mon, 10 Nov 2014 20:03:01 +0900 X-IronPort-AV: E=Sophos;i="5.07,351,1413212400"; d="scan'208";a="174433293" Received: from mail-sg1lp0091.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.91]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 10 Nov 2014 20:03:00 +0900 Received: from localhost (211.11.155.147) by HKXPR06MB327.apcprd06.prod.outlook.com (10.141.133.17) with Microsoft SMTP Server (TLS) id 15.1.16.15; Mon, 10 Nov 2014 11:02:59 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH 1/4] usb: renesas_usbhs: change d{0,1}fifo to dfifo array Date: Mon, 10 Nov 2014 20:02:44 +0900 Message-ID: <1415617367-3828-2-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: SINPR01CA0034.apcprd01.prod.exchangelabs.com (10.141.109.34) To HKXPR06MB327.apcprd06.prod.outlook.com (10.141.133.17) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB327; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB327; X-Forefront-PRVS: 039178EF4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(189002)(199003)(66066001)(122386002)(97736003)(40100003)(88136002)(92726001)(76506005)(92566001)(104166001)(42382002)(120916001)(77096003)(36756003)(77156002)(20776003)(62966003)(47776003)(50466002)(21056001)(64706001)(48376002)(95666004)(101416001)(105586002)(50986999)(106356001)(76176999)(50226001)(78352002)(4396001)(102836001)(31966008)(42186005)(33646002)(46102003)(107046002)(99396003)(229853001)(89996001)(19580395003)(93916002)(87286001)(575784001)(19580405001)(87976001)(88662002)(414714003)(473944003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB327; H:localhost; FPR:; MLV:nov; PTR:InfoNoRecords; MX:0; A:0; LANG:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB327; 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 changes d{0,1}fifo of usbhs_fifo_info to dfifo array. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/fifo.c | 4 ++-- drivers/usb/renesas_usbhs/fifo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 9b48384..341508a 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -21,8 +21,8 @@ #include "pipe.h" #define usbhsf_get_cfifo(p) (&((p)->fifo_info.cfifo)) -#define usbhsf_get_d0fifo(p) (&((p)->fifo_info.d0fifo)) -#define usbhsf_get_d1fifo(p) (&((p)->fifo_info.d1fifo)) +#define usbhsf_get_d0fifo(p) (&((p)->fifo_info.dfifo[0])) +#define usbhsf_get_d1fifo(p) (&((p)->fifo_info.dfifo[1])) #define usbhsf_is_cfifo(p, f) (usbhsf_get_cfifo(p) == f) #define usbhsf_fifo_is_busy(f) ((f)->pipe) /* see usbhs_pipe_select_fifo */ diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h index 79ad5f9..e1e51c6 100644 --- a/drivers/usb/renesas_usbhs/fifo.h +++ b/drivers/usb/renesas_usbhs/fifo.h @@ -38,10 +38,10 @@ struct usbhs_fifo { struct sh_dmae_slave rx_slave; }; +#define USBHS_MAX_NUM_DFIFO 2 struct usbhs_fifo_info { struct usbhs_fifo cfifo; - struct usbhs_fifo d0fifo; - struct usbhs_fifo d1fifo; + struct usbhs_fifo dfifo[USBHS_MAX_NUM_DFIFO]; }; struct usbhs_pkt_handle;