From patchwork Thu Jan 22 02:32:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5681691 Return-Path: X-Original-To: patchwork-dmaengine@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 AE4769F665 for ; Thu, 22 Jan 2015 02:33:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC59C20211 for ; Thu, 22 Jan 2015 02:33:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8096C2020E for ; Thu, 22 Jan 2015 02:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754614AbbAVCdC (ORCPT ); Wed, 21 Jan 2015 21:33:02 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:64645 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754602AbbAVCcz (ORCPT ); Wed, 21 Jan 2015 21:32:55 -0500 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 22 Jan 2015 11:32:54 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 855C73A5D8; Thu, 22 Jan 2015 11:32:54 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 755A52806D; Thu, 22 Jan 2015 11:32:54 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 6E7002806F; Thu, 22 Jan 2015 11:32:54 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id MAB04103; Thu, 22 Jan 2015 11:32:54 +0900 X-IronPort-AV: E=Sophos;i="5.09,445,1418050800"; d="scan'208";a="179328926" Received: from mail-sg1lp0092.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.92]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 22 Jan 2015 11:32:53 +0900 Received: from remon.renesas.com (211.11.155.132) by SIXPR06MB175.apcprd06.prod.outlook.com (10.242.151.22) with Microsoft SMTP Server (TLS) id 15.1.59.20; Thu, 22 Jan 2015 02:32:51 +0000 Message-ID: <8761bzmtmd.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] dmaengine: shdmac: fixup WARNING of slave caps retrieval User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Laurent Pinchart , Vinod Koul CC: Lars-Peter Clausen , Simon , Magnus , Linux-SH , In-Reply-To: <878ugvmtoa.wl%kuninori.morimoto.gx@renesas.com> References: <87vbk0n3q3.wl%kuninori.morimoto.gx@renesas.com> <33068117.HPgfh8e0Et@avalon> <87iofzmzl4.wl%kuninori.morimoto.gx@renesas.com> <878ugvmtoa.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Thu, 22 Jan 2015 02:32:51 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKNPR06CA0049.apcprd06.prod.outlook.com (10.141.16.39) To SIXPR06MB175.apcprd06.prod.outlook.com (10.242.151.22) 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:SIXPR06MB175; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SIXPR06MB175; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(76176999)(105586002)(50986999)(54356999)(81156004)(106356001)(2950100001)(33646002)(36756003)(77156002)(77096005)(40100003)(122386002)(68736005)(229853001)(97736003)(93886004)(50466002)(66066001)(47776003)(64706001)(19580405001)(83506001)(69596002)(19580395003)(53416004)(42186005)(46102003)(101416001)(86362001)(92566002)(46406003)(23726002)(87976001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB175; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB175; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2015 02:32:51.9846 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB175 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 Tested-by: Geert Uytterhoeven --- drivers/dma/sh/shdmac.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index aec8a84..ce4cd6b 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -684,6 +684,10 @@ MODULE_DEVICE_TABLE(of, sh_dmae_of_match); static int sh_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 | DMA_SLAVE_BUSWIDTH_8_BYTES | + DMA_SLAVE_BUSWIDTH_16_BYTES | DMA_SLAVE_BUSWIDTH_32_BYTES; const struct sh_dmae_pdata *pdata; unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {}; int chan_irq[SH_DMAE_MAX_CHANNELS]; @@ -746,6 +750,11 @@ static int sh_dmae_probe(struct platform_device *pdev) return PTR_ERR(shdev->dmars); } + 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_DESCRIPTOR; + if (!pdata->slave_only) dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); if (pdata->slave && pdata->slave_num)