From patchwork Thu Jan 8 01:38:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5589671 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 BF163BF6C3 for ; Thu, 8 Jan 2015 01:38:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8FE72034C for ; Thu, 8 Jan 2015 01:38:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7759B202FE for ; Thu, 8 Jan 2015 01:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752369AbbAHBi4 (ORCPT ); Wed, 7 Jan 2015 20:38:56 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:51620 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751202AbbAHBiz (ORCPT ); Wed, 7 Jan 2015 20:38:55 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 08 Jan 2015 10:38:53 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id B557741BED; Thu, 8 Jan 2015 10:38:53 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id A3B98480A4; Thu, 8 Jan 2015 10:38:53 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 9F2D4480A3; Thu, 8 Jan 2015 10:38:53 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id LAB01363; Thu, 8 Jan 2015 10:38:53 +0900 X-IronPort-AV: E=Sophos;i="5.07,718,1413212400"; d="scan'208";a="177134859" 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; 08 Jan 2015 10:38:52 +0900 Received: from remon.renesas.com (211.11.155.132) by SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) with Microsoft SMTP Server (TLS) id 15.1.53.17; Thu, 8 Jan 2015 01:38:50 +0000 Message-ID: <87ppaqt5in.wl%kuninori.morimoto.gx@renesas.com> To: Lars-Peter Clausen CC: Vinod Koul , Simon , Magnus , Linux-SH , Laurent , In-Reply-To: <54AD4109.8050903@metafoo.de> References: <87r3v8uy5p.wl%kuninori.morimoto.gx@renesas.com> <54AD4109.8050903@metafoo.de> From: Kuninori Morimoto Subject: [PATCH v2] dma: rcar-hpbdma: fixup WARNING of slave caps retrieval User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Thu, 8 Jan 2015 01:38:50 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKNPR06CA0026.apcprd06.prod.outlook.com (10.141.16.16) To SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:SINPR06MB169; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SINPR06MB169; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(107046002)(66066001)(64706001)(77096005)(229853001)(46406003)(50466002)(47776003)(20776003)(36756003)(68736005)(87976001)(97736003)(53416004)(40100003)(122386002)(105586002)(86362001)(76176999)(106356001)(4396001)(50986999)(81156004)(54356999)(2950100001)(69596002)(19580395003)(19580405001)(83506001)(31966008)(21056001)(99396003)(110136001)(46102003)(33646002)(23726002)(77156002)(101416001)(42186005)(120916001)(92566001)(62966003); DIR:OUT; SFP:1102; SCL:1; SRVR:SINPR06MB169; 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:SINPR06MB169; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2015 01:38:50.3468 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SINPR06MB169 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=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 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 --- v1 -> v2 - add src_addr_widths - add dst_addr_widths - add residue_granularity 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);