From patchwork Mon Apr 18 07:53:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 8868541 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA5789F441 for ; Mon, 18 Apr 2016 07:54:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BB012011E for ; Mon, 18 Apr 2016 07:54:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A54020035 for ; Mon, 18 Apr 2016 07:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752027AbcDRHyZ (ORCPT ); Mon, 18 Apr 2016 03:54:25 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:19252 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751546AbcDRHyX (ORCPT ); Mon, 18 Apr 2016 03:54:23 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 18 Apr 2016 16:54:21 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 645CC50386; Mon, 18 Apr 2016 16:54:21 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 49AF28002E; Mon, 18 Apr 2016 16:54:21 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 415238002D; Mon, 18 Apr 2016 16:54:21 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id SAA10557; Mon, 18 Apr 2016 16:54:21 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="209568574" Received: from mail-hk2apc01lp0211.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.211]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Apr 2016 16:54:20 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IWaKz/3SeJAVZ/OV4carEdl6syTZ4V5I5AbJcgvhyDk=; b=bWYMjmh2pXIMLW9bDtYOh3dDuyH4v1IA2rWVZ1HTHF4FCViS0tHjoR9MhSbw7LZwRKbbGNRU9eWiMWJm3tbzLqz16TxpPxbqIOg7RhjbfqEqfUHz4RkVvhS6I6fUiCPC7WT3dre5C+AagarUqcBhrsJtrFmtZVe97KvJM5p2p+Y= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from localhost (211.11.155.141) by SG2PR06MB0918.apcprd06.prod.outlook.com (10.162.201.158) with Microsoft SMTP Server (TLS) id 15.1.453.26; Mon, 18 Apr 2016 07:54:19 +0000 From: Yoshihiro Shimoda To: CC: , , , Yoshihiro Shimoda Subject: [PATCH 4/5] usb: renesas_usbhs: change arguments of dma_map_ctrl() Date: Mon, 18 Apr 2016 16:53:41 +0900 Message-ID: <1460966022-3444-5-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1460966022-3444-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1460966022-3444-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.141] X-ClientProxiedBy: OS2PR01CA0031.jpnprd01.prod.outlook.com (10.164.161.141) To SG2PR06MB0918.apcprd06.prod.outlook.com (10.162.201.158) X-MS-Office365-Filtering-Correlation-Id: e831efa2-64e0-4f22-812c-08d3675ea5c1 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0918; 2:saHmKuJMs3roKuO1HRdodzuCdDomEx2mAQCGsP2X+vrTz30BuTxM3x7p6U9lBXOAl3E8386OZyNkwd7FMVl12IeaBgJdMQzVi2wjVFtNWs4ciVN+SE4cGNh5A83nI9oXGvLqfYbkDtHD+QU4JgCOgYxnyxYykARMJD1NXpw1YZx4y64EVqwTgFsfJvTAu2SO; 3:tNPWwbNorxp2V5Zf6W56famYFu7aBlnUYzE2bQYikFghE66WI3kODacoihyUFr6PIRwZ2sjvI3n06mSeGKQN4MDT8Ry9UtrHBdDIOD+HIrVoLHgj0Eu65Ig+LXdJsP6m; 25:wsvOfS299IZln5kABDO4mOj9595K8BSo2qm6L+YsnF7wmFGCQ+5xDiWyDFuWzATDzplQzkSkdfYM18K3/1c5B/h4V8xuSIv1c9q+wNwYKv6MApEhSreVwpxAgClcjFiyGQ1V0Sc0yE+z+5bNMg49/rSTmST0fElDv/IerjTiR1xm0mA2s6uAw34G5yU96GtE3V/pHGp1QsahBhrcYe0mnxb5wjmw1aFxVCe85rbRat4XoJ9BvMYt5KBompYdVpSmRdZsqWMur9wH+5kSbrM8QEHIYrn9+we+PnDuwHb4OqYtPLz+/uz8agFAfppoG98ItMpaRxqcl9dsDBJFFwBovQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB0918; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0918; 20:DvWOfisZobRB22pLa1Ll3RV3aweQGXAPQiOX5STWpIoOJ91XVoQ0JbmvAJl32qyeXxgFowu00WUIBk3bqBEm6j7eQZHapny0wolYAFAwEhlY//Q3G9NKCcgtlc8+acJxm57Q1sw6BBIUdckguBL+s6Nwsm975eumX7gtOQ2aFv2L9i8uFwnQQBLxaK5GzDcRZgNTQGh+L0ifwIdsg0/6A45yIFMNOLu26N1uoSMh4PTvtnVAJy89HKxRAatG/NIrSYFwaNYoKqDuLYTruIH/xxpIDicLnvniKF3HJNaOLt+R+YmCr3LQ79zph38ZcEVvWTEd/kK2OqfS423YgZlsezJUNDwQldPWekIl2hg5CQQwTY5ooyxo3byQfKTYq1rA+eBKQeQoVe2B5ZrUv++EVK5tnLRyz/RMyqGuRHvjwUesnbrseLeIJiPdvbLE7WqrQz11HBougmGmzQRwDQr790izAS+4Ac0AZP20fMnh1/OCp3zsYSymweN1TrCI/VOC; 4:lan301P1QXxBfuTpPKJdJ+9DrVKQT8/Vi8T2+CV+TSPrC6PM71m7LbAbd04asZTHqpdnChzUWwIdHf9pQI8ZfLRRQW1hNFPUmqZ6y1ulKPansa4pJKDNZtrokh/UkhiJWmjh1I7aUytg3/UwAewU52ACsN4KV1mABIDf4RhchnIKk8bX/49HOPvbl3VVlNwt7EdwsQkb9/UadpxjxDWbbJJn5WaBpjcTaTEeC2aUT7kd3oYfA7SxFKUZB9WOnHdmVA0BqBwrlWmF0rieBCfInWAUCyBv4+9HlSoZONY+DUNXhOYS+kBqfklekRvwpU9/HyZ9E2N92AaMV6F31lm6PYLY9PWf4CDvfDNp0LJBU5FSZTAXzSupIZ/crFpr/OnDr1ZxNBgWV90hj3P3kVM7Kg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SG2PR06MB0918; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0918; X-Forefront-PRVS: 0916FC3A18 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(50986999)(78352003)(19580395003)(1096002)(76176999)(5008740100001)(48376002)(50226001)(2351001)(81166005)(3846002)(586003)(229853001)(19580405001)(6116002)(4001430100002)(5003940100001)(42382002)(5004730100002)(33646002)(47776003)(2950100001)(77096005)(575784001)(36756003)(92566002)(189998001)(66066001)(107886002)(42186005)(110136002)(2906002)(50466002)(76506005)(4326007); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0918; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0918; 23:ep2GGEFa+JzaQqDqpRsBXVZ1iroTxIcYQL5mznnvv?= =?us-ascii?Q?HWGbCOCBNwY06qV7kn+wf8cKoQSrghd114URhREBFhr3i4mR6tM8WPpUwzlk?= =?us-ascii?Q?cej3C/FurU7/QygFL3i953GpGsKVAa553lYY/j0FbTiPTPZFJfwJlmbcCdx8?= =?us-ascii?Q?nQasraPI79wtW172cZi83mgmiJR9xfGTkKWfI0Lbr+JRACAINoZTSCLPoETI?= =?us-ascii?Q?jYz47FyJA7rFs9utvvnHq/Z06HvQSv4zABGE2jSd/cwB3lQkFaGe2l5iGtL7?= =?us-ascii?Q?a35yY4dtdGrKLRRMXd0Aebt81j6aF8qjLr5CNwKdcee7tl5Of9gQEON1sWAr?= =?us-ascii?Q?we3HlnRsxilX8Z5DEzoaBrl8PR/O8uxilx86T9W9oYzqgx7zr4vrIs2xthY2?= =?us-ascii?Q?wWX9TlEni43eTq2SjFaVk2GmsVCdD/4J9DMti3hnKaWk7JnUTymtvkwXgibN?= =?us-ascii?Q?duoIFQ2h9+Cuh0Bn5SFapqAUP1QbwJVZds0le/sT6uvZxSNM6Icr/X5rtrkA?= =?us-ascii?Q?QXXRogU1fH+1FsaRMyKIZOB7a/jop9K7be2Ywdlz7tmItxLd8RgqsV81sofk?= =?us-ascii?Q?5E3qGq/rDHaBUKuMfSO436ayZ+g2oBqIs2Sk5zuqD+jsLkHt6kzdnqtB5Uiu?= =?us-ascii?Q?FE7vXeJNrSMIyLncBYIvjf12xBayxbDjV74t87l+OhIkPdZwkg60C5tp3EKe?= =?us-ascii?Q?71tVcgXncXVoflQTqOZTg71uUNCCpYkXXkfXBJ4bbrL6OVQq4B4cs9PExaIA?= =?us-ascii?Q?nOouYITxFMk1Q4jm1cNs5AdH2FiOHJTQjO66tpOBe0DTRrp9JnHP+XbfbD5v?= =?us-ascii?Q?EDxfoqHpYj4MjoZcbMz4mQwvgMes2/11RWaBQbVgCgujStUdc0JqoKWzcEbS?= =?us-ascii?Q?8eKThZXZUHJgfEeDMnUMDdQAk/TA8Qbi2ADiwhYSLF7Rx/bWkyMVzucY4J9j?= =?us-ascii?Q?eoW1Gr21sZ8SqslOF+QV+fimU3+sf4QYJ4LwdNHzxyGjRqfIIvB9miRBNT2X?= =?us-ascii?Q?aBxB/ju0z088g7BvYxgurxX?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0918; 5:9fISATACMUfEjA4xRpCVwGcLgo7TGJwHagvboCi3uq0OeJ+D4mEPs/YmyoNyNtW10yNZ1jaocm3U2wnK3X5Wx+wJMElxIUZMJ6lO2KHzp/0N/ZEax5pqLgYCykMdXvFAy5LVrHWZXFRsdIDHw44UBA==; 24:zekqY2VnSKCpM3RZ4cv5E12+O43PVMpgec4DHNaE49la9d2tFWJcEndoggGqB4EpeHXSDtRUZJBtU5fv54T+YKjfx/sy2chUBJkg+YmRKrc=; 20:vzivy9VbNzUb8nqzWBwyxFBdhnxgRBlbFXVXc7b9NRDNLSLhUN+IqjU+TRNP+Voxk8ISIs0lUik96PblGYuJwS/LUL/jwqJFwTLGAI/0/dHE28rFz0HlLct6M2hhwHS58JGE+hQmg6RQTkRykCPtK0h4ar30lGjnnqmjwzRxmcw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2016 07:54:19.1599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0918 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 Since usbhsg_dma_map_ctrl() needs DMA device structure in the near future, this patch changes arguments of dma_map_ctrl() to give such data. (This patch is only change the argument.) Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/fifo.c | 4 +++- drivers/usb/renesas_usbhs/mod_gadget.c | 3 ++- drivers/usb/renesas_usbhs/mod_host.c | 3 ++- drivers/usb/renesas_usbhs/pipe.c | 3 ++- drivers/usb/renesas_usbhs/pipe.h | 6 ++++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index a805b23..7be4e7d 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -799,8 +799,10 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map) struct usbhs_pipe *pipe = pkt->pipe; struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); + struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe); + struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt); - return info->dma_map_ctrl(pkt, map); + return info->dma_map_ctrl(chan->device->dev, pkt, map); } static void usbhsf_dma_complete(void *arg); diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 53d104b..d701ae6 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -191,7 +191,8 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep, /* * dma map/unmap */ -static int usbhsg_dma_map_ctrl(struct usbhs_pkt *pkt, int map) +static int usbhsg_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt, + int map) { struct usbhsg_request *ureq = usbhsg_pkt_to_ureq(pkt); struct usb_request *req = &ureq->req; diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 1a8e4c4..3bf0b72 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c @@ -929,7 +929,8 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd, /* * dma map functions */ -static int usbhsh_dma_map_ctrl(struct usbhs_pkt *pkt, int map) +static int usbhsh_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt, + int map) { if (map) { struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt); diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 78e9dba..77b615c 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -655,7 +655,8 @@ static void usbhsp_put_pipe(struct usbhs_pipe *pipe) } void usbhs_pipe_init(struct usbhs_priv *priv, - int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)) + int (*dma_map_ctrl)(struct device *dma_dev, + struct usbhs_pkt *pkt, int map)) { struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); struct usbhs_pipe *pipe; diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h index 7835747..95185fd 100644 --- a/drivers/usb/renesas_usbhs/pipe.h +++ b/drivers/usb/renesas_usbhs/pipe.h @@ -47,7 +47,8 @@ struct usbhs_pipe_info { struct usbhs_pipe *pipe; int size; /* array size of "pipe" */ - int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map); + int (*dma_map_ctrl)(struct device *dma_dev, struct usbhs_pkt *pkt, + int map); }; /* @@ -84,7 +85,8 @@ int usbhs_pipe_is_running(struct usbhs_pipe *pipe); void usbhs_pipe_running(struct usbhs_pipe *pipe, int running); void usbhs_pipe_init(struct usbhs_priv *priv, - int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)); + int (*dma_map_ctrl)(struct device *dma_dev, + struct usbhs_pkt *pkt, int map)); int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); void usbhs_pipe_clear(struct usbhs_pipe *pipe); int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);