From patchwork Thu Jan 22 02:32:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5681671 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 741E3C058D for ; Thu, 22 Jan 2015 02:33:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A84272020E for ; Thu, 22 Jan 2015 02:33:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBEDB20211 for ; Thu, 22 Jan 2015 02:33:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbbAVCcz (ORCPT ); Wed, 21 Jan 2015 21:32:55 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:25847 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753402AbbAVCcr (ORCPT ); Wed, 21 Jan 2015 21:32:47 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 22 Jan 2015 11:32:44 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id E0DA63C106; Thu, 22 Jan 2015 11:32:44 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id D1E9C2806E; Thu, 22 Jan 2015 11:32:44 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id CCB892806D; Thu, 22 Jan 2015 11:32:44 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id MBC03954; Thu, 22 Jan 2015 11:32:44 +0900 X-IronPort-AV: E=Sophos;i="5.09,445,1418050800"; d="scan'208";a="179328911" Received: from mail-hk1lp0118.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.118]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 22 Jan 2015 11:32:43 +0900 Received: from remon.renesas.com (211.11.155.132) by SIXPR06MB173.apcprd06.prod.outlook.com (10.242.151.12) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 22 Jan 2015 02:32:41 +0000 Message-ID: <877fwfmtmn.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/2] dmaengine: rcar-hpbdma: 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:41 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: SIXPR06CA0061.apcprd06.prod.outlook.com (25.160.171.179) To SIXPR06MB173.apcprd06.prod.outlook.com (10.242.151.12) 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:SIXPR06MB173; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SIXPR06MB173; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(81156004)(106356001)(50466002)(69596002)(105586002)(83506001)(19580405001)(19580395003)(97736003)(86362001)(53416004)(101416001)(33646002)(229853001)(87976001)(42186005)(77096005)(92566002)(23726002)(68736005)(2950100001)(66066001)(46102003)(122386002)(40100003)(47776003)(36756003)(46406003)(64706001)(50986999)(93886004)(54356999)(77156002)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB173; 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:SIXPR06MB173; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2015 02:32:41.5454 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB173 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 --- 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..749f26e 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_DESCRIPTOR; hpbdev->shdma_dev.ops = &hpb_dmae_ops; hpbdev->shdma_dev.desc_size = sizeof(struct hpb_desc);