From patchwork Tue Jan 20 01:22:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5661641 Return-Path: X-Original-To: patchwork-dmaengine@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 680CBC058D for ; Tue, 20 Jan 2015 01:22:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A87C420394 for ; Tue, 20 Jan 2015 01:22:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC316203A5 for ; Tue, 20 Jan 2015 01:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751248AbbATBWy (ORCPT ); Mon, 19 Jan 2015 20:22:54 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:26677 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750824AbbATBWx (ORCPT ); Mon, 19 Jan 2015 20:22:53 -0500 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 20 Jan 2015 10:22:52 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 335CA494D0; Tue, 20 Jan 2015 10:22:52 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 255512806E; Tue, 20 Jan 2015 10:22:52 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 1DECF2806D; Tue, 20 Jan 2015 10:22:52 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id LBP11893; Tue, 20 Jan 2015 10:22:52 +0900 X-IronPort-AV: E=Sophos;i="5.09,430,1418050800"; d="scan'208";a="177959103" Received: from mail-hk1lp0117.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.117]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 Jan 2015 10:22:51 +0900 Received: from remon.renesas.com (211.11.155.132) by SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) with Microsoft SMTP Server (TLS) id 15.1.59.20; Tue, 20 Jan 2015 01:22:48 +0000 Message-ID: <87zj9eb5ya.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3] dmaengine:: rcar-hpbdma: add dma_dev->directions User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Vinod Koul CC: Lars-Peter Clausen , Simon , Magnus , Linux-SH , Laurent , In-Reply-To: <20150113182504.GH15411@intel.com> References: <87r3v8uy5p.wl%kuninori.morimoto.gx@renesas.com> <54AD4109.8050903@metafoo.de> <87ppaqt5in.wl%kuninori.morimoto.gx@renesas.com> <20150113182504.GH15411@intel.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Tue, 20 Jan 2015 01:22:48 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HK2PR01CA0034.apcprd01.prod.exchangelabs.com (25.160.175.44) To SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005004);SRVR:SIXPR06MB176; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SIXPR06MB176; X-Forefront-PRVS: 0462918D61 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(46406003)(105586002)(53416004)(86362001)(19580395003)(50986999)(19580405001)(83506001)(42186005)(69596002)(81156004)(36756003)(122386002)(40100003)(62966003)(77156002)(66066001)(106356001)(92566002)(50466002)(97736003)(101416001)(46102003)(33646002)(87976001)(76176999)(64706001)(68736005)(54356999)(47776003)(93886004)(110136001)(229853001)(23726002)(77096005)(2950100001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB176; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB176; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2015 01:22:48.5458 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB176 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 From: Kuninori Morimoto ecc19d17868be9c9f8f00ed928791533c420f3e0 (dmaengine: Add a warning for drivers not using the generic slave caps retrieval) added WARN() for DMA_SLAVE. Kernel will shows WARNING without this patch. Signed-off-by: Kuninori Morimoto --- v2 -> v3 - dma -> dmaengine in Subject drivers/dma/sh/rcar-hpbdma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c index 20a6f6f..6fef1b9 100644 --- a/drivers/dma/sh/rcar-hpbdma.c +++ b/drivers/dma/sh/rcar-hpbdma.c @@ -534,6 +534,8 @@ static int hpb_dmae_chan_probe(struct hpb_dmae_device *hpbdev, int id) static int hpb_dmae_probe(struct platform_device *pdev) { + const enum dma_slave_buswidth widths = DMA_SLAVE_BUSWIDTH_1_BYTE | + DMA_SLAVE_BUSWIDTH_2_BYTES | DMA_SLAVE_BUSWIDTH_4_BYTES; struct hpb_dmae_pdata *pdata = pdev->dev.platform_data; struct hpb_dmae_device *hpbdev; struct dma_device *dma_dev; @@ -595,6 +597,10 @@ static int hpb_dmae_probe(struct platform_device *pdev) dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); dma_cap_set(DMA_SLAVE, dma_dev->cap_mask); + dma_dev->src_addr_widths = widths; + dma_dev->dst_addr_widths = widths; + dma_dev->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM); + dma_dev->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; hpbdev->shdma_dev.ops = &hpb_dmae_ops; hpbdev->shdma_dev.desc_size = sizeof(struct hpb_desc);