From patchwork Tue Apr 5 09:15:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 8748941 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E109C0553 for ; Tue, 5 Apr 2016 09:16:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D175A2035D for ; Tue, 5 Apr 2016 09:16:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D798E2034F for ; Tue, 5 Apr 2016 09:16:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932548AbcDEJQY (ORCPT ); Tue, 5 Apr 2016 05:16:24 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:20252 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932156AbcDEJQW (ORCPT ); Tue, 5 Apr 2016 05:16:22 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 05 Apr 2016 18:16:20 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id F143E4864A; Tue, 5 Apr 2016 18:16:20 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id EDB721806F; Tue, 5 Apr 2016 18:16:20 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id E5A8E1800A; Tue, 5 Apr 2016 18:16:20 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id UAL15761; Tue, 5 Apr 2016 18:16:20 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="208087346" Received: from mail-hk2apc01lp0207.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.207]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 05 Apr 2016 18:16: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=+PBvhKvhWq9isBox3Dl0k4I2tYxUP0loLKTUNFnVImY=; b=mmxcd7YzEf3keWYBPqxFRNXJHhmYGr8NfKb7hxQRYnNreJgdi6Rl0fEXNoQ6tIgOJV2sD/DvVpfL502esZMjxJolQ3BZsHIX9h8q7/BQ4ZFB9QLQtjZTLhLRObMBVBhgoYafRXnjxaqdixWFMLdYukLe9LdiB5omj2nK/DnPhpM= 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.144) by SG2PR06MB0917.apcprd06.prod.outlook.com (10.162.200.158) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 5 Apr 2016 09:16:18 +0000 From: Yoshihiro Shimoda To: CC: , , , Yoshihiro Shimoda Subject: [PATCH/RFC 4/5] usb: renesas_usbhs: change arguments of dma_map_ctrl() Date: Tue, 5 Apr 2016 18:15:48 +0900 Message-ID: <1459847749-5336-5-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1459847749-5336-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1459847749-5336-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0044.jpnprd01.prod.outlook.com (10.164.162.154) To SG2PR06MB0917.apcprd06.prod.outlook.com (10.162.200.158) X-MS-Office365-Filtering-Correlation-Id: bd704d63-02b2-4e8c-ef47-08d35d32f2ba X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0917; 2:r1aisgDZ2blmmCjpg/saznmVKODWt45TeHzQC7bFrcFf8k3mFVosxIu78Gk87rs+pOJElzzR/RAXWN2uNdx3vkeEa/UCnugBTvhCHq48FMOLdv9Mla17zBE3nFIoU5b9RVLu5ucl7m32+eUlhQhJZR+QhAzvrOa3H1Bjy8Nf26LWrK7dRR08efn1pndKZFba; 3:a8XK3LmSuyIPW0PjVi6GPm493KgqNyRSd1s6qcv3xqiUbTCVnV4jdASVKRMov3DWqDg718ndfvOyQoA00tXeQltpJIDO+nJPeVhJsb1bDg9VdvqYsQWRJOwwDlz94iLy X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB0917; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0917; 25:idKDiMOebqon0ovn/e1kVYj/db/dIYI1kXgb7bMWUWbgqlIs2KLpPhqPuVhFOJdEpmrvuRh/Ol/IMna8FEjF7EXWTZl3Rgo/sG6NmCSHzo0eKpkNwGO4ZCs9K36OxNMLHIyJEwIgw69plm6QDs+ipzIs3N5K8F4ZLMr8XAqlJkV19kP/DW77WwQ3IPB3Dudfu7W4+oAQ3+jlmNG3srhVEx8oMRMNrpaH1XyUsP5gobY+x+Ud8y5CapAjotmSOi8wqb6riU1LBqZDU04HF6p8H5LYAXqHwdHzV8jemb49S8KmfC9P2xgKMSissJMivNZUt4VgtmqNzU+LTyDtyAkDJGSt5Lk6SQ040YGwJF6Dfim8lk2zb6qiBZk/P9HOhb7yC32ilSjzfuW7D35+F2iuOBtvqs/v6wF8CrYF+gzE4gatwKa2EhzLI2B5cLm6d9EMJN1ZJGY39jqouyrS3XD33JeFu7j1CIsekzI0LH3na6++1gLt7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I0ptRsK9iHZT5FYS3xGjd/yLo9sPrF2OKei/NG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:SG2PR06MB0917; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0917; X-Forefront-PRVS: 0903DD1D85 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(33646002)(229853001)(2906002)(42382002)(50986999)(42186005)(6116002)(586003)(3846002)(1096002)(78352003)(2950100001)(19580405001)(110136002)(92566002)(66066001)(4001430100002)(81166005)(19580395003)(50226001)(189998001)(5008740100001)(36756003)(5004730100002)(76506005)(107886002)(50466002)(2351001)(48376002)(76176999)(4326007)(77096005)(47776003)(5003940100001)(575784001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0917; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0917; 23:D/c4UJS1i4TiGVnoq0mpqmtEVcyn9mmeV2FFFtewo?= =?us-ascii?Q?DvJ5rqGWTZi+9Fy4AuXV15erGmB/ZuB93tHleAD4JTWkvfB8Flfivr2sTn1C?= =?us-ascii?Q?OOdRJgUQ+LYUPhq6VRFSHqoESYpagGk2riW4JnHOoZkTgbTkPPLVVypd/grq?= =?us-ascii?Q?RtqspZ019ps7TccffZfgWNOmnakb1a8J0RZ2wurBaFZ1bTcApvwuEAYbyxyC?= =?us-ascii?Q?xzIGYW1I/HMCo7I7RNO7M/yhwQ8NZB6Vr2tsp8w5EqkJnJGEAiyyGAA3BMBA?= =?us-ascii?Q?Lg4AlyQ4ihVyCLSTakCa2ajp3i3t2G6MajeEIVrumDoTRy97oeNx4IJJW8Db?= =?us-ascii?Q?xBwogdlqL4Ki9poPZFhRrd5Og6wP1QvqBC4APX8o0wvoDvBX8r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OCnbxuoyyMbFMM8AUO89Mzv0YgEli+67dsX/WqPwXEk=; 20:I6DdjZLpIehkRDOGEfkDloJodfNQaOuUTD6zeIcL5AAVcDl3Rnl9BvOK4OSMVmryhxY2vU9nuY7ybMihte63JWGdNC6xp5Lm1LwA1jfYfSdaknlsAfgiN1kUARGkb+eS5hZQaTFWLufvIknhveqRfZ6puGKCiBolsAMrM+yGu6Q= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 09:16:18.8488 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0917 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 In near the future, since usbhsg_dma_map_ctrl() needs DMA device structure, 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 eb19dc7..05e4dcd 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -798,8 +798,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 664b263..0ebc4a9 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -187,7 +187,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);